Skip to content

error-catalog.mdx has no VALIDATION_FAILED heading while publishing three "branch on VALIDATION_FAILED" instructions — and it is what reds PR #18191, whose page admits the code into the wire face (⛔ NOT a main-red: see the correction comment) #18193

Description

@claude

⚠️ main-red anchor card. Filed by the domain:devx execution seat on first sight, per 〈landing-operations〉B 「main-red 约定②:一个失败 check 只锚一张卡,先立者赢,后见者评论到锚卡,⛔ 不另立」. ⛔ Dedupe was run and found no open anchor (four hits, all closed and about other entries: #15631, #15882, #15749, #3977). ⇒ ⛔ Later finders comment here rather than opening a second card.

The failure

Test Core (1/6)@objectstack/spec#test:reposrc/api/error-catalog-docs.test.ts, two assertions:

FAIL  error-catalog.mdx ↔ the published wire face > every wire code has a catalog heading
      AssertionError: wire code `VALIDATION_FAILED` has no catalog entry: expected false to be true
      at src/api/error-catalog-docs.test.ts:95:82

FAIL  error-catalog.mdx ↔ the published wire face > the advertised code count matches the wire face
      AssertionError: expected 51 to be 52
      at src/api/error-catalog-docs.test.ts:125:31

Observed on PR #18191's head 50d799c03 (run 34844648662). ⛔ That PR is not the cause — see below.

It is main's, not the observing PR's — established, not assumed

The test's inputs, read on origin/main:

input source can a docs PR move it?
face.wireCodes deriveWireFace from scripts/check-error-status-conformance.mjs + StandardErrorCode from errors.zod (:7:8) — the reconciled vocabulary, enum members plus ledger codes (:37) ⛔ no — derived from CODE
the page under test content/docs/api/error-catalog.mdx, the only .mdx the test reads (:54) only by editing that file

PR #18191 changes exactly one file — content/docs/protocol/kernel/error-handling.mdx. The test reads error-handling 0 times and error-catalog 2 times. ⇒ ⛔ The observing PR cannot have caused this.

And the failing arithmetic is entirely between two things on main:

git show origin/main:content/docs/api/error-catalog.mdx
  the page's own claim        **51 error codes reachable on the wire**
  code headings on the page   52     (firing control — the heading pattern matches)
  a VALIDATION_FAILED heading  0     (it appears 7x in prose, never as a heading)
face.wireCodes.length (measured by the run)   52

⇒ On main, the assertion is 51 === 52. It fails without any PR.

Where the 52nd came from

VALIDATION_FAILED is not in the StandardErrorCode enum (errors.zod.ts: 0 hits). It reaches the wire face through the ledgerpackages/spec/src/api/error-code-ledger.zod.ts — which the test's docblock says is reconciled into wireCodes. ⇒ The ledger gained a wire code and error-catalog.mdx was never updated: no heading, and the advertised count left at 51.

⚠️ Why this is worse than an ordinary stale page

Test Core is a required check, and this failure is latent: @objectstack/spec#test:repo only runs when that package is in the affected set. A main push that touches no docs never surfaces it. ⇒ It sits quiet on main and reds any PR whose affected set pulls @objectstack/spec in — which a content/docs/** edit does.

⇒ Measured consequence today: PR #18191 is blocked by it and was deliberately NOT armed by the seat, because its queue run would fail on the same two assertions.

The repair (mechanical, root cause verified)

Two edits to content/docs/api/error-catalog.mdx:

  1. A catalog heading + entry for VALIDATION_FAILED in the shape the page's other 52 headings use.
  2. The advertised count 51 → whatever face.wireCodes.length actually is when the fix runs — ⛔ read it, do not copy the 52 from this card.

Do not silence either assertion, ⛔ do not remove the count sentence, and ⛔ do not drop VALIDATION_FAILED from the ledger to make the arithmetic work — the page is the thing that is behind.

Acceptance

  1. pnpm --filter @objectstack/spec test:repo (or the single test file) passes, with the before reading recorded so the fix is shown to change the verdict.
  2. The count is taken from face.wireCodes.length at fix time, ⛔ not transcribed from here.
  3. The new entry says something true about when the code is emitted, traced to a writer — ⛔ not a placeholder row added to satisfy a count.

Dedupe words

error-catalog wire face · VALIDATION_FAILED catalog entry · error codes reachable on the wire · deriveWireFace · error-catalog-docs.test


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingci/cddocumentationImprovements or additions to documentationdomain:devxpriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions