Repository navigation
Conversation
core/error.json closes recovery to transient / correctable / terminal, and enums/error-code.json's own enumMetadata $comment makes that block the normative authority: "the recovery classification embedded in that prose is normative and MUST match the value here." Three codes ended their enumDescriptions with "Recovery: warning": FORMAT_DECLARATION_V1_LOSSY_MULTI_SIZE PIXEL_TRACKER_LOSSY_DOWNGRADE PIXEL_TRACKER_UPGRADE_INFERRED "warning" is not a member of the enum, and all three carry correctable in enumMetadata, so the prose both leaves the enum and contradicts the authority it is required to match. recovery is the field a receiver must read when it does not recognise a code, so an SDK author transcribing the prose emits a value no receiver can decode. Prose now reads "Recovery: correctable — non-fatal advisory, do not auto-retry", keeping the non-fatal semantics in words rather than in an invented enum member. No schema shape or wire-behaviour change. Extends tests/error-recovery-vectors.test.cjs to hold error-code.json to the same prose/metadata agreement it already asserts for request-signing-error-code.json. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Request changes
Request changes — 1 blocking finding.
Blocking findings
- docs/snippets/compliance-error-codes.mdx:624/882/901 — Generated compliance reference not regenerated after the schema change; prose bodies still ship
Recovery: warningwhile accordion titles readcorrectable, asserting a recovery value outside the closed enum (schema↔docs drift). Fix: runnpm run build:complianceand commit the regenerated output.
The underlying schema fix is sound: the three error-code.json recovery prose tags are corrected from the invalid warning to correctable, matching each code's enumMetadata (the normative authority), and the added test invariant is correct. The patch, protocol-scoped changeset is correct and immutable dist/** artifacts were untouched. Row 1 fires on the high-severity schema↔docs drift finding, which takes precedence over the gated-paths / high-risk signals.
Blocking findings
- docs/snippets/compliance-error-codes.mdx:624/882/901 — Generated compliance reference not regenerated; prose bodies still ship
Recovery: warning(outside the closed recovery enum) while accordion titles readcorrectable— schema↔docs drift. Runnpm run build:compliance.
…se fix docs/snippets/compliance-error-codes.mdx is generated from enums/error-code.json by scripts/generate-compliance-snippets.mjs and is committed to the repo, so it has to be rebuilt alongside the schema. Its accordion titles already read 'correctable' (they render enumMetadata) while the prose bodies still carried 'Recovery: warning', so the generated reference contradicted itself and still published a value outside the closed recovery enum. npm run build:compliance; three lines changed, one per code. Released dist/docs/** snapshots are immutable and deliberately untouched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Fixed in The finding is correct and I'd missed it: The self-contradiction you flagged is exactly right and worth spelling out, because it made the generated reference worse than the schema was: the accordion titles and the summary table render
Verification after the regen:
One note for completeness: 🤖 Generated with Claude Code |
Superseded by a later Ladon review that rechecked and resolved its blocking findings.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS approval.
This PR modifies static/schemas/source/enums/error-code.json, which matches the repo's gated-paths glob static/schemas/source/**. gated_paths is true and review_decision is REVIEW_REQUIRED (not APPROVED), so decision-table row 2 fires: the hard approval gate is not satisfied and the outcome cannot be approve.
The diff itself is clean on the merits: the sole prior blocker is resolved — the generated docs/snippets/compliance-error-codes.mdx now reads Recovery: correctable at lines 624, 882, and 901, matching the enumDescriptions and normative enumMetadata.recovery values (all three correctable, a valid member of core/error.json's closed recovery enum). Changeset is present, patch-scoped, protocol-scoped, no wire-shape change, and dist/** is untouched. A new test correctly pins prose to metadata. No current critical/high/medium findings.
Because there are no blocking findings, this is not request-changes — but the unsatisfied gated-path gate blocks auto-approval. A human/CODEOWNERS review of the gated schema file is required.
Escalation reasons:
static/schemas/source/enums/error-code.jsonis under a hard approval gate (static/schemas/source/**) andreview_decisionisREVIEW_REQUIRED— human/CODEOWNERS approval required before merge.
Why human review
- static/schemas/source/enums/error-code.json is under a hard approval gate (static/schemas/source/**) and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/enums/error-code.json (modified) matches
static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
|
RC5 train status: exact head |
Summary
Three
enums/error-code.jsoncodes tag a recovery classification in prose that is not a member of the recovery enum, and that contradicts their ownenumMetadata:enumDescriptionsproseenumMetadata.recoveryFORMAT_DECLARATION_V1_LOSSY_MULTI_SIZERecovery: warningcorrectablePIXEL_TRACKER_LOSSY_DOWNGRADERecovery: warningcorrectablePIXEL_TRACKER_UPGRADE_INFERREDRecovery: warningcorrectablecore/error.jsonclosesrecoveryto["transient", "correctable", "terminal"].warningis not in it. And theenumMetadatablock's own$commentis explicit about which side wins:So the prose both leaves the closed enum and contradicts the authority it is required to match.
Why it matters
recoveryis the field a receiver is required to read when it does not recognise an error code, so it is the only machine-readable signal for these three. An SDK author transcribing the prose emitswarning, which no receiver can decode.That is not hypothetical. It is exactly how adcp-go shipped
retry/revise/contact_supporton the wire (adcontextprotocol/adcp-go#530, fixed in adcp-go#542 and #543) — a hand-written vocabulary copied from prose rather than read fromenumMetadata. Same failure mode, same root, one repo upstream.The fix
Prose becomes
Recovery: correctable — non-fatal advisory, do not auto-retry.That keeps the non-fatal, no-retry semantics the original wording was reaching for — all three codes are advisories emitted alongside a successful response in
errors[]— while expressing it in words instead of an invented enum member, and matching the metadata that already sayscorrectable. Nothing else in the three descriptions changes; the diff is exactly three lines, one per code.Not changed: the
enumMetadatavalues themselves. Moving those would be a wire-behaviour change, andcorrectableis the published classification consumers already act on. Worth flagging for the record that none of the three enum members express "advisory, non-fatal" cleanly — that is presumably why the prose author reached forwarning— but that is a vocabulary question for the WG, not something to settle by editing prose.Regression test
This invariant is already enforced for the sibling enum.
tests/error-recovery-vectors.test.cjshas'request-signing prose codes have one machine-readable recovery authority', which asserts for everyrequest-signing-error-code.jsonentry that the prose tag is an enum member and equalsenumMetadata.recovery.error-code.jsonwas never held to the same rule — which is why these three sat there.Added
'error-code prose recovery tags agree with the machine-readable authority'alongside it, reusing the sibling's assertion shape and the sameRECOVERY_VALUESset. It asserts every code'senumMetadata.recoveryis a valid member, and that where prose tags a recovery it matches. Codes whose prose carries noRecovery:tag are skipped rather than failed —REQUOTE_REQUIREDandFORMAT_SHAPE_PROMOTEDare the only two of 120 in that position, and requiring a tag from them is an editorial change beyond this defect. Happy to add it if you'd rather the invariant be total.Verified by revert-and-reconfirm — reverting only the schema and keeping the test:
(
undefinedbecause the capture group only admits the three real members — the same regex the request-signing test uses.)Scope note
The three codes carry the identical defect on
3.1.x. This PR targetsmain; happy to send the backport if you want it on the 3.1 line.Validation
tests/error-recovery-vectors.test.cjs9/9 (was 8 pass / 1 fail before the schema fix)npm run test:schemas— 302 + 10 + 6 assertions, all passnpm run build:schemasclean;npm run typecheckcleannpm run precommitpassedpatchchangeset included; no schema shape or wire-behaviour change🤖 Generated with Claude Code