DR-118: The corpus manifest lives with the test standards
DR-118: The corpus manifest lives with the test standards
Section titled “DR-118: The corpus manifest lives with the test standards”Context
Section titled “Context”id-396/TECH.md §1 ratified a corpus manifest — a checked-in register of every fixture
tree carrying id, path, format, sha256, fixture_class, staging_mode,
consumers and notes, enforced by a conformance guard whose orphan rule (a fixture with
zero declared consumers FAILS) is the anti-drift mechanism. It was ratified in design and
never written; id-406 builds it.
TECH §1 specified it at docs/testing/corpus-manifest.json. That directory was deleted in
the S521–S522 fixture relocation (b9c55abf, 90cc3b03, eb9ccac9), so the spec’s path
cannot be used as written.
DR-117 does not
reach the question. It rules on fixture trees — file them under the domain that owns
them, never by the kind of artefact they are. The manifest is not a fixture tree: it is a
cross-tree register spanning the pipeline’s corpus, the pipeline’s form templates,
__tests__/fixtures/cocoindex-chunking/, eval-gold/ and
scripts/tests/fixtures/extraction/. It has no single owning domain, which is exactly why
DR-117’s rule does not apply to it.
This mattered beyond filing tidiness: the manifest’s home was the last blocker on id-406, which gates id-412 and, behind it, id-414 and id-415 — the whole cocoindex nightly reliability queue.
Decision
Section titled “Decision”The corpus manifest lives at docs/reference/testing/corpus-manifest.json.
DR-117 files a fixture tree by its owning domain; a register with no owning domain files as
what it is — a testing standard — alongside the in-repo test standards already at
docs/reference/testing/ (test-philosophy.md, testing-patterns.md). Like the prose
beside it, the manifest is cross-cutting rather than owned by any one tree.
There is exactly one copy. Both the guard
(__tests__/validation/corpus-manifest.test.ts) and the consumer
(scripts/cocoindex-census-gate.ts, replacing its hardcoded DRIVER_MANIFEST_DEST_PATHS
array) read this path.
Alternatives considered
Section titled “Alternatives considered”__tests__/fixtures/corpus-manifest.json. Sits beside one of the trees it registers, and beside the guard that enforces it. Rejected: it privileges one registered tree over the other four, and files the artefact by kind — the precise instinct DR-117 rejected one decision earlier.- Recreate
docs/testing/. Matches TECH §1 verbatim with zero spec drift. Rejected: it resurrects a directory deliberately emptied by the relocation, to hold one file. - Under
scripts/cocoindex_pipeline/fixtures/, beside the trees DR-117 moved. Not tabled as a serious candidate, and worth naming so it is not revived: it would assert the pipeline owns a register that also covers__tests__/fixtures/**, which it does not.
Consequences
Section titled “Consequences”- A machine-read JSON now sits in a prose-doc directory. This is the accepted cost, and it is the only real argument against the choice.
- The manifest is a sibling of the test-standards docs, not a child of
__tests__/, so the guard reaches it by a relative path out of the test tree. Resolve that path once, in a shared constant, rather than independently in the guard and the census gate. - id-406 becomes dispatch-safe, unblocking id-412 → {id-414, id-415}.
- The rule generalises: a cross-tree register files by what it is, because there is no domain to file it under. DR-117 remains the rule for anything that does have one.