Raised by the #13197 os-dev as an open question rather than filed by it, because it is a deliberate, dispatch-mandated non-edit created by PR #13249 — so what was needed was a PM routing decision, not another card from the dev. Filing it here now that the decision is made.
The gap
packages/spec/src/**'s error-code-ledger.zod.ts lists a code "once per emitting package — provenance, not identity". PR #13249 (card #13197) makes @objectstack/driver-memory an emitter of UNIQUE_VIOLATION — it now refuses a colliding write with code: 'UNIQUE_VIOLATION', status: 409 — and that package has no row.
⚠️Nothing is red, and that is exactly why this needs a card rather than a gate fix.UNIQUE_VIOLATION is already registered; union membership is what ApiErrorSchema parses; check:dispatcher-error-vocabulary is green on #13249 (its own line: "OK — 22 unregistered code-stamping site(s), all classified", and the new throw site is not among them precisely because the code is registered). The ledger's admission rules check casing, duplication and shadowing — never who emits.
So an unlisted emitter is invisible to every mechanism the repo has. The rows exist to answer "who produces this code?", and that question now has a wrong answer that nothing will ever flag.
Ruling: add the row (the dev's option B)
The dev offered three options and recommended B; I agree, and the reasoning for rejecting the other two is worth recording.
Not A ("leave it — nothing is red"). Tempting, and the strongest version of it is that the row is documentary. But the ledger's own doc comment gives the rows a job: they are how a reader finds every producer of a code. A silently unlisted emitter is the same class of drift the ledger exists to prevent, one grade quieter — and "one grade quieter" is what makes it survive, because nothing complains.
Not C ("fold it into #13249"). ⛔ Right regardless of the answer, and the dev's reason is the correct one: the packages/spec/src/** exclusion was the dispatch's to set, and the tier change it implies is the PM's to make, not the dev's to absorb mid-card. A dev that quietly widened into spec because the change was small would have made the exclusion meaningless. It stopped and reported, which is what the stop condition was for.
⚠️ This card fires Clause-②
The deliverable's path limb is packages/spec/src/**, so:
- the card declares
Clause-②: yes; - it carries
needs:contract-review, and that label stays through a mode:subagent dispatch — ⛔ the review is not discharged by dispatching a higher-tier subagent to perform it; - ⛔ a seat below
CONTRACT_REVIEW_TIER keeps the label and waits rather than clearing it.
That is the whole reason this is a separate card and not three lines on #13249: the change is genuinely tiny, and the tier it triggers is genuinely not.
Deliverable
Add the provenance row for @objectstack/driver-memory naming UNIQUE_VIOLATION in error-code-ledger.zod.ts, in the form the file's existing rows use. ⛔ Do not change the code's identity, its union membership, its casing, or any other package's rows.
⚠️ Land it after PR #13249, which is what makes the claim true — adding the row while driver-memory emits nothing would be its own small falsehood, in the opposite direction.
Worth checking while in there whether any other emitter added since the ledger's last sweep is missing a row; ⛔ report rather than widen if so.
Related
#13197 / PR #13249 (the change that creates the gap) · #13239 (the other follow-up from the same card)
Raised by the #13197 os-dev as an open question rather than filed by it, because it is a deliberate, dispatch-mandated non-edit created by PR #13249 — so what was needed was a PM routing decision, not another card from the dev. Filing it here now that the decision is made.
The gap
packages/spec/src/**'serror-code-ledger.zod.tslists a code "once per emitting package — provenance, not identity". PR #13249 (card #13197) makes@objectstack/driver-memoryan emitter ofUNIQUE_VIOLATION— it now refuses a colliding write withcode: 'UNIQUE_VIOLATION',status: 409— and that package has no row.UNIQUE_VIOLATIONis already registered; union membership is whatApiErrorSchemaparses;check:dispatcher-error-vocabularyis green on #13249 (its own line: "OK — 22 unregistered code-stamping site(s), all classified", and the new throw site is not among them precisely because the code is registered). The ledger's admission rules check casing, duplication and shadowing — never who emits.So an unlisted emitter is invisible to every mechanism the repo has. The rows exist to answer "who produces this code?", and that question now has a wrong answer that nothing will ever flag.
Ruling: add the row (the dev's option B)
The dev offered three options and recommended B; I agree, and the reasoning for rejecting the other two is worth recording.
Not A ("leave it — nothing is red"). Tempting, and the strongest version of it is that the row is documentary. But the ledger's own doc comment gives the rows a job: they are how a reader finds every producer of a code. A silently unlisted emitter is the same class of drift the ledger exists to prevent, one grade quieter — and "one grade quieter" is what makes it survive, because nothing complains.
Not C ("fold it into #13249"). ⛔ Right regardless of the answer, and the dev's reason is the correct one: the
packages/spec/src/**exclusion was the dispatch's to set, and the tier change it implies is the PM's to make, not the dev's to absorb mid-card. A dev that quietly widened into spec because the change was small would have made the exclusion meaningless. It stopped and reported, which is what the stop condition was for.The deliverable's path limb is
packages/spec/src/**, so:Clause-②: yes;needs:contract-review, and that label stays through amode:subagentdispatch — ⛔ the review is not discharged by dispatching a higher-tier subagent to perform it;CONTRACT_REVIEW_TIERkeeps the label and waits rather than clearing it.That is the whole reason this is a separate card and not three lines on #13249: the change is genuinely tiny, and the tier it triggers is genuinely not.
Deliverable
Add the provenance row for
@objectstack/driver-memorynamingUNIQUE_VIOLATIONinerror-code-ledger.zod.ts, in the form the file's existing rows use. ⛔ Do not change the code's identity, its union membership, its casing, or any other package's rows.Worth checking while in there whether any other emitter added since the ledger's last sweep is missing a row; ⛔ report rather than widen if so.
Related
#13197 / PR #13249 (the change that creates the gap) · #13239 (the other follow-up from the same card)