Uh oh!
There was an error while loading. Please reload this page.
docs(spec): STORED_TYPE_NOT_CANONICAL ledger comment names both producers and their atomicity - #9411
Conversation
…cers and their atomicity
The ledger entry at error-code-ledger.zod.ts:381 named only the publish
pre-flight as STORED_TYPE_NOT_CANONICAL's producer ("refused at the publish
pre-flight, batch-atomic"). PR #9360 (#9174) added a second producer -
revertCommit's restore limb, which refuses per-item on its existing
failed[] channel and is explicitly NOT batch-atomic - leaving the comment
naming one of two producers and the wrong atomicity for the one it omitted.
Names both now: the publish pre-flight (batch-atomic, #8908) and
revertCommit's restore limb (per-item on failed[], NOT batch-atomic,
#9174), verified against the merged #9360 diff at protocol.ts:14432 and
protocol.ts:16399.
Text-only change - accept/reject behavior, the error code, and its
envelope are all unchanged.
Fixes#9361
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not seeCoarse fallback — 113 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop):
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9361
What changed
One comment line at
packages/spec/src/api/error-code-ledger.zod.ts:381.STORED_TYPE_NOT_CANONICALhad a second producer land under PR #9360 (#9174, merged2416dd588), and the comment still named only the first.Before:
After:
Verification against merged code (not the issue's prose)
Both producer claims were checked against
maindirectly, not assumed from the issue body:packages/metadata-protocol/src/protocol.ts:14432, insidepublishPackageDrafts. The refusal is pushed intopreflightViolations, andprotocol.ts:14475short-circuits the whole call withpublishedCount: 0when that array is non-empty — batch-atomic, confirmed.revertCommitrestore limb —packages/metadata-protocol/src/protocol.ts:16399, inside the per-item restore loop. The refusal doesfailed.push({ ..., code: 'STORED_TYPE_NOT_CANONICAL' }); continue;— per item, intofailed[], and the loop proceeds to the next item rather than aborting the batch — NOT batch-atomic, confirmed. Matches the method's own JSDoc atprotocol.ts:16193-16202, which documents this refusal as landing under finding:revertCommithas noSTORED_TYPE_NOT_CANONICALpre-flight, so a non-canonical stored item degrades to aconsole.warnwhere the sibling doors give a wire-visible code #9174.Option 3 from the issue (deriving the producer list with a gate) is explicitly out of scope per the triage grading (2026-08-17T22:13Z) and PM claim comment (2026-08-17T23:22Z) — this PR is option 1 only, no behavior change, no other lines touched.
Gates run (all green, HEAD
494d2a71f)pnpm --filter @objectstack/spec build— cleanpnpm --filter @objectstack/spec test— 408 files / 10898 tests passedpnpm --filter @objectstack/spec typecheck— clean (tsc, scripts, test-typecheck debt unchanged)pnpm --filter @objectstack/spec run check:generated— all 13 generated artifacts up to date; none changed by this comment editpnpm check:changeset-gate-self-testspnpm check:cross-package-test-inputspnpm check:dispatcher-error-vocabularypnpm --filter @objectstack/lint run check:doc-formula-expressionspnpm --filter @objectstack/spec run check:empty-statepnpm check:error-code-casingpnpm --filter @objectstack/spec run check:livenesspnpm check:merge-driverpnpm check:objectui-changesetpnpm check:spec-parsed-aliaspnpm --filter @objectstack/spec run check:strictness-ledgerpnpm check:type-source-resolutionpnpm --filter @objectstack/spec run check:variant-docsnode scripts/check-adr-0087-registration.mjsnode scripts/check-changeset-no-major.mjsnode scripts/check-cross-package-test-inputs.mjsnode scripts/check-dev-prereqs.mjs --self-test(CI's own lint.yml invokes this script's self-test half only, never the full-workspace scan half — see the script's own header andlint.yml's "Self-test the dev-prereqs gate" step)node scripts/check-empty-changeset.mjsnode scripts/docs-audit/check-affected-docs.mjsnode scripts/check-nul-bytes.mjs(both changed files)Changeset:
@objectstack/specpatch, text face (accept/reject unchanged) —.changeset/error-code-ledger-stored-type-not-canonical-two-producers.md.Generated by Claude Code