Repository navigation
Conversation
Every version in schema/versions.json is now compiled from its retained snapshots, and plans and edit replies are checked by the version they declare. The loader refuses a registry that disagrees with the snapshots or validators, and treats a version with no validator as unsupported. Pin the released v1 files by SHA-256, keep them LF on checkout, and add the remaining #6 tests: path identity and Git mode mapping, hostile text in every authoring prompt, and output limits at the exact byte. Runtime gaps move to #162-#166. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #6.
Summary
#6 was an umbrella issue. PR #4 delivered its library part, and later lanes delivered most of the runner part. This PR closes the remaining library and test gaps and moves the remaining runtime gaps to their own issues.
docs/implementation/plan-library-alignment.mdmaps every obligation in #6 to its code and tests, or to the issue it moved to.Schema loading (
core/plan.ts,core/planning-author.ts)loadPlanSchemascompiles every version inschema/versions.jsonfrom its retained snapshots into one validator. Each plan or edit reply is checked by the version it declares; a value with no registered version is checked by the current schema, so v1 callers see the same/schema_versionerror as before.$iddiffers from its path, that does not requireschema_versionwith a one-valueenum, or whose plan/edit role differs; a validator key or implementation reused, or paired with another semantics document; a missing current version.validate,assertPlanandassertEditReply(docs/plan-format.md: "Treat a missing validator implementation as unsupported"). Before, any v1 registry change other than the exact v1 entry failed module load;test/registry.test.tsstill pins the key tov<version>.importPlanrequires the current version (no migrations exist).applySuggestionrequires the reply's version to equal the plan's. Drafts get the current plan schema; suggestions get the previous plan's edit schema.Released files pinned
test/schema-versions.test.tspins the SHA-256 of every file a registry entry names..gitattributeskeepsschema/versions/**and the CLI copies LF on checkout.New tests for the remaining #6 gaps
test/review.test.ts): the refusal without a known identity, case and NFC keys, the non-ASCII refusal on case-insensitive checkouts, and Git mode mapping (symlink targets verbatim, gitlinks, executable and odd-named files).test/planning-author.test.ts): repository, issue, lesson, feedback, previous-plan and continuation-context text, in initial drafts, revised drafts and suggestions.test/agent-supervisor.test.ts); the 1 MiB parser limit on a decoded Claude answer in draft validation and the envelope fixtures (test/agent-adapter.test.ts); the 300-unit quote of a failed planning run (test/planning-provider.test.ts).Not testable while v1 is the only version
Listed in the implementation note: module-level selection in
assertPlan/assertEditReply, the current-version import check, the reply/plan version check, which schema each provider gets, and the unsupported refusal on shape-only paths. The loader behaviour behind them is tested through an injected two-version loader.Follow-up issues
parseClaudeOutputre-serializesstructured_output, so duplicate keys and lossy numbers are normalized beforeparseV1sees them.Validation
Base
22e76a8bc90b59c8407bb78bee1c229b249b4936(baseline), headf9c2e6b11c884e6814790d7f666c4e2cce3a67be(validated head).npm run typecheck)vitest --project parallel)agent-supervisor, "decoded output at the … limit")real-dockeris the gateLoad-related failures, separate from product results: at load average ~140 (other agents on the machine), three full runs each had one timing failure in files this PR does not touch:
pre-merge.test.ts"aborts remote work early enough…",review.test.ts"keeps review load available…",planning-worker.test.ts"never deletes Ask's folders…". Each passed 3/3 alone and in later full runs.Each new test was checked against a deliberate break of its behaviour; the breaks are listed in the implementation note.
Review record
requiredcheck; evidence overstated; unsupported version passing shape-only paths documented as untested; error-code consistencyassertPlan/assertEditReplynow refuse unsupported versions; table rows for mounts, termination, schema/output channels, prompt bytestypeofguard inselect(needed for TypeScript narrowing); a mutableMapbehind a shallow freeze (production loader not exported); pinningexamples/(not conformance fixtures; no test reads them)Self-review ran between rounds; every independent round reviewed the full diff against the base. Copilot review has not been requested: this PR is a draft.
Review-lesson audit
Findings were classified against existing rules:
No new AGENTS.md rule is needed.
🤖 Generated with Claude Code