story-013: Move the schema inventory out of tests/ into schemas/manifest.json - #14
Merged
Conversation
…est.json Implemented by the l5 harness story workflow.
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.
Summary
Adding a file to
schemas/forced the implementer to hand-edit two exact-equality inventories insidetests/—SHIPPEDintests/test_schema_validator.pyandSHIPPED_SCHEMASintests/test_story_004_validation.py. Every story since story-008 has forbidden the implementer from touching anything undertests/. 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.jsonbecomes 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.py—shipped_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— theSHIPPEDtuple and theSHIPPED_SCHEMASset deleted, every use repointed atshipped_schemas(). Both still assert exact set equality againstschemas/, not a subset. The directory glob narrows to*.schema.jsonso the manifest is not counted as a schema, with a companion assertion thatschemas/holds nothing but*.schema.jsonfiles plusmanifest.json— replacing the coverage the oldglob("*")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 underschemas/.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
HEAD, which stops meaning anything the moment_completecommits 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.clean-clone-resultwas 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.changed-files.jsonlists paths undertests/, 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 undertests/" sentence it would have contradicted. From here that sentence holds verbatim for every future story: adding a schema now means editingschemas/and its manifest, both implementer territory.tests/test_story_015_validation.py— story-015's tests reference the schema inventory, so they moved with it.*.mdkey, which istest_context_assembler.py's prompt-to-schema map), and it coverstests/*.pyandorchestration/*.pyonly — verified there are no subdirectories under either today, but a future one would fall outside it.🤖 Generated with Claude Code