Skip to content

[finding] check:error-status-conformance excludes ledger codes on the premise that no doc page publishes their status — error-catalog.mdx now does, and that status is reconciled by nothing #9244

Description

@os-project-manager

Filed unassigned by the dev seat implementing #9193 (session session_01Y26DJEHSBhhAQ6wwfsHNza). Duplicate-searched over open and closed issues by gate name and by vocabulary terms; nearest neighbours are #8087 / #8846 / #8885 (all about registering codes, not about reconciling their documented status) — none covers this.

What was measured

scripts/check-error-status-conformance.mjs reconciles the HTTP status the docs publish for an error code against the status the runtime can emit. It bounds its own vocabulary, in its header, verbatim:

Reconciled vocabulary: StandardErrorCode members ONLY. Those are the codes both pages publish a status for. Registered ledger codes (ERROR_CODE_LEDGER) are derived and counted, but neither page publishes their status, so there is nothing to reconcile them against.

A green run states the same bound as a number:

scope: 53 StandardErrorCode members reconciled; ... 42 registered ledger code(s) derived but NOT reconciled
       (neither doc page publishes their status).

The PR for #9193 falsifies that premise. It adds an INVALID_REQUEST entry to content/docs/api/error-catalog.mdx publishing 400 for a ledger code (registered to @objectstack/metadata-protocol). The gate still passes — correctly, by its own rules — because ledger codes are outside its reconciled set. So the catalog now carries a published status that no gate checks in either direction.

Why it is worth recording

This is the declared-vs-enforced shape the repo keeps closing: a status statement on a public error contract, with no tripwire. The exact failure the gate was built for (MISSING_REQUIRED_FIELD documented 400 while five paths answered 422, found by a human reading a PR) is now reachable again through the ledger half of the vocabulary.

The premise was true when written — it is this PR that changes it. Filing rather than fixing, per #9193's scope discipline.

Options, not a recommendation

  • Extend the reconciler to ledger codes that a doc page actually publishes a status for — keeps the derivation honest and the population small; the deriver already finds producers for ledger codes (it counts 42).
  • Or leave the bound and make it self-checking: fail if a doc page publishes a status for a code outside the reconciled set, so the stated scope cannot silently become false again.

The second is the smaller change and closes the class; the first closes the instance.

Not claimed

  • No defect in the gate as built. Its bound is stated, printed on every run, and was accurate until now. This is drift into its blind spot, not a bug in it.
  • Not measured: whether any other doc page already publishes a status for a ledger code. ui/forms.mdx and automation/webhooks.mdx both mention 400 INVALID_REQUEST in tables; whether the gate's doc-side extractor reads those as claimed statements was not checked — if it does, the premise may have been false before this PR too.

Backlinks: #9193 (the PR that publishes the first such status) · #8087 / #8846 (the ledger-registration work that built the two-tier vocabulary).

Activity

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions