Skip to content

story-013: Move the schema inventory out of tests/ into schemas/manifest.json - #14

Merged
jerodw merged 1 commit into
mainfrom
story/story-013
Aug 8, 2026
Merged

story-013: Move the schema inventory out of tests/ into schemas/manifest.json#14
jerodw merged 1 commit into
mainfrom
story/story-013

Conversation

@jerodw

@jerodw jerodw commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Adding a file to schemas/ forced the implementer to hand-edit two exact-equality inventories inside tests/SHIPPED in tests/test_schema_validator.py and SHIPPED_SCHEMAS in tests/test_story_004_validation.py. Every story since story-008 has forbidden the implementer from touching anything under tests/. Both rules were correct and could not both be satisfied; story-011 is where they collided, and its verifier recorded the deviation rather than closing it.

The inventory's value is that declaring a new schema must be a deliberate, noticed act. Nothing about that requires the declaration to live in a test file. This story moves it beside the schemas it declares: schemas/manifest.json becomes the one declared inventory, and the two tests stop being where the fact is stored and become where it is checked.

The duplication dissolves as a side effect — both test files read one manifest instead of each maintaining a copy.

Changes

  • schemas/manifest.json (new) — the single declared inventory, naming the seven schemas the harness ships.
  • orchestration/schema_validator.pyshipped_schemas(harness_root) reads the manifest and is what both test files import instead of holding copies. It raises on a missing or malformed manifest rather than degrading to an empty inventory, which would make the parametrized per-schema checks silently pass over nothing.
  • tests/test_schema_validator.py, tests/test_story_004_validation.py — the SHIPPED tuple and the SHIPPED_SCHEMAS set deleted, every use repointed at shipped_schemas(). Both still assert exact set equality against schemas/, not a subset. The directory glob narrows to *.schema.json so the manifest is not counted as a schema, with a companion assertion that schemas/ holds nothing but *.schema.json files plus manifest.json — replacing the coverage the old glob("*") gave for free.
  • tests/test_story_013_validation.py (new, tester stage) — 55 new tests: the single-inventory search, both failure directions, the stray-file assertion, and the demonstration that adding a throwaway schema now requires edits only under schemas/.

Testing

750 passed, zero failures — and the harness verified that number twice, in two environments:

  • test-results.json: 750 run, 750 passed.
  • clean-clone-result.json: exit_code: 0, 750 passed, python_version: 3.10.20 — the suite re-run in a fresh clone with the story committed into it, on the oldest Python CI tests.

Verification passed on the first iteration with zero blocking issues and no retry.

Notes for review

  • This is a re-run. story-013's first attempt shipped one test that failed once the run committed and two that could not fail at all — it resolved baselines against HEAD, which stops meaning anything the moment _complete commits the working tree. That attempt was reset and archived under .harness/runs-archive/story-013-vacuous-tests/, and it is the reason story-014 and story-015 were written and merged first. This run has neither defect: the clean-clone check story-014 added exercised the committed state directly, and story-015's baseline-honesty check now fails the suite on that idiom mechanically.
  • The manifest names seven schemas, not the six the story's first acceptance criterion enumerates. clean-clone-result was added by story-014 after story-013 was planned. The verifier recorded this as a stale criterion rather than a defect — the story adds and removes no schema, which is the constraint that actually matters.
  • The implementer's changed-files.json lists paths under tests/, deliberately. Deleting those two inventory definitions is this story's deliverable, and the story was written to say so rather than carrying the usual "touches no file under tests/" sentence it would have contradicted. From here that sentence holds verbatim for every future story: adding a schema now means editing schemas/ and its manifest, both implementer territory.
  • The tester modified tests/test_story_015_validation.py — story-015's tests reference the schema inventory, so they moved with it.
  • Two limits the verifier stated rather than glossed: the literal-inventory AST scan exempts one shape (a collection under a *.md key, which is test_context_assembler.py's prompt-to-schema map), and it covers tests/*.py and orchestration/*.py only — verified there are no subdirectories under either today, but a future one would fall outside it.

🤖 Generated with Claude Code

…est.json

Implemented by the l5 harness story workflow.
@jerodw
jerodw merged commit f12bb84 into main Aug 8, 2026
3 checks passed
@jerodw
jerodw deleted the story/story-013 branch August 8, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant