Uh oh!
There was an error while loading. Please reload this page.
fix(spec): register INVALID_METADATA's second emitter in the error-code ledger - #7873
Conversation
…de ledger @objectstack/plugin-security has emitted INVALID_METADATA (422) for the controlled_by_parent-without-master_detail authoring defect since #7474, but the ledger's provenance only listed @objectstack/metadata-protocol. Per the ledger's own retirement rule ("a row whose last EMITTER is deleted comes out with it"), the missing row meant a future retirement pass on metadata-protocol's INVALID_METADATA would look correct and silently unregister a code plugin-security still throws. Adds the plugin-security row with a provenance comment, ordered alphabetically to match the file's convention. No wire/behavior change: ERROR_CODE_LEDGER dedupes into the union, so INVALID_METADATA was already a member of ErrorCode and every envelope conformance parse already passed. Fixes#7504 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YBUGvukaeVu9DjKdsHJa9
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#7504
What
@objectstack/plugin-securityhas emittedINVALID_METADATA(422) for thecontrolled_by_parent-without-master_detailauthoring defect since #7474, butERROR_CODE_LEDGER's provenance only listed it under@objectstack/metadata-protocol. This adds the missing per-package row under@objectstack/plugin-security, with a provenance comment, ordered alphabetically (INVALID_METADATAbeforeSUGGESTION_*) to match the file's existing convention.Why it matters
Per the ledger's own retirement rule ("A row whose last EMITTER is deleted comes out with it"), the missing row meant a future retirement pass on
metadata-protocol'sINVALID_METADATAwould look correct and would silently unregister a codeplugin-securitystill throws — the silent fourth state ADR-0112 exists to prevent, arrived at by following the documented procedure.No wire/behavior change
ERROR_CODE_LEDGERdedupes into theErrorCodeunion, soINVALID_METADATAwas already a member and every envelope conformance parse already passed.check:error-code-casinganderror-code-ledger.test.tscheck casing, duplication and shadowing — not per-package emitter accuracy — so neither gate moves.Verification
pnpm --filter @objectstack/spec build— greenpnpm --filter @objectstack/spec typecheck— greenpnpm check:error-code-casing— green (17 self-test cases, 3682 files scanned)pnpm check:nul-bytes— green (7206 files scanned)pnpm --filter @objectstack/spec exec vitest run error-code-ledger— 8/8 passedpnpm --filter @objectstack/spec check:docs— 230 generated files in sync, no diff: the generated reference page (content/docs/references/api/error-code-ledger.mdx) lists only the dedupedErrorCodeunion's allowed values, not per-package provenance rows, andINVALID_METADATAwas already listed there via the first emitter. So this PR's prose reaches no doc consumer — no regenerated docs artifact to commit, and no changeset (this is ledger bookkeeping only, not a user-visible wire or doc change).Premise re-verified at merge base (fast-forwarded onto
origin/mainafter this branch was cut; no conflicts):INVALID_METADATAwas under@objectstack/metadata-protocolonly, the@objectstack/plugin-securityblock held onlySUGGESTION_NOT_FOUND/SUGGESTION_STATE, and the second emitter (packages/plugins/plugin-security/src/controlled-by-parent-sharing.test.ts) is live on main asserting the 422. PR #7829 has not landed yet, so no duplicate-row risk from that adjacent PR.Generated by Claude Code