Repository navigation
test: read shared registry data from a declared root - #7
Merged
Merged
Conversation
Read shared registry data from the directory declared by the KNOWLEDGE_DATA_ROOT environment variable across knowledge retrieval and registry acquisition runner tests. When KNOWLEDGE_DATA_ROOT is unset or empty, tests that depend on shared schemas or acceptance fixtures skip with the fixed prefix "knowledge data root absent:" followed by the test purpose. When the variable is set to a directory lacking expected files, the tests fail with the missing file path. The frozen P1-SRC-02 runner pins always execute, with only its four schema pins depending on the root. Touched tests: - tools/knowledge-retrieval: - TestMultidomainBindingClosureDeterministicNineClose - TestMultidomainBindingClosureFailsClosed - TestGoldSpanLaneRanks - TestMineSeparatingCaseShapes - tools/knowledge-registry/p1-src03-acquisition-runner: - TestExecutionManifestBindsExactRepositoryBytes - TestP1SRC02RunnerAndSchemasRemainByteIdentical Order: engine-knowledge-monorepo-test-data-20261023 Signed-off-by: lusoris <lusoris@proton.me>
Enforce that execution manifest artifacts with repository logical paths are read strictly from the repository root, failing immediately with the missing file path when absent. Previously, an else-if fallback in TestExecutionManifestBindsExactRepositoryBytes silently substituted missing repository files with copies located under the data root, allowing missing repository files to pass the digest check (review finding F1). Logical paths prefixed with knowledge/registry/ continue to be read from the data root. Every other logical path is verified against the repository only. Touched: - tools/knowledge-registry/p1-src03-acquisition-runner/runner_test.go: - verifyExecutionArtifact: read repository artifacts only from repo - TestExecutionManifestBindsExactRepositoryBytes: call helper - TestExecutionManifestPlantedRepositoryArtifactMissingFails: planted Order: engine-knowledge-monorepo-test-data-20261023 Signed-off-by: lusoris <lusoris@proton.me>
Plant execution manifest repository artifact tests using synthetic
in-memory artifacts and isolated temporary directory roots, removing all
dependencies on repository tree state and the embedded gzip payload.
Previously, TestExecutionManifestPlantedRepositoryArtifactMissingFails
relied on findAbsentRepositoryArtifact to locate an artifact in the
manifest that happened to be absent from the repository worktree, and
embedded a gzipped copy of conformance vectors to seed the data root.
Adding those conformance vectors to the repository broke the test,
and the embedded gzip copy was irrelevant to the missing-path check.
Synthetic artifacts now define their own path, sha256 digest, and size
over a short text payload. The missing-artifact test verifies that an
artifact present only in the temporary data root still fails against an
empty repository root, naming the expected repository path. A companion
test verifies that matching bytes in the repository root pass, while
altered bytes fail with an artifact drift error.
Touched:
- tools/knowledge-registry/p1-src03-acquisition-runner/runner_test.go:
- syntheticPlantedArtifact: generate synthetic artifact and bytes
- TestExecutionManifestPlantedRepositoryArtifactMissingFails: plant
synthetic artifact in temporary roots
- TestExecutionManifestPlantedRepositoryArtifactPresentOrDrifted:
verify matching digest passes and drifted digest fails
- drop findAbsentRepositoryArtifact, testCanonicalVectorsPayload,
canonicalVectorsGZBase64, compress/gzip, io
Order: engine-knowledge-monorepo-test-data-20261023
Signed-off-by: lusoris <lusoris@proton.me>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six tests read shared registry data this repository does not hold. They now read it from the directory that
KNOWLEDGE_DATA_ROOTnames. Without the variable each one skips with a reason startingknowledge data root absent:, instead of failing on a missing path.Tests that read the data root
tools/knowledge-retrieval:TestMultidomainBindingClosureDeterministicNineClose,TestMultidomainBindingClosureFailsClosed(acceptance data underknowledge/registry/acceptance/p1-src-03),TestGoldSpanLaneRanks,TestMineSeparatingCaseShapes(multidomain evaluation suite).tools/knowledge-registry/p1-src03-acquisition-runner:TestExecutionManifestBindsExactRepositoryBytesand the schema part ofTestP1SRC02RunnerAndSchemasRemainByteIdentical(registry schemas).TestP1SRC02RunnerAndSchemasRemainByteIdenticalread repository files and run with or without the data root.Behaviour
KNOWLEDGE_DATA_ROOT: named skip.knowledge/registry/are read from the repository only; a missing repository file fails with its path.Verification
KNOWLEDGE_DATA_ROOT: both modules pass the touched tests, 6 named skips.knowledge-retrievalpasses all touched tests;p1-src03-acquisition-runnerpasses everything except the canonical JSON vectors read, which the adoption change adds. With those vectors in place both modules pass the touched tests (36 and 35).The README note on these tests describes the variable.