feat(evaluation): namespace-aware, manifest-driven fixture-area registration - #22
Conversation
…ration
The harness only discovered flat evaluation/fixtures/*.json, so fixture
areas in sub-namespaces (agent-experience/catchup/, family-history/) stayed
invisible to every run. Registration is now explicit and fail-fast via
fixtures/manifest.json, listing each area as {path, fixtureClass,
runnerBinding}.
- src/manifest.ts: closed FIXTURE_CLASSES registry pairing each class with
its one legal runner binding, validator semantics, and fail-fast area
discovery (existence, non-empty, per-class data discipline, path
containment, duplicate detection, >=1 extraction-accuracy area).
- extraction-accuracy -> adapter-corpus (corpus runner, counts pass/fail);
scenario-and-authorization -> bun-test-data (JSON-loadable data executed
by consuming bun test suites; the harness validates loadability only and
never executes it). The catch-up lane registers its own area; this PR
seeds the manifest with the existing extraction corpus only.
- src/run.ts: dispatches registered areas; output is byte-identical to the
pre-manifest harness while no scenario area is registered (verified by
diff against the pre-change run, including the --expect-failure negative
control).
- fixtures.ts: assertFixture exported (shared registration discipline);
loadFixtures gains excludeAbsolutePaths so the manifest never loads as a
fixture.
- src/manifest-selfcheck.ts + README: registration rules and how a new
area registers.
No changes to the six existing corpus fixtures.
Co-authored-by: Gilbert Polanco <gilbertpolanco42@gmail.com>
Evidence receipt (merged PR)
Verification caveat (stated plainly, per PR body): CI's Human author: Gilbert Polanco (gilbertpolanco42@gmail.com) |
Post-merge verification — independent reviewer verdictVerdict: pass (two non-blocking notes). Completes the evidence receipt above — the "Review result" reviewer field is this thread's independent verification, run after merge. Merge integrity — squash
Verified at merge commit
Ordering contract — the manifest registers exactly one area ( Namespace discipline — the only Notes (non-blocking)
|
Acceptance criteria
{path, fixtureClass, runnerBinding}—evaluation/fixtures/manifest.json(schema v1).bun src/run.tsis byte-identical to the pre-change run and the--expect-failurenegative control still fails the broken adapter (diffs against pre-change baselines at the tested SHA, see Test Evidence).scenario-and-authorizationfixture class defined (bun-test-loadable data; validator/runner semantics distinct from extraction accuracy) without adding the catch-up manifest entry — the catch-up PR registers its own area.evaluation/README.mdon how a new area registers.Why
The merged candidate-agnostic harness (PR #6) discovers fixtures by scanning flat
evaluation/fixtures/*.json. Fixture areas in sub-namespaces —agent-experience/catchup/(since-last-seen catch-up, 14 scenario-and-authorization fixtures per art_6qhBut41) — stay invisible to every run, so those lanes cannot land data that the harness even acknowledges. Registration needs to become explicit and namespace-aware before the catch-up PR can land its fixtures.What
fixtures/manifest.json— the registration surface. Each area:path(relative to the manifest's directory;.= the root corpus),fixtureClass(closed set),runnerBinding(one legal binding per class). Seeded with exactly one entry: the existing flat corpus asextraction-accuracy/adapter-corpus.src/manifest.ts—FIXTURE_CLASSESregistry stating each class's validator + runner semantics:extraction-accuracy→adapter-corpus: executed by the corpus runner against aCandidateAdapter; results count toward pass/fail; every file must parse and carry a knownkind+ non-emptyid(enforced at registration via the now-exportedassertFixture).scenario-and-authorization→bun-test-data: pure data (e.g. history/grants/cases) consumed directly by bun test suites (packages/domain/test/catchup.test.ts); the harness validates JSON loadability only, never executes it, and it never affects the exit code..., absolute), duplicate path, or a manifest with noextraction-accuracyarea all fail the run before any fixture executes. Nothing is silently skipped — matching the existing loader's contract.src/run.ts— manifest-driven: partitions registered areas by class, loads extraction areas through the unchangedloadFixtures(now withexcludeAbsolutePathsso the manifest never loads as a fixture), and lists scenario areas at the end of the output (only when any are registered — so today's output is byte-identical).src/manifest-selfcheck.ts— registration self-check: the seed manifest resolves to the six-fixture corpus with the manifest excluded, and every fail-fast rejection rule is exercised (classes, bindings, both cross-pairings, path escapes, duplicates, bad version, missing/empty areas, kind discipline).evaluation/README.md— "Fixture areas & the manifest" section: schema, class table, invariants, and a three-step how-to for registering a new area (data-only; only a new class touchessrc/).Deliberately excluded: no
agent-experience/catchupmanifest entry — that registration belongs to the catch-up PR (which rebases on this one; ordering constraint honored: this merges first). No fixture data changes.How to Review
Key files:
evaluation/src/manifest.ts(the whole contract),evaluation/src/run.ts(dispatch + output),evaluation/fixtures/manifest.json(the seed). Backward-compat surface:loadFixturesgained an optional options param;assertFixturewent from module-private to exported; no othersrc/behavior changed.Test Evidence — local verification at the exact tested SHA
This PR's verification surface is local, not CI: CI's
pnpm turbo run testdoes not coverevaluation/(it is not a pnpm workspace member). Local bun runs at the exact head1f1287bc9ea8af072734b956b3c96af0f95734e6are the gate for this area (per.obvious/obvious.md). Observed at that SHA:bun src/run.tsbun src/run.ts --adapter=./src/example/broken-adapter.ts --expect-failurebun src/manifest-selfcheck.tsbun run typecheck(tsc strict,noUncheckedIndexedAccess,verbatimModuleSyntax)agent-experience/catchup (3 file(s))listed, not executed; negative control still exit 0CI on this PR covers the workspace packages (untouched by this diff —
git diffnames onlyevaluation/files); green CI there plus the local suite above is the complete verification story.Merge plan
Serialized merge owner: this thread. Merges before the catch-up implementation PR; the catch-up lane then adds its own manifest entry. Evidence receipt to follow per repo contract.
Human author: Gilbert Polanco (gilbertpolanco42@gmail.com)
🔗 Obvious Project · 🧵 Obvious Thread