2026-05-10 23:12:26 +02:00
|
|
|
import assert from 'node:assert/strict';
|
|
|
|
|
import { createHash } from 'node:crypto';
|
|
|
|
|
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
|
|
|
import { tmpdir } from 'node:os';
|
|
|
|
|
import { join } from 'node:path';
|
|
|
|
|
import { describe, it } from 'node:test';
|
|
|
|
|
|
chore(workspace): gate dead-code with knip production mode (#196)
* refactor(workspace): relocate @ktx/llm source into packages/cli/src/llm
* refactor(workspace): rewrite @ktx/llm imports to relative paths
* refactor(workspace): fold internal packages into cli
* chore(workspace): gate dead-code with knip production mode
Turn on production-mode knip plus an autofix run in pre-commit and the
`pnpm dead-code` script, document the `/** @internal */` convention for
test-only exports in AGENTS.md, annotate test-only exports across the
CLI with that JSDoc, and drop dead exports/wrappers the new gate
surfaced (e.g. `cli-project.ts`, `lookerRuntimeSourceToFileAdapterSource`,
`createLocalScanEnrichmentProvidersFromConfig`,
`PGLITE_OWNER_PROCESS_BACKEND_CAPABILITIES`, stale type re-exports).
Replace the loose `ignoreIssues` allowlist in `knip.json` with explicit
production entries so cross-package barrel leaks are caught.
* refactor(cli): delete internal barrel index.ts files
The 34 `index.ts` re-export barrels inside `packages/cli/src/` were
holdovers from the pre-fold multi-workspace structure. Post-fold-in they
served no production purpose: external consumers go through the single
package main entry, and in-repo callers mostly imported through them
only because the path was short. Internally, knip flagged most barrel
re-exports as production-dead (only reached via tests).
This change:
- Deletes every internal barrel except `packages/cli/src/index.ts`
(the published package entry).
- Rewrites ~270 source/test files to import each name directly from
the file that defines it.
- Moves `tools/warehouse-verification/index.ts` to
`create-warehouse-verification-tools.ts` (the function it defined
locally) and updates its single consumer.
- Renames `search/backend-conformance.ts` → `.test-utils.ts` to match
the existing test-helper file convention.
- Deletes 13 dead test-only chains (dbt-descriptions/*,
live-database/extracted-schema, live-database/structural-sync,
relationship-* feedback/review chain) plus their tests and a
cascading orphan integration test.
- Updates test mocks that pointed at deleted barrel paths
(notion-client, connector barrels in scan/local-scan-connectors
tests) to mock the source files instead.
- Points the maintainer benchmark script
(`scripts/relationship-benchmark-report.mjs`) at source files
instead of `dist/context/scan/index.js`.
- Drops the barrel `!` entries from `knip.json`; adds explicit
production entries only for the benchmark code reached via dist by
the maintainer script.
Net: 413 files changed, ~1.2k insertions, ~9.4k deletions.
`pnpm run dead-code` (Biome + knip default + knip production) and
`pnpm run type-check` are clean; 2277 tests pass.
* refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly
Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.
Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
* docs: align "agent clients" and "data agents" terminology
Replace "client agents" with "agent clients" and "database agents" with
"data agents" across AGENTS.md, README.md, the docs-site copy, and the
matching setup-agents test description, matching the canonical
vocabulary in docs/terminology.md.
Also moves packages/cli/tsconfig.json's tsBuildInfoFile from
node_modules/.cache/ to dist/.tsbuildinfo so incremental builds survive
node_modules reinstalls.
* refactor(release): single source of truth for package version
Make packages/cli/package.json the single source of truth for the
@kaelio/ktx version. publicNpmPackageVersion() now reads it directly,
so artifact filenames, release-readiness checks, and the Python wheel
version all derive from one field. The duplicate
release-policy.json.publicNpmPackageVersion is removed.
Previously the two fields could drift: tarballs were named
kaelio-ktx-0.4.1.tgz while internally containing
@kaelio/ktx@0.0.0-private.
- update-public-release-version.mjs rewrites both Python pyproject.toml
files (ktx-daemon, ktx-sl) alongside the npm package.jsons,
normalizing the version for PEP 440 (e.g. 0.1.0-rc.2 -> 0.1.0rc2).
- semantic-release-config.cjs adds the two pyproject.toml files to
@semantic-release/git assets so the release commit back to main
carries every version source in lockstep.
- The six "?? '0.0.0-private'" fallback literals across the CLI are
replaced with "?? getKtxCliPackageInfo().version", and
createDefaultKtxMcpServer makes its version arg required.
- docs/release.md describes the actual commit-back model: the dev tree
always reflects the most recent release; no sentinel pin to
maintain.
Verified: pnpm run artifacts:build now produces
kaelio-ktx-0.4.1.tgz and kaelio_ktx-0.4.1-py3-none-any.whl with
@kaelio/ktx@0.4.1 inside. Full type-check, dead-code, and
2287 vitests + 173 script tests pass.
* refactor(cli): inject embedding provider resolution and detect sentence-transformers runtime
Make resolveProjectEmbeddingProvider and runtimeIo injectable in ingest and
scan command entrypoints so tests can stub them, and teach
resolvePublicIngestRuntimeRequirements to flag the local-embeddings runtime
feature when ktx.yaml selects sentence-transformers.
* chore(cli): mark buildLocalStatsStatus and LocalStatsStatus as @internal
Both symbols are consumed only by status-project.test.ts. Annotating with
/** @internal */ keeps knip's production-mode check clean without changing
runtime behavior.
* fix(cli): use real package metadata in print-command-tree
The stubbed package name embedded a forbidden product identifier that
tripped the boundary check in CI. Read the metadata from package.json
instead — keeps the rendered tree unchanged and removes a duplicate
source of truth.
* feat(cli): show embedding coverage in `ktx status`, drop duplicate disk counts
Inline `(N embedded)` next to the Wiki scope counts and Semantic-layer
source counts, computed with `SUM(embedding_json IS NOT NULL)` over
`knowledge_pages` and `local_sl_sources`. Rename the "Knowledge" label to
"Wiki" (canonical per `docs/terminology.md`) and rename the matching
`localStats.knowledgePages` field to `localStats.wikiPages`.
Drop `wiki=N md` and `semantic-layer=N yaml` from the Disk row — those
duplicated the per-surface rows above. Disk now reports only actual byte
usage (db, cache, raw-sources). The unused `wikiGlobalMarkdownCount` /
`semanticLayerYamlCount` fields, the `isMarkdownEntry` / `isYamlEntry`
helpers, and the `filter` arg on `summarizeDir` are removed.
2026-05-21 15:28:58 +02:00
|
|
|
import { PUBLIC_NPM_PACKAGE_VERSION } from './public-npm-release-metadata.mjs';
|
2026-05-10 23:12:26 +02:00
|
|
|
import {
|
2026-05-11 15:50:34 +02:00
|
|
|
CLI_PYTHON_ASSET_MANIFEST,
|
|
|
|
|
RUNTIME_WHEEL_DISTRIBUTION_NAME,
|
|
|
|
|
RUNTIME_WHEEL_NORMALIZED_NAME,
|
|
|
|
|
RUNTIME_WHEEL_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
artifactManifestPath,
|
|
|
|
|
buildArtifactCommands,
|
2026-05-11 15:50:34 +02:00
|
|
|
copyRuntimeWheelAssets,
|
2026-05-10 23:12:26 +02:00
|
|
|
findPythonArtifacts,
|
|
|
|
|
NPM_ARTIFACT_PACKAGES,
|
2026-05-13 00:38:26 +02:00
|
|
|
npmCliSmokeSource,
|
2026-05-10 23:12:26 +02:00
|
|
|
npmRuntimeSmokeSource,
|
|
|
|
|
npmSmokePackageJson,
|
2026-05-13 01:15:35 +02:00
|
|
|
npmSmokePnpmWorkspaceYaml,
|
2026-05-10 23:12:26 +02:00
|
|
|
npmVerifySource,
|
|
|
|
|
packageArtifactLayout,
|
|
|
|
|
packageReleaseMetadata,
|
|
|
|
|
verifyArtifactManifest,
|
|
|
|
|
writeArtifactManifest,
|
|
|
|
|
} from './package-artifacts.mjs';
|
|
|
|
|
|
|
|
|
|
async function writeJson(path, value) {
|
|
|
|
|
await writeFile(path, `${JSON.stringify(value, null, 2)}\n`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function writeReleaseMetadataInputs(root) {
|
2026-05-16 12:06:34 +02:00
|
|
|
await writeJson(join(root, 'release-policy.json'), {
|
|
|
|
|
schemaVersion: 1,
|
|
|
|
|
releaseMode: 'ci-artifact-only',
|
|
|
|
|
npm: {
|
|
|
|
|
publish: false,
|
|
|
|
|
registry: null,
|
|
|
|
|
access: 'public',
|
|
|
|
|
tag: 'next',
|
|
|
|
|
packages: ['@kaelio/ktx'],
|
|
|
|
|
},
|
|
|
|
|
python: {
|
|
|
|
|
publish: false,
|
|
|
|
|
repository: null,
|
|
|
|
|
packages: ['kaelio-ktx'],
|
|
|
|
|
},
|
|
|
|
|
publishedPackageSmoke: {
|
|
|
|
|
packageName: '@kaelio/ktx',
|
|
|
|
|
version: PUBLIC_NPM_PACKAGE_VERSION,
|
|
|
|
|
registry: null,
|
|
|
|
|
},
|
|
|
|
|
runtimeInstaller: {
|
|
|
|
|
uvStrategy: 'path-prerequisite',
|
|
|
|
|
bootstrapUv: false,
|
|
|
|
|
missingUvBehavior: 'focused-error',
|
|
|
|
|
},
|
|
|
|
|
requiredBeforePublishing: ['Choose public release version.'],
|
|
|
|
|
});
|
|
|
|
|
|
chore(workspace): gate dead-code with knip production mode (#196)
* refactor(workspace): relocate @ktx/llm source into packages/cli/src/llm
* refactor(workspace): rewrite @ktx/llm imports to relative paths
* refactor(workspace): fold internal packages into cli
* chore(workspace): gate dead-code with knip production mode
Turn on production-mode knip plus an autofix run in pre-commit and the
`pnpm dead-code` script, document the `/** @internal */` convention for
test-only exports in AGENTS.md, annotate test-only exports across the
CLI with that JSDoc, and drop dead exports/wrappers the new gate
surfaced (e.g. `cli-project.ts`, `lookerRuntimeSourceToFileAdapterSource`,
`createLocalScanEnrichmentProvidersFromConfig`,
`PGLITE_OWNER_PROCESS_BACKEND_CAPABILITIES`, stale type re-exports).
Replace the loose `ignoreIssues` allowlist in `knip.json` with explicit
production entries so cross-package barrel leaks are caught.
* refactor(cli): delete internal barrel index.ts files
The 34 `index.ts` re-export barrels inside `packages/cli/src/` were
holdovers from the pre-fold multi-workspace structure. Post-fold-in they
served no production purpose: external consumers go through the single
package main entry, and in-repo callers mostly imported through them
only because the path was short. Internally, knip flagged most barrel
re-exports as production-dead (only reached via tests).
This change:
- Deletes every internal barrel except `packages/cli/src/index.ts`
(the published package entry).
- Rewrites ~270 source/test files to import each name directly from
the file that defines it.
- Moves `tools/warehouse-verification/index.ts` to
`create-warehouse-verification-tools.ts` (the function it defined
locally) and updates its single consumer.
- Renames `search/backend-conformance.ts` → `.test-utils.ts` to match
the existing test-helper file convention.
- Deletes 13 dead test-only chains (dbt-descriptions/*,
live-database/extracted-schema, live-database/structural-sync,
relationship-* feedback/review chain) plus their tests and a
cascading orphan integration test.
- Updates test mocks that pointed at deleted barrel paths
(notion-client, connector barrels in scan/local-scan-connectors
tests) to mock the source files instead.
- Points the maintainer benchmark script
(`scripts/relationship-benchmark-report.mjs`) at source files
instead of `dist/context/scan/index.js`.
- Drops the barrel `!` entries from `knip.json`; adds explicit
production entries only for the benchmark code reached via dist by
the maintainer script.
Net: 413 files changed, ~1.2k insertions, ~9.4k deletions.
`pnpm run dead-code` (Biome + knip default + knip production) and
`pnpm run type-check` are clean; 2277 tests pass.
* refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly
Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.
Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
* docs: align "agent clients" and "data agents" terminology
Replace "client agents" with "agent clients" and "database agents" with
"data agents" across AGENTS.md, README.md, the docs-site copy, and the
matching setup-agents test description, matching the canonical
vocabulary in docs/terminology.md.
Also moves packages/cli/tsconfig.json's tsBuildInfoFile from
node_modules/.cache/ to dist/.tsbuildinfo so incremental builds survive
node_modules reinstalls.
* refactor(release): single source of truth for package version
Make packages/cli/package.json the single source of truth for the
@kaelio/ktx version. publicNpmPackageVersion() now reads it directly,
so artifact filenames, release-readiness checks, and the Python wheel
version all derive from one field. The duplicate
release-policy.json.publicNpmPackageVersion is removed.
Previously the two fields could drift: tarballs were named
kaelio-ktx-0.4.1.tgz while internally containing
@kaelio/ktx@0.0.0-private.
- update-public-release-version.mjs rewrites both Python pyproject.toml
files (ktx-daemon, ktx-sl) alongside the npm package.jsons,
normalizing the version for PEP 440 (e.g. 0.1.0-rc.2 -> 0.1.0rc2).
- semantic-release-config.cjs adds the two pyproject.toml files to
@semantic-release/git assets so the release commit back to main
carries every version source in lockstep.
- The six "?? '0.0.0-private'" fallback literals across the CLI are
replaced with "?? getKtxCliPackageInfo().version", and
createDefaultKtxMcpServer makes its version arg required.
- docs/release.md describes the actual commit-back model: the dev tree
always reflects the most recent release; no sentinel pin to
maintain.
Verified: pnpm run artifacts:build now produces
kaelio-ktx-0.4.1.tgz and kaelio_ktx-0.4.1-py3-none-any.whl with
@kaelio/ktx@0.4.1 inside. Full type-check, dead-code, and
2287 vitests + 173 script tests pass.
* refactor(cli): inject embedding provider resolution and detect sentence-transformers runtime
Make resolveProjectEmbeddingProvider and runtimeIo injectable in ingest and
scan command entrypoints so tests can stub them, and teach
resolvePublicIngestRuntimeRequirements to flag the local-embeddings runtime
feature when ktx.yaml selects sentence-transformers.
* chore(cli): mark buildLocalStatsStatus and LocalStatsStatus as @internal
Both symbols are consumed only by status-project.test.ts. Annotating with
/** @internal */ keeps knip's production-mode check clean without changing
runtime behavior.
* fix(cli): use real package metadata in print-command-tree
The stubbed package name embedded a forbidden product identifier that
tripped the boundary check in CI. Read the metadata from package.json
instead — keeps the rendered tree unchanged and removes a duplicate
source of truth.
* feat(cli): show embedding coverage in `ktx status`, drop duplicate disk counts
Inline `(N embedded)` next to the Wiki scope counts and Semantic-layer
source counts, computed with `SUM(embedding_json IS NOT NULL)` over
`knowledge_pages` and `local_sl_sources`. Rename the "Knowledge" label to
"Wiki" (canonical per `docs/terminology.md`) and rename the matching
`localStats.knowledgePages` field to `localStats.wikiPages`.
Drop `wiki=N md` and `semantic-layer=N yaml` from the Disk row — those
duplicated the per-surface rows above. Disk now reports only actual byte
usage (db, cache, raw-sources). The unused `wikiGlobalMarkdownCount` /
`semanticLayerYamlCount` fields, the `isMarkdownEntry` / `isYamlEntry`
helpers, and the `filter` arg on `summarizeDir` are removed.
2026-05-21 15:28:58 +02:00
|
|
|
for (const packageInfo of NPM_ARTIFACT_PACKAGES) {
|
2026-05-11 15:50:34 +02:00
|
|
|
await mkdir(join(root, packageInfo.packageRoot), { recursive: true });
|
|
|
|
|
await writeJson(join(root, packageInfo.packageRoot, 'package.json'), {
|
|
|
|
|
name: packageInfo.name,
|
chore(workspace): gate dead-code with knip production mode (#196)
* refactor(workspace): relocate @ktx/llm source into packages/cli/src/llm
* refactor(workspace): rewrite @ktx/llm imports to relative paths
* refactor(workspace): fold internal packages into cli
* chore(workspace): gate dead-code with knip production mode
Turn on production-mode knip plus an autofix run in pre-commit and the
`pnpm dead-code` script, document the `/** @internal */` convention for
test-only exports in AGENTS.md, annotate test-only exports across the
CLI with that JSDoc, and drop dead exports/wrappers the new gate
surfaced (e.g. `cli-project.ts`, `lookerRuntimeSourceToFileAdapterSource`,
`createLocalScanEnrichmentProvidersFromConfig`,
`PGLITE_OWNER_PROCESS_BACKEND_CAPABILITIES`, stale type re-exports).
Replace the loose `ignoreIssues` allowlist in `knip.json` with explicit
production entries so cross-package barrel leaks are caught.
* refactor(cli): delete internal barrel index.ts files
The 34 `index.ts` re-export barrels inside `packages/cli/src/` were
holdovers from the pre-fold multi-workspace structure. Post-fold-in they
served no production purpose: external consumers go through the single
package main entry, and in-repo callers mostly imported through them
only because the path was short. Internally, knip flagged most barrel
re-exports as production-dead (only reached via tests).
This change:
- Deletes every internal barrel except `packages/cli/src/index.ts`
(the published package entry).
- Rewrites ~270 source/test files to import each name directly from
the file that defines it.
- Moves `tools/warehouse-verification/index.ts` to
`create-warehouse-verification-tools.ts` (the function it defined
locally) and updates its single consumer.
- Renames `search/backend-conformance.ts` → `.test-utils.ts` to match
the existing test-helper file convention.
- Deletes 13 dead test-only chains (dbt-descriptions/*,
live-database/extracted-schema, live-database/structural-sync,
relationship-* feedback/review chain) plus their tests and a
cascading orphan integration test.
- Updates test mocks that pointed at deleted barrel paths
(notion-client, connector barrels in scan/local-scan-connectors
tests) to mock the source files instead.
- Points the maintainer benchmark script
(`scripts/relationship-benchmark-report.mjs`) at source files
instead of `dist/context/scan/index.js`.
- Drops the barrel `!` entries from `knip.json`; adds explicit
production entries only for the benchmark code reached via dist by
the maintainer script.
Net: 413 files changed, ~1.2k insertions, ~9.4k deletions.
`pnpm run dead-code` (Biome + knip default + knip production) and
`pnpm run type-check` are clean; 2277 tests pass.
* refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly
Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.
Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
* docs: align "agent clients" and "data agents" terminology
Replace "client agents" with "agent clients" and "database agents" with
"data agents" across AGENTS.md, README.md, the docs-site copy, and the
matching setup-agents test description, matching the canonical
vocabulary in docs/terminology.md.
Also moves packages/cli/tsconfig.json's tsBuildInfoFile from
node_modules/.cache/ to dist/.tsbuildinfo so incremental builds survive
node_modules reinstalls.
* refactor(release): single source of truth for package version
Make packages/cli/package.json the single source of truth for the
@kaelio/ktx version. publicNpmPackageVersion() now reads it directly,
so artifact filenames, release-readiness checks, and the Python wheel
version all derive from one field. The duplicate
release-policy.json.publicNpmPackageVersion is removed.
Previously the two fields could drift: tarballs were named
kaelio-ktx-0.4.1.tgz while internally containing
@kaelio/ktx@0.0.0-private.
- update-public-release-version.mjs rewrites both Python pyproject.toml
files (ktx-daemon, ktx-sl) alongside the npm package.jsons,
normalizing the version for PEP 440 (e.g. 0.1.0-rc.2 -> 0.1.0rc2).
- semantic-release-config.cjs adds the two pyproject.toml files to
@semantic-release/git assets so the release commit back to main
carries every version source in lockstep.
- The six "?? '0.0.0-private'" fallback literals across the CLI are
replaced with "?? getKtxCliPackageInfo().version", and
createDefaultKtxMcpServer makes its version arg required.
- docs/release.md describes the actual commit-back model: the dev tree
always reflects the most recent release; no sentinel pin to
maintain.
Verified: pnpm run artifacts:build now produces
kaelio-ktx-0.4.1.tgz and kaelio_ktx-0.4.1-py3-none-any.whl with
@kaelio/ktx@0.4.1 inside. Full type-check, dead-code, and
2287 vitests + 173 script tests pass.
* refactor(cli): inject embedding provider resolution and detect sentence-transformers runtime
Make resolveProjectEmbeddingProvider and runtimeIo injectable in ingest and
scan command entrypoints so tests can stub them, and teach
resolvePublicIngestRuntimeRequirements to flag the local-embeddings runtime
feature when ktx.yaml selects sentence-transformers.
* chore(cli): mark buildLocalStatsStatus and LocalStatsStatus as @internal
Both symbols are consumed only by status-project.test.ts. Annotating with
/** @internal */ keeps knip's production-mode check clean without changing
runtime behavior.
* fix(cli): use real package metadata in print-command-tree
The stubbed package name embedded a forbidden product identifier that
tripped the boundary check in CI. Read the metadata from package.json
instead — keeps the rendered tree unchanged and removes a duplicate
source of truth.
* feat(cli): show embedding coverage in `ktx status`, drop duplicate disk counts
Inline `(N embedded)` next to the Wiki scope counts and Semantic-layer
source counts, computed with `SUM(embedding_json IS NOT NULL)` over
`knowledge_pages` and `local_sl_sources`. Rename the "Knowledge" label to
"Wiki" (canonical per `docs/terminology.md`) and rename the matching
`localStats.knowledgePages` field to `localStats.wikiPages`.
Drop `wiki=N md` and `semantic-layer=N yaml` from the Disk row — those
duplicated the per-surface rows above. Disk now reports only actual byte
usage (db, cache, raw-sources). The unused `wikiGlobalMarkdownCount` /
`semanticLayerYamlCount` fields, the `isMarkdownEntry` / `isYamlEntry`
helpers, and the `filter` arg on `summarizeDir` are removed.
2026-05-21 15:28:58 +02:00
|
|
|
version: PUBLIC_NPM_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
function runtimeWheelFilename(version = RUNTIME_WHEEL_PACKAGE_VERSION) {
|
|
|
|
|
return `kaelio_ktx-${version}-py3-none-any.whl`;
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-10 23:12:26 +02:00
|
|
|
async function writeUploadableArtifactFixtures(layout) {
|
|
|
|
|
await mkdir(layout.npmDir, { recursive: true });
|
|
|
|
|
await mkdir(layout.pythonDir, { recursive: true });
|
|
|
|
|
|
|
|
|
|
const fileContents = new Map([
|
|
|
|
|
...NPM_ARTIFACT_PACKAGES.map((packageInfo) => [
|
|
|
|
|
layout.npmTarballs[packageInfo.name],
|
|
|
|
|
`${packageInfo.name}-tarball`,
|
|
|
|
|
]),
|
2026-05-11 15:50:34 +02:00
|
|
|
[
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
join(layout.pythonDir, runtimeWheelFilename()),
|
2026-05-11 15:50:34 +02:00
|
|
|
'kaelio-ktx-runtime-wheel',
|
|
|
|
|
],
|
2026-05-10 23:12:26 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
for (const [path, contents] of fileContents) {
|
|
|
|
|
await writeFile(path, contents);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
describe('packageArtifactLayout', () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
it('uses stable artifact paths under ktx/dist/artifacts', () => {
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout('/repo/ktx', PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:51:24 +02:00
|
|
|
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.equal(layout.artifactDir, join('/repo/ktx', 'dist', 'artifacts'));
|
|
|
|
|
assert.equal(layout.npmDir, join('/repo/ktx', 'dist', 'artifacts', 'npm'));
|
|
|
|
|
assert.equal(layout.pythonDir, join('/repo/ktx', 'dist', 'artifacts', 'python'));
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
assert.equal(
|
|
|
|
|
layout.cliTarball,
|
2026-05-26 03:16:53 -07:00
|
|
|
join('/repo/ktx', 'dist', 'artifacts', 'npm', `kaelio-ktx-${PUBLIC_NPM_PACKAGE_VERSION}.tgz`),
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.deepEqual(Object.keys(layout.npmTarballs), ['@kaelio/ktx']);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('buildArtifactCommands', () => {
|
chore(workspace): gate dead-code with knip production mode (#196)
* refactor(workspace): relocate @ktx/llm source into packages/cli/src/llm
* refactor(workspace): rewrite @ktx/llm imports to relative paths
* refactor(workspace): fold internal packages into cli
* chore(workspace): gate dead-code with knip production mode
Turn on production-mode knip plus an autofix run in pre-commit and the
`pnpm dead-code` script, document the `/** @internal */` convention for
test-only exports in AGENTS.md, annotate test-only exports across the
CLI with that JSDoc, and drop dead exports/wrappers the new gate
surfaced (e.g. `cli-project.ts`, `lookerRuntimeSourceToFileAdapterSource`,
`createLocalScanEnrichmentProvidersFromConfig`,
`PGLITE_OWNER_PROCESS_BACKEND_CAPABILITIES`, stale type re-exports).
Replace the loose `ignoreIssues` allowlist in `knip.json` with explicit
production entries so cross-package barrel leaks are caught.
* refactor(cli): delete internal barrel index.ts files
The 34 `index.ts` re-export barrels inside `packages/cli/src/` were
holdovers from the pre-fold multi-workspace structure. Post-fold-in they
served no production purpose: external consumers go through the single
package main entry, and in-repo callers mostly imported through them
only because the path was short. Internally, knip flagged most barrel
re-exports as production-dead (only reached via tests).
This change:
- Deletes every internal barrel except `packages/cli/src/index.ts`
(the published package entry).
- Rewrites ~270 source/test files to import each name directly from
the file that defines it.
- Moves `tools/warehouse-verification/index.ts` to
`create-warehouse-verification-tools.ts` (the function it defined
locally) and updates its single consumer.
- Renames `search/backend-conformance.ts` → `.test-utils.ts` to match
the existing test-helper file convention.
- Deletes 13 dead test-only chains (dbt-descriptions/*,
live-database/extracted-schema, live-database/structural-sync,
relationship-* feedback/review chain) plus their tests and a
cascading orphan integration test.
- Updates test mocks that pointed at deleted barrel paths
(notion-client, connector barrels in scan/local-scan-connectors
tests) to mock the source files instead.
- Points the maintainer benchmark script
(`scripts/relationship-benchmark-report.mjs`) at source files
instead of `dist/context/scan/index.js`.
- Drops the barrel `!` entries from `knip.json`; adds explicit
production entries only for the benchmark code reached via dist by
the maintainer script.
Net: 413 files changed, ~1.2k insertions, ~9.4k deletions.
`pnpm run dead-code` (Biome + knip default + knip production) and
`pnpm run type-check` are clean; 2277 tests pass.
* refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly
Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.
Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
* docs: align "agent clients" and "data agents" terminology
Replace "client agents" with "agent clients" and "database agents" with
"data agents" across AGENTS.md, README.md, the docs-site copy, and the
matching setup-agents test description, matching the canonical
vocabulary in docs/terminology.md.
Also moves packages/cli/tsconfig.json's tsBuildInfoFile from
node_modules/.cache/ to dist/.tsbuildinfo so incremental builds survive
node_modules reinstalls.
* refactor(release): single source of truth for package version
Make packages/cli/package.json the single source of truth for the
@kaelio/ktx version. publicNpmPackageVersion() now reads it directly,
so artifact filenames, release-readiness checks, and the Python wheel
version all derive from one field. The duplicate
release-policy.json.publicNpmPackageVersion is removed.
Previously the two fields could drift: tarballs were named
kaelio-ktx-0.4.1.tgz while internally containing
@kaelio/ktx@0.0.0-private.
- update-public-release-version.mjs rewrites both Python pyproject.toml
files (ktx-daemon, ktx-sl) alongside the npm package.jsons,
normalizing the version for PEP 440 (e.g. 0.1.0-rc.2 -> 0.1.0rc2).
- semantic-release-config.cjs adds the two pyproject.toml files to
@semantic-release/git assets so the release commit back to main
carries every version source in lockstep.
- The six "?? '0.0.0-private'" fallback literals across the CLI are
replaced with "?? getKtxCliPackageInfo().version", and
createDefaultKtxMcpServer makes its version arg required.
- docs/release.md describes the actual commit-back model: the dev tree
always reflects the most recent release; no sentinel pin to
maintain.
Verified: pnpm run artifacts:build now produces
kaelio-ktx-0.4.1.tgz and kaelio_ktx-0.4.1-py3-none-any.whl with
@kaelio/ktx@0.4.1 inside. Full type-check, dead-code, and
2287 vitests + 173 script tests pass.
* refactor(cli): inject embedding provider resolution and detect sentence-transformers runtime
Make resolveProjectEmbeddingProvider and runtimeIo injectable in ingest and
scan command entrypoints so tests can stub them, and teach
resolvePublicIngestRuntimeRequirements to flag the local-embeddings runtime
feature when ktx.yaml selects sentence-transformers.
* chore(cli): mark buildLocalStatsStatus and LocalStatsStatus as @internal
Both symbols are consumed only by status-project.test.ts. Annotating with
/** @internal */ keeps knip's production-mode check clean without changing
runtime behavior.
* fix(cli): use real package metadata in print-command-tree
The stubbed package name embedded a forbidden product identifier that
tripped the boundary check in CI. Read the metadata from package.json
instead — keeps the rendered tree unchanged and removes a duplicate
source of truth.
* feat(cli): show embedding coverage in `ktx status`, drop duplicate disk counts
Inline `(N embedded)` next to the Wiki scope counts and Semantic-layer
source counts, computed with `SUM(embedding_json IS NOT NULL)` over
`knowledge_pages` and `local_sl_sources`. Rename the "Knowledge" label to
"Wiki" (canonical per `docs/terminology.md`) and rename the matching
`localStats.knowledgePages` field to `localStats.wikiPages`.
Drop `wiki=N md` and `semantic-layer=N yaml` from the Disk row — those
duplicated the per-surface rows above. Disk now reports only actual byte
usage (db, cache, raw-sources). The unused `wikiGlobalMarkdownCount` /
`semanticLayerYamlCount` fields, the `isMarkdownEntry` / `isYamlEntry`
helpers, and the `filter` arg on `summarizeDir` are removed.
2026-05-21 15:28:58 +02:00
|
|
|
it('builds the CLI package, then the runtime wheel, then packs the npm tarball directly', () => {
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout('/repo/ktx', PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
const commands = buildArtifactCommands(layout);
|
2026-05-26 03:16:53 -07:00
|
|
|
const expectedBuildCommand =
|
|
|
|
|
process.platform === 'win32'
|
|
|
|
|
? ['cmd.exe', ['/d', '/s', '/c', 'pnpm', '--filter', '@kaelio/ktx', 'run', 'build'], layout.rootDir]
|
|
|
|
|
: ['pnpm', ['--filter', '@kaelio/ktx', 'run', 'build'], layout.rootDir];
|
|
|
|
|
const expectedPackCommand =
|
|
|
|
|
process.platform === 'win32'
|
|
|
|
|
? ['cmd.exe', ['/d', '/s', '/c', 'pnpm', 'pack', '--out', layout.cliTarball], join('/repo/ktx', 'packages', 'cli')]
|
|
|
|
|
: ['pnpm', ['pack', '--out', layout.cliTarball], join('/repo/ktx', 'packages', 'cli')];
|
2026-05-10 23:12:26 +02:00
|
|
|
|
|
|
|
|
assert.deepEqual(
|
chore(workspace): gate dead-code with knip production mode (#196)
* refactor(workspace): relocate @ktx/llm source into packages/cli/src/llm
* refactor(workspace): rewrite @ktx/llm imports to relative paths
* refactor(workspace): fold internal packages into cli
* chore(workspace): gate dead-code with knip production mode
Turn on production-mode knip plus an autofix run in pre-commit and the
`pnpm dead-code` script, document the `/** @internal */` convention for
test-only exports in AGENTS.md, annotate test-only exports across the
CLI with that JSDoc, and drop dead exports/wrappers the new gate
surfaced (e.g. `cli-project.ts`, `lookerRuntimeSourceToFileAdapterSource`,
`createLocalScanEnrichmentProvidersFromConfig`,
`PGLITE_OWNER_PROCESS_BACKEND_CAPABILITIES`, stale type re-exports).
Replace the loose `ignoreIssues` allowlist in `knip.json` with explicit
production entries so cross-package barrel leaks are caught.
* refactor(cli): delete internal barrel index.ts files
The 34 `index.ts` re-export barrels inside `packages/cli/src/` were
holdovers from the pre-fold multi-workspace structure. Post-fold-in they
served no production purpose: external consumers go through the single
package main entry, and in-repo callers mostly imported through them
only because the path was short. Internally, knip flagged most barrel
re-exports as production-dead (only reached via tests).
This change:
- Deletes every internal barrel except `packages/cli/src/index.ts`
(the published package entry).
- Rewrites ~270 source/test files to import each name directly from
the file that defines it.
- Moves `tools/warehouse-verification/index.ts` to
`create-warehouse-verification-tools.ts` (the function it defined
locally) and updates its single consumer.
- Renames `search/backend-conformance.ts` → `.test-utils.ts` to match
the existing test-helper file convention.
- Deletes 13 dead test-only chains (dbt-descriptions/*,
live-database/extracted-schema, live-database/structural-sync,
relationship-* feedback/review chain) plus their tests and a
cascading orphan integration test.
- Updates test mocks that pointed at deleted barrel paths
(notion-client, connector barrels in scan/local-scan-connectors
tests) to mock the source files instead.
- Points the maintainer benchmark script
(`scripts/relationship-benchmark-report.mjs`) at source files
instead of `dist/context/scan/index.js`.
- Drops the barrel `!` entries from `knip.json`; adds explicit
production entries only for the benchmark code reached via dist by
the maintainer script.
Net: 413 files changed, ~1.2k insertions, ~9.4k deletions.
`pnpm run dead-code` (Biome + knip default + knip production) and
`pnpm run type-check` are clean; 2277 tests pass.
* refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly
Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.
Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
* docs: align "agent clients" and "data agents" terminology
Replace "client agents" with "agent clients" and "database agents" with
"data agents" across AGENTS.md, README.md, the docs-site copy, and the
matching setup-agents test description, matching the canonical
vocabulary in docs/terminology.md.
Also moves packages/cli/tsconfig.json's tsBuildInfoFile from
node_modules/.cache/ to dist/.tsbuildinfo so incremental builds survive
node_modules reinstalls.
* refactor(release): single source of truth for package version
Make packages/cli/package.json the single source of truth for the
@kaelio/ktx version. publicNpmPackageVersion() now reads it directly,
so artifact filenames, release-readiness checks, and the Python wheel
version all derive from one field. The duplicate
release-policy.json.publicNpmPackageVersion is removed.
Previously the two fields could drift: tarballs were named
kaelio-ktx-0.4.1.tgz while internally containing
@kaelio/ktx@0.0.0-private.
- update-public-release-version.mjs rewrites both Python pyproject.toml
files (ktx-daemon, ktx-sl) alongside the npm package.jsons,
normalizing the version for PEP 440 (e.g. 0.1.0-rc.2 -> 0.1.0rc2).
- semantic-release-config.cjs adds the two pyproject.toml files to
@semantic-release/git assets so the release commit back to main
carries every version source in lockstep.
- The six "?? '0.0.0-private'" fallback literals across the CLI are
replaced with "?? getKtxCliPackageInfo().version", and
createDefaultKtxMcpServer makes its version arg required.
- docs/release.md describes the actual commit-back model: the dev tree
always reflects the most recent release; no sentinel pin to
maintain.
Verified: pnpm run artifacts:build now produces
kaelio-ktx-0.4.1.tgz and kaelio_ktx-0.4.1-py3-none-any.whl with
@kaelio/ktx@0.4.1 inside. Full type-check, dead-code, and
2287 vitests + 173 script tests pass.
* refactor(cli): inject embedding provider resolution and detect sentence-transformers runtime
Make resolveProjectEmbeddingProvider and runtimeIo injectable in ingest and
scan command entrypoints so tests can stub them, and teach
resolvePublicIngestRuntimeRequirements to flag the local-embeddings runtime
feature when ktx.yaml selects sentence-transformers.
* chore(cli): mark buildLocalStatsStatus and LocalStatsStatus as @internal
Both symbols are consumed only by status-project.test.ts. Annotating with
/** @internal */ keeps knip's production-mode check clean without changing
runtime behavior.
* fix(cli): use real package metadata in print-command-tree
The stubbed package name embedded a forbidden product identifier that
tripped the boundary check in CI. Read the metadata from package.json
instead — keeps the rendered tree unchanged and removes a duplicate
source of truth.
* feat(cli): show embedding coverage in `ktx status`, drop duplicate disk counts
Inline `(N embedded)` next to the Wiki scope counts and Semantic-layer
source counts, computed with `SUM(embedding_json IS NOT NULL)` over
`knowledge_pages` and `local_sl_sources`. Rename the "Knowledge" label to
"Wiki" (canonical per `docs/terminology.md`) and rename the matching
`localStats.knowledgePages` field to `localStats.wikiPages`.
Drop `wiki=N md` and `semantic-layer=N yaml` from the Disk row — those
duplicated the per-surface rows above. Disk now reports only actual byte
usage (db, cache, raw-sources). The unused `wikiGlobalMarkdownCount` /
`semanticLayerYamlCount` fields, the `isMarkdownEntry` / `isYamlEntry`
helpers, and the `filter` arg on `summarizeDir` are removed.
2026-05-21 15:28:58 +02:00
|
|
|
commands.map((command) => [command.command, command.args, command.cwd]),
|
2026-05-15 12:06:37 +02:00
|
|
|
[
|
2026-05-26 03:16:53 -07:00
|
|
|
expectedBuildCommand,
|
|
|
|
|
[process.execPath, ['scripts/build-python-runtime-wheel.mjs'], layout.rootDir],
|
|
|
|
|
expectedPackCommand,
|
2026-05-15 12:06:37 +02:00
|
|
|
],
|
2026-05-10 23:12:26 +02:00
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('packageReleaseMetadata', () => {
|
|
|
|
|
it('reads package identities and versions from package manifests', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-release-metadata-test-'));
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
|
|
|
|
|
assert.deepEqual(await packageReleaseMetadata(root), [
|
|
|
|
|
{
|
2026-05-11 15:50:34 +02:00
|
|
|
ecosystem: 'npm',
|
|
|
|
|
packageName: '@kaelio/ktx',
|
|
|
|
|
packageRoot: 'packages/cli',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: PUBLIC_NPM_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
private: false,
|
|
|
|
|
releaseMode: 'ci-artifact-only',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ecosystem: 'python',
|
2026-05-11 15:50:34 +02:00
|
|
|
packageName: 'kaelio-ktx',
|
|
|
|
|
packageRoot: 'python/runtime-wheel',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: RUNTIME_WHEEL_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
private: false,
|
|
|
|
|
releaseMode: 'ci-artifact-only',
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('findPythonArtifacts', () => {
|
2026-05-11 15:50:34 +02:00
|
|
|
it('finds the bundled runtime wheel only', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-test-'));
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
await writeFile(join(root, runtimeWheelFilename()), '');
|
2026-05-10 23:12:26 +02:00
|
|
|
|
|
|
|
|
assert.deepEqual(await findPythonArtifacts(root), {
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
runtimeWheel: join(root, runtimeWheelFilename()),
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('throws when a required Python artifact is missing', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-test-'));
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
2026-05-20 01:36:54 +02:00
|
|
|
await assert.rejects(() => findPythonArtifacts(root), /Missing Python artifact: kaelio-ktx runtime wheel/);
|
2026-05-10 23:12:26 +02:00
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('artifact manifest', () => {
|
|
|
|
|
it('writes release metadata, source revision, checksums, and byte counts for every uploadable artifact', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-manifest-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
await writeUploadableArtifactFixtures(layout);
|
|
|
|
|
|
|
|
|
|
const manifest = await writeArtifactManifest(layout, new Date('2026-04-28T12:00:00.000Z'), {
|
|
|
|
|
sourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assert.equal(artifactManifestPath(layout), join(root, 'dist', 'artifacts', 'manifest.json'));
|
|
|
|
|
assert.equal(manifest.schemaVersion, 2);
|
|
|
|
|
assert.equal(manifest.generatedAt, '2026-04-28T12:00:00.000Z');
|
|
|
|
|
assert.equal(manifest.sourceRevision, 'abc123');
|
|
|
|
|
assert.deepEqual(
|
|
|
|
|
manifest.packages.filter((entry) => entry.ecosystem === 'npm'),
|
|
|
|
|
[
|
|
|
|
|
{
|
2026-05-11 15:50:34 +02:00
|
|
|
ecosystem: 'npm',
|
|
|
|
|
packageName: '@kaelio/ktx',
|
|
|
|
|
packageRoot: 'packages/cli',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: PUBLIC_NPM_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
private: false,
|
|
|
|
|
releaseMode: 'ci-artifact-only',
|
|
|
|
|
},
|
2026-05-11 15:50:34 +02:00
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
assert.deepEqual(
|
|
|
|
|
manifest.packages.filter((entry) => entry.ecosystem === 'python'),
|
|
|
|
|
[
|
2026-05-10 23:12:26 +02:00
|
|
|
{
|
|
|
|
|
ecosystem: 'python',
|
2026-05-11 15:50:34 +02:00
|
|
|
packageName: 'kaelio-ktx',
|
|
|
|
|
packageRoot: 'python/runtime-wheel',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: RUNTIME_WHEEL_PACKAGE_VERSION,
|
2026-05-10 23:12:26 +02:00
|
|
|
private: false,
|
|
|
|
|
releaseMode: 'ci-artifact-only',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
assert.deepEqual(
|
|
|
|
|
manifest.files
|
|
|
|
|
.filter((file) => file.ecosystem === 'npm')
|
|
|
|
|
.map((file) => ({
|
|
|
|
|
artifactKind: file.artifactKind,
|
|
|
|
|
ecosystem: file.ecosystem,
|
|
|
|
|
packageName: file.packageName,
|
|
|
|
|
packageVersion: file.packageVersion,
|
|
|
|
|
path: file.path,
|
|
|
|
|
}))
|
|
|
|
|
.sort((left, right) => left.packageName.localeCompare(right.packageName)),
|
2026-05-11 15:50:34 +02:00
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
artifactKind: 'tarball',
|
|
|
|
|
ecosystem: 'npm',
|
|
|
|
|
packageName: '@kaelio/ktx',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: PUBLIC_NPM_PACKAGE_VERSION,
|
|
|
|
|
path: `npm/kaelio-ktx-${PUBLIC_NPM_PACKAGE_VERSION}.tgz`,
|
2026-05-11 15:50:34 +02:00
|
|
|
},
|
|
|
|
|
],
|
2026-05-10 23:12:26 +02:00
|
|
|
);
|
|
|
|
|
assert.deepEqual(
|
|
|
|
|
manifest.files
|
|
|
|
|
.filter((file) => file.ecosystem === 'python')
|
|
|
|
|
.map((file) => ({
|
|
|
|
|
artifactKind: file.artifactKind,
|
|
|
|
|
ecosystem: file.ecosystem,
|
|
|
|
|
packageName: file.packageName,
|
|
|
|
|
packageVersion: file.packageVersion,
|
|
|
|
|
path: file.path,
|
|
|
|
|
})),
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
artifactKind: 'wheel',
|
|
|
|
|
ecosystem: 'python',
|
2026-05-11 15:50:34 +02:00
|
|
|
packageName: 'kaelio-ktx',
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
packageVersion: RUNTIME_WHEEL_PACKAGE_VERSION,
|
|
|
|
|
path: `python/${runtimeWheelFilename()}`,
|
2026-05-10 23:12:26 +02:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
const npmEntry = manifest.files.find(
|
|
|
|
|
(file) => file.path === `npm/kaelio-ktx-${PUBLIC_NPM_PACKAGE_VERSION}.tgz`,
|
|
|
|
|
);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.ok(npmEntry);
|
|
|
|
|
assert.equal(npmEntry.bytes, Buffer.byteLength('@kaelio/ktx-tarball'));
|
|
|
|
|
assert.equal(npmEntry.sha256, createHash('sha256').update('@kaelio/ktx-tarball').digest('hex'));
|
2026-05-10 23:12:26 +02:00
|
|
|
|
|
|
|
|
const writtenManifest = JSON.parse(await readFile(artifactManifestPath(layout), 'utf-8'));
|
|
|
|
|
assert.deepEqual(writtenManifest, manifest);
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('verifyArtifactManifest', () => {
|
|
|
|
|
it('accepts a schema version 2 manifest that matches the artifact directory', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-verify-manifest-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
await writeUploadableArtifactFixtures(layout);
|
|
|
|
|
await writeArtifactManifest(layout, new Date('2026-04-28T12:00:00.000Z'), {
|
|
|
|
|
sourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const manifest = await verifyArtifactManifest(layout, {
|
|
|
|
|
expectedSourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assert.equal(manifest.schemaVersion, 2);
|
|
|
|
|
assert.equal(manifest.sourceRevision, 'abc123');
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.equal(manifest.files.length, NPM_ARTIFACT_PACKAGES.length + 1);
|
2026-05-10 23:12:26 +02:00
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('rejects a manifest when a file checksum has drifted', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-checksum-drift-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
await writeUploadableArtifactFixtures(layout);
|
|
|
|
|
await writeArtifactManifest(layout, new Date('2026-04-28T12:00:00.000Z'), {
|
|
|
|
|
sourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
await writeFile(layout.contextTarball, 'changed-context-tarball');
|
|
|
|
|
|
|
|
|
|
await assert.rejects(
|
|
|
|
|
() => verifyArtifactManifest(layout),
|
|
|
|
|
/Artifact manifest files do not match artifact contents/,
|
|
|
|
|
);
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('rejects a manifest with an unsafe artifact path', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-path-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
await writeUploadableArtifactFixtures(layout);
|
|
|
|
|
const manifest = await writeArtifactManifest(layout, new Date('2026-04-28T12:00:00.000Z'), {
|
|
|
|
|
sourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
manifest.files[0].path = '../outside.tgz';
|
|
|
|
|
await writeFile(artifactManifestPath(layout), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
|
|
|
|
|
|
|
|
await assert.rejects(() => verifyArtifactManifest(layout), /Unsafe artifact manifest path: \.\.\/outside\.tgz/);
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('rejects a manifest from the wrong source revision when one is required', async () => {
|
2026-05-10 23:51:24 +02:00
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-artifacts-revision-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
try {
|
|
|
|
|
await writeReleaseMetadataInputs(root);
|
|
|
|
|
await writeUploadableArtifactFixtures(layout);
|
|
|
|
|
await writeArtifactManifest(layout, new Date('2026-04-28T12:00:00.000Z'), {
|
|
|
|
|
sourceRevision: 'abc123',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
await assert.rejects(
|
|
|
|
|
() =>
|
|
|
|
|
verifyArtifactManifest(layout, {
|
|
|
|
|
expectedSourceRevision: 'def456',
|
|
|
|
|
}),
|
|
|
|
|
/Artifact manifest sourceRevision mismatch: expected def456, got abc123/,
|
|
|
|
|
);
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
describe('copyRuntimeWheelAssets', () => {
|
|
|
|
|
it('copies the runtime wheel and checksum manifest into CLI assets', async () => {
|
|
|
|
|
const root = await mkdtemp(join(tmpdir(), 'ktx-runtime-assets-test-'));
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout(root, PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-11 15:50:34 +02:00
|
|
|
try {
|
|
|
|
|
await mkdir(layout.pythonDir, { recursive: true });
|
|
|
|
|
await writeFile(
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
join(layout.pythonDir, runtimeWheelFilename()),
|
2026-05-11 15:50:34 +02:00
|
|
|
'kaelio-ktx-runtime-wheel',
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const assets = await copyRuntimeWheelAssets(layout, {
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
runtimeWheel: join(layout.pythonDir, runtimeWheelFilename()),
|
2026-05-11 15:50:34 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assert.equal(
|
|
|
|
|
assets.wheelPath,
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
join(root, 'packages', 'cli', 'assets', 'python', runtimeWheelFilename()),
|
2026-05-11 15:50:34 +02:00
|
|
|
);
|
|
|
|
|
assert.equal(
|
|
|
|
|
assets.manifestPath,
|
|
|
|
|
join(root, 'packages', 'cli', 'assets', 'python', CLI_PYTHON_ASSET_MANIFEST),
|
|
|
|
|
);
|
|
|
|
|
const manifest = JSON.parse(await readFile(assets.manifestPath, 'utf8'));
|
|
|
|
|
assert.deepEqual(manifest, {
|
|
|
|
|
schemaVersion: 1,
|
|
|
|
|
distributionName: RUNTIME_WHEEL_DISTRIBUTION_NAME,
|
|
|
|
|
normalizedName: RUNTIME_WHEEL_NORMALIZED_NAME,
|
|
|
|
|
version: RUNTIME_WHEEL_PACKAGE_VERSION,
|
|
|
|
|
wheel: {
|
docs(concepts): add Wiki retrieval pillar page (#191)
* docs(concepts): add Wiki retrieval pillar page
Adds a dedicated concept page covering the wiki side of the context
layer: the page contract, the hybrid retrieval pipeline (lexical,
semantic, token lanes fused by RRF), the refs/sl_refs/[[wikilink]]
graph, validation that keeps edges live, and where ingest sources
pages. Wired into concepts nav and cross-linked from the-context-layer
to mirror the existing Semantic querying link.
* test: derive release versions in tests instead of hardcoding 0.1.0-rc.1
After @semantic-release/git started committing version bumps back to the
branch, the 0.4.0 release rewrote package.json, packages/cli/package.json,
and release-policy.json — but the script and CLI tests still pinned the
pre-bump strings (0.0.0-private, 0.1.0-rc.1, 0.1.0rc1), so every new
branch off main failed TypeScript checks and Coverage.
Drive the version off the existing source of truth instead: read
@ktx/cli/package.json via createRequire in the CLI tests, and reuse the
already-imported PUBLIC_NPM_PACKAGE_VERSION / RUNTIME_WHEEL_PACKAGE_VERSION
constants in the script tests. The two assertions that pinned those
constants to specific values become semver shape checks.
2026-05-21 01:26:58 +02:00
|
|
|
file: runtimeWheelFilename(),
|
2026-05-11 15:50:34 +02:00
|
|
|
sha256: createHash('sha256')
|
|
|
|
|
.update('kaelio-ktx-runtime-wheel')
|
|
|
|
|
.digest('hex'),
|
|
|
|
|
bytes: Buffer.byteLength('kaelio-ktx-runtime-wheel'),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
} finally {
|
|
|
|
|
await rm(root, { recursive: true, force: true });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2026-05-10 23:12:26 +02:00
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
describe('verifyNpmArtifacts', () => {
|
|
|
|
|
it('does not prepare an external Python environment for the npm smoke', async () => {
|
|
|
|
|
const source = await readFile(new URL('./package-artifacts.mjs', import.meta.url), 'utf8');
|
|
|
|
|
const start = source.indexOf('async function verifyNpmArtifacts');
|
2026-05-13 00:38:26 +02:00
|
|
|
const end = source.indexOf('async function verifyNpmCliArtifacts');
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.ok(start > 0, 'verifyNpmArtifacts function must exist');
|
2026-05-13 00:38:26 +02:00
|
|
|
assert.ok(end > start, 'verifyNpmCliArtifacts must follow verifyNpmArtifacts');
|
2026-05-11 15:50:34 +02:00
|
|
|
|
|
|
|
|
const body = source.slice(start, end);
|
|
|
|
|
assert.doesNotMatch(body, /uv', \['venv', '\.venv'\]/);
|
|
|
|
|
assert.doesNotMatch(body, /pythonArtifactInstallArgs/);
|
|
|
|
|
assert.doesNotMatch(body, /npmSmokePythonEnv/);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
describe('standalone Python artifact cleanup', () => {
|
|
|
|
|
it('does not build or verify standalone Python package artifacts', async () => {
|
|
|
|
|
const source = await readFile(new URL('./package-artifacts.mjs', import.meta.url), 'utf8');
|
2026-05-10 23:12:26 +02:00
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.doesNotMatch(source, /uv', \['build', '--package', 'ktx-sl'/);
|
|
|
|
|
assert.doesNotMatch(source, /uv', \['build', '--package', 'ktx-daemon'/);
|
|
|
|
|
assert.doesNotMatch(source, /async function verifyPythonArtifacts/);
|
|
|
|
|
assert.doesNotMatch(source, /pythonArtifactInstallArgs/);
|
|
|
|
|
assert.doesNotMatch(source, /pythonVerifySource/);
|
|
|
|
|
assert.doesNotMatch(source, /ktx_sl-0\.1\.0/);
|
|
|
|
|
assert.doesNotMatch(source, /ktx_daemon-0\.1\.0/);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('verification snippets', () => {
|
2026-05-11 15:50:34 +02:00
|
|
|
it('pins the smoke project to the public package artifact', () => {
|
2026-05-16 12:06:34 +02:00
|
|
|
const layout = packageArtifactLayout('/repo/ktx', PUBLIC_NPM_PACKAGE_VERSION);
|
2026-05-10 23:12:26 +02:00
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
const packageJson = npmSmokePackageJson(layout);
|
|
|
|
|
assert.deepEqual(packageJson.dependencies, {
|
|
|
|
|
'@kaelio/ktx': `file:${layout.cliTarball}`,
|
|
|
|
|
});
|
2026-05-13 13:33:28 +02:00
|
|
|
assert.equal(packageJson.devDependencies, undefined);
|
2026-05-13 01:15:35 +02:00
|
|
|
assert.equal(
|
|
|
|
|
npmSmokePnpmWorkspaceYaml(),
|
|
|
|
|
['packages:', ' - "."', 'allowBuilds:', ' better-sqlite3: true', ''].join('\n'),
|
|
|
|
|
);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('exposes manifest verification as a package artifact command', async () => {
|
|
|
|
|
const source = await readFile(new URL('./package-artifacts.mjs', import.meta.url), 'utf8');
|
|
|
|
|
const packageJson = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
|
|
|
|
|
|
|
|
assert.match(source, /if \(command === 'verify-manifest'\)/);
|
|
|
|
|
assert.match(source, /await verifyArtifactManifest\(layout\)/);
|
|
|
|
|
assert.equal(packageJson.scripts['artifacts:verify-demo'], 'node scripts/package-artifacts.mjs verify-demo');
|
|
|
|
|
assert.equal(packageJson.scripts['artifacts:verify-manifest'], 'node scripts/package-artifacts.mjs verify-manifest');
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
it('asserts the public npm entry point that clean installs must expose', () => {
|
2026-05-10 23:12:26 +02:00
|
|
|
const verifySource = npmVerifySource();
|
2026-05-11 15:50:34 +02:00
|
|
|
|
|
|
|
|
assert.match(verifySource, /const cli = await import\('@kaelio\/ktx'\);/);
|
|
|
|
|
assert.match(verifySource, /getKtxCliPackageInfo/);
|
|
|
|
|
assert.match(verifySource, /runKtxCli/);
|
|
|
|
|
assert.doesNotMatch(verifySource, /@ktx\/context/);
|
|
|
|
|
assert.doesNotMatch(verifySource, /@ktx\/llm/);
|
|
|
|
|
assert.doesNotMatch(verifySource, /@ktx\/connector-/);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
|
2026-05-11 15:50:34 +02:00
|
|
|
it('runs installed CLI commands through the public package runtime', () => {
|
2026-05-10 23:12:26 +02:00
|
|
|
const source = npmRuntimeSmokeSource();
|
|
|
|
|
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /function pnpmCommand\(args\)/);
|
|
|
|
|
assert.match(source, /process\.platform === 'win32'/);
|
|
|
|
|
assert.match(source, /command: 'cmd\.exe'/);
|
|
|
|
|
assert.match(source, /args: \['\/d', '\/s', '\/c', 'pnpm', \.\.\.args\]/);
|
|
|
|
|
assert.match(source, /import \{ setTimeout as delay \} from 'node:timers\/promises';/);
|
|
|
|
|
assert.match(source, /async function rmWithRetry\(path\)/);
|
|
|
|
|
assert.match(source, /await delay\(500\)/);
|
|
|
|
|
assert.match(source, /await rmWithRetry\(root\)/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.match(source, /ktx public package version/);
|
2026-05-19 15:52:30 +02:00
|
|
|
assert.match(source, /installedPackageVersionPattern/);
|
|
|
|
|
assert.doesNotMatch(source, /@kaelio\\\/ktx 0\\\.1\\\.0/);
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /pnpmCommand\(\[\s*'exec',\s*'ktx',\s*'sl',\s*'query'/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.doesNotMatch(source, /@ktx\/context/);
|
|
|
|
|
assert.doesNotMatch(source, /@modelcontextprotocol/);
|
|
|
|
|
assert.doesNotMatch(source, /startSemanticDaemon/);
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.doesNotMatch(source, /run\('pnpm',/);
|
|
|
|
|
assert.match(source, /pnpmCommand\(\[\s*'exec',\s*'ktx',\s*'setup'/);
|
2026-05-13 16:05:58 +02:00
|
|
|
assert.match(source, /wiki', 'global', 'revenue\.md'/);
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /pnpmCommand\(\[\s*'exec',\s*'ktx',\s*'wiki',\s*'revenue'/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.match(source, /semantic-layer', 'warehouse', 'orders\.yaml'/);
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /pnpmCommand\(\[\s*'exec',\s*'ktx',\s*'sl',\s*'orders'/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.match(source, /orders\.order_count/);
|
2026-05-13 13:33:28 +02:00
|
|
|
assert.match(source, /node:sqlite/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.match(source, /driver: sqlite/);
|
|
|
|
|
assert.match(source, /path: warehouse\.db/);
|
2026-05-14 01:43:06 +02:00
|
|
|
assert.doesNotMatch(source, /live-database/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.match(source, /'--execute'/);
|
|
|
|
|
assert.match(source, /"mode": "compile_only"/);
|
|
|
|
|
assert.match(source, /"mode": "executed"/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.match(source, /ktx sl query sqlite execute/);
|
2026-05-13 13:33:28 +02:00
|
|
|
assert.match(source, /import \{ DatabaseSync \} from 'node:sqlite'/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.doesNotMatch(source, /run\('python'/);
|
|
|
|
|
assert.match(source, /KTX_RUNTIME_ROOT/);
|
|
|
|
|
assert.match(source, /managed-runtime/);
|
2026-05-20 01:36:54 +02:00
|
|
|
assert.match(source, /ktx admin runtime status missing/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.match(source, /runtimeStatusBefore\.kind, 'missing'/);
|
|
|
|
|
assert.ok(source.includes(String.raw`Installing KTX Python runtime \(core\) with uv`));
|
|
|
|
|
assert.match(source, /KTX Python runtime ready:/);
|
2026-05-20 01:36:54 +02:00
|
|
|
assert.match(source, /ktx admin runtime status ready/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.match(source, /runtimeStatusAfter\.kind, 'ready'/);
|
|
|
|
|
assert.match(source, /runtimeStatusAfter\.manifest\.features/);
|
2026-05-20 01:36:54 +02:00
|
|
|
assert.match(source, /ktx admin runtime status/);
|
2026-05-13 12:00:08 +02:00
|
|
|
assert.match(source, /status: ready/);
|
2026-05-20 01:36:54 +02:00
|
|
|
assert.match(source, /ktx admin runtime start/);
|
|
|
|
|
assert.match(source, /ktx admin runtime start reuse/);
|
refactor(release): drop release-policy.json runtime dep and next branch (#180)
* chore: standardize daemon naming on "KTX daemon"
Replace inconsistent names ("KTX Python daemon", "KTX local embeddings
daemon", "KTX managed daemon", "Python daemon") with the single name
"KTX daemon" in CLI output, errors, command descriptions, test
assertions, smoke scripts, docs, AGENTS.md, issue templates, and
codecov flags. The daemon is a portable compute server with endpoints
for SQL analysis, semantic layer, LookML, database introspection, and
embeddings; the previous labels misrepresented it as embeddings-only or
exposed implementation details ("Python", "managed").
The "KTX Python runtime" concept (installed interpreter + packages) is
deliberately left as-is — it is a separate concept from the daemon
process.
* refactor(release): drop release-policy.json runtime dep and next branch
Strips the release-policy.json fallback from release-version.ts so the CLI
reads its version straight from packages/cli/package.json. dev → 0.0.0-private,
installed @kaelio/ktx → the real semver baked into the published package.json.
KtxCliPackageInfo collapses to { name, version, contextPackageName }; /health
no longer depends on version files surviving past a CI run.
Replaces the dual-branch (main + next) semantic-release model with a single-
branch model on main. rcs and stables interleave on the same branch via
{ name: 'main', prerelease: 'rc', channel: 'next' } / ['main']. Drops
@semantic-release/git and @semantic-release/changelog (nothing is committed
back to the repo on any channel) and the workflow's "Prepare next prerelease
branch" step plus the KTX_PRERELEASE_BRANCH plumbing. The git tag plus the
published npm artifact carry the version forward.
Updates docs/release.md, removes the two now-unused devDeps, regenerates
pnpm-lock.yaml. 611/611 @ktx/cli tests, 173/173 script tests, type-check,
biome, knip all clean.
* fix(release): don't throw on non-main branches at config-load time
knip loads .releaserc.cjs on every PR run, where GITHUB_REF_NAME is the
merge ref (e.g. 180/merge). The previous version of releaseBranches threw
immediately when the branch wasn't main, which made knip fail to evaluate
the config and then mis-flag @semantic-release/exec as an unused dep.
semantic-release already refuses to publish when the current branch doesn't
match a configured release branch, so the explicit throw was redundant.
Drop it (and the unused currentBranch helper) and replace the
"rejects releases from non-main" assertion with one that exercises a CI-
shaped GITHUB_REF_NAME and confirms the config loads.
2026-05-20 13:53:14 +02:00
|
|
|
assert.match(source, /Using existing KTX daemon/);
|
2026-05-20 01:36:54 +02:00
|
|
|
assert.match(source, /ktx admin runtime stop/);
|
|
|
|
|
assert.doesNotMatch(source, /ktx admin runtime prune/);
|
2026-05-13 12:28:24 +02:00
|
|
|
assert.doesNotMatch(source, /staleRuntimeDir/);
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /pnpmCommand\(\['exec', 'ktx', 'ingest', 'warehouse'/);
|
2026-05-29 17:27:32 +02:00
|
|
|
assert.doesNotMatch(source, /'--fast'/);
|
|
|
|
|
assert.doesNotMatch(source, /'--deep'/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.doesNotMatch(source, /'--enrich'/);
|
2026-05-29 17:27:32 +02:00
|
|
|
assert.match(source, /ktx ingest enrichment guard verified/);
|
|
|
|
|
assert.match(source, /enrichment is not configured/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.match(source, /enrichment:/);
|
|
|
|
|
assert.match(source, /mode: deterministic/);
|
2026-05-14 01:43:06 +02:00
|
|
|
assert.doesNotMatch(source, /run\('pnpm', \['exec', 'ktx', 'ingest', 'run'/);
|
2026-05-10 23:51:24 +02:00
|
|
|
assert.match(source, /access\(join\(projectDir, '\.ktx', 'db\.sqlite'\)\)/);
|
2026-05-13 16:05:58 +02:00
|
|
|
assert.match(source, /SQLite wiki index/);
|
2026-05-14 01:43:06 +02:00
|
|
|
assert.doesNotMatch(source, /ktx ingest run requires llm\\.provider\\.backend: anthropic, vertex, or gateway/);
|
|
|
|
|
assert.match(source, /ktx ingest state verified/);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
|
2026-05-13 00:38:26 +02:00
|
|
|
describe('npmCliSmokeSource', () => {
|
|
|
|
|
it('exercises supported public package CLI commands', () => {
|
|
|
|
|
const source = npmCliSmokeSource();
|
2026-05-10 23:12:26 +02:00
|
|
|
|
2026-05-26 03:16:53 -07:00
|
|
|
assert.match(source, /function pnpmCommand\(args\)/);
|
|
|
|
|
assert.match(source, /process\.platform === 'win32'/);
|
|
|
|
|
assert.doesNotMatch(source, /run\('pnpm',/);
|
|
|
|
|
assert.match(source, /pnpmCommand\(\['exec', 'ktx', '--help'\]\)/);
|
|
|
|
|
assert.match(source, /pnpmCommand\(\['exec', 'ktx', 'setup', '--help'\]\)/);
|
2026-05-13 00:38:26 +02:00
|
|
|
assert.match(source, /Usage: ktx setup/);
|
2026-05-10 23:12:26 +02:00
|
|
|
assert.doesNotMatch(source, new RegExp(["'demo'", "'--mode'", "'deterministic'"].join(', ')));
|
2026-05-14 01:27:31 +02:00
|
|
|
assert.match(source, /'status', '--verbose', '--no-input'/);
|
2026-05-14 01:43:06 +02:00
|
|
|
assert.match(source, /KTX status/);
|
|
|
|
|
assert.match(source, /No project here yet/);
|
2026-05-13 00:38:26 +02:00
|
|
|
assert.doesNotMatch(source, /function requireProjectStderr/);
|
2026-05-11 15:50:34 +02:00
|
|
|
assert.match(source, /Object\.keys\(packageJson\.dependencies\)/);
|
|
|
|
|
assert.match(source, /'@kaelio\/ktx'/);
|
2026-05-10 23:12:26 +02:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|