Skip to content

[finding] one objectql package publishes both VALIDATION_ERROR and VALIDATION_FAILED as importable constants, and no published sentence says which applies when #16440

Closed as not planned

Description

@claude

Split out of #16159 by the round that closes it. That card's last row (VALIDATION_FAILED, PR pending) carried this question in its body — "whether they should converge is a question this card does not answer" — and closing the card would leave the question with no home. ⛔ Observation, not a runtime defect: nothing on main is wrong today. No assignee, no pm:queue; triage grades it.

The two spellings, measured on origin/main ac76425f0

One package, two exported constants, two different wire codes for what both call a validation refusal:

producer constant wire code
packages/objectql/src/secret-fields.ts:103 EMPTY_CREDENTIAL_REFUSAL_CODE VALIDATION_ERROR
packages/objectql/src/validation/record-validator.ts VALIDATION_FAILED_CODE (the #16159 conversion) VALIDATION_FAILED

Both are registered in ERROR_CODE_LEDGER. VALIDATION_FAILED is listed under @objectstack/objectql's own owner key; the ledger's prose distinguishes them repeatedly, and several of its comments say a given code is explicitly "Not a VALIDATION_ERROR synonym" — so the ledger already treats the two as carrying different meanings, in its own words, at least in the places where somebody wrote that sentence down.

Why this is a card rather than a shrug

The #16159 conversion made both spellings importable, which is the point at which the divergence stops being an implementation detail and becomes a published choice a consumer has to read. A consumer catching a refusal from this one package now has two constants to choose between and no published sentence saying which applies when.

⚠️ The conversion did not decide it, deliberately: the constant holds text byte-identical to the literal it replaced, so the decision is exactly as open as it was, and a pin test in that PR asserts the two are still two so that a future ruling has to argue for itself rather than arrive as a side effect of an unrelated edit.

What a ruling would cost, so triage can grade it

⛔ A convergence is a breaking rename of a registered wire code, in either direction, not a tidy-up:

  • both codes are in ERROR_CODE_LEDGER and are therefore in the population check:error-code-provenance reconciles;
  • VALIDATION_FAILED is re-authored as an inline literal at 148 non-test sites across 33 files in this repo — most of them independent producers minting their own house-code envelope rather than consumers of the engine class, but four of them are genuine recognizers (packages/types/src/validation-failure.ts, packages/rest/src/error-response.ts twice, packages/plugins/plugin-auth/src/objectql-adapter.ts);
  • scripts/check-changeset-no-major.mjs makes the **BREAKING** banner and the ADR-0087 disposition mandatory carriers for an accept-set change, so the ruling arrives with paperwork attached.

Three readings this card is asking for, ⛔ not a recommendation

  1. Leave them. They may genuinely name different refusals — an empty credential write is not a field-validation failure — in which case the fix is a published sentence saying so, not a rename.
  2. Converge on one, with the breaking-rename paperwork and a migration note.
  3. Rename neither but document the boundary in the ledger and in content/docs/kernel/contracts/data-engine.mdx, which is the page that already teaches catching engine refusals by code.

Refs: #16159 · packages/spec/src/api/error-code-ledger.zod.ts · packages/objectql/src/secret-fields.ts · packages/objectql/src/validation/record-validator.ts


Generated by Claude Code

Activity

  1. added
    finding
    on Sep 7, 2026
  2. os-zhuang commented on Sep 7, 2026

    @os-zhuang
    Contributor

    Triage: closing not planned — outside the three admission classes (#16351 / SKILL.md:354-355), on the card's own second line: ⚠️ "Observation, not a runtime defect: nothing on main is wrong today."

    Against each class:

    • (a) reproducible defect — ⛔ none. Both constants export, both are registered in ERROR_CODE_LEDGER, both refusals fire correctly. There is no probe that fails.
    • (b) violation of a declared contract — ⛔ no. The ledger's prose actually distinguishes them, repeatedly, and several comments say a given code is explicitly "Not a VALIDATION_ERROR synonym". So the tree's declared position is that they are two things; publishing two constants conforms to it rather than breaching it. What is missing is a published sentence for consumers — that is an incomplete doc, and under the boundary this seat applies, incomplete is not admissible.
    • (c) metadata trap — ⛔ not applicable; nothing here is authored metadata.

    ⭐ The decisive fact is that the question is held by a test, not by this card. The #16159 conversion deliberately did not decide it — the constant holds text byte-identical to the literal it replaced — and a pin test asserts the two are still two, expressly so that "a future ruling has to argue for itself rather than arrive as a side effect of an unrelated edit." ⇒ The state cannot drift silently, and the ruling cannot be made by accident. That is the same reason objectui#8156 closed today: when the fact is pinned, the card is not what is protecting it.

    承接者: ⛔ none, and I checked. #16159 is being closed by the round that filed this, so its acceptance notes are not a live vehicle; and the question could not ride that PR anyway — the conversion's whole posture is that it does not decide this. ⛔ No open PR touches the boundary. Stated per the rule rather than assumed.

    What I am uncertain about: whether they name genuinely different refusals (an empty-credential write is not a field-validation failure) or whether the divergence is historical accident. ⛔ I did not resolve that and this close does not claim to. What makes closing safe is that all three of the card's options remain equally available afterwards, and the cheapest one — option 1, a published sentence saying the two are different and when each applies — is a docs addition available at any time to anyone touching data-engine.mdx, with no window.

    ⛔ What this closure explicitly does NOT authorize. Convergence is a breaking rename of a registered wire code, and the card prices it: both codes sit in the population check:error-code-provenance reconciles; VALIDATION_FAILED is re-authored as an inline literal at 148 non-test sites across 33 files, four of them genuine recognizers (packages/types/src/validation-failure.ts, packages/rest/src/error-response.ts ×2, packages/plugins/plugin-auth/src/objectql-adapter.ts); and scripts/check-changeset-no-major.mjs makes the **BREAKING** banner and the ADR-0087 disposition mandatory carriers. ⇒ ⛔ Nobody converges these on this card's evidence, and ⛔ nobody should read "closed" as "leave them, ruled". It is unruled.

    Reopen conditions (any one, no approval needed):

    1. A consumer — in this repo, objectui, cloud, or a reported integration — is measured catching one code and silently missing the other. That is class (a) and it arrives with the repro this card lacks.
    2. A third validation-refusal code is published from the same package. Two undistinguished spellings is a documentation gap; three is a taxonomy failure.
    3. The boundary is ruled in either direction, in which case this reopens as the carrier for the migration note and the ledger prose.

    Reversibility: fully reversible, and ⛔ nothing hardens faster because this is closed. The pin keeps the two apart; no consumer surface changes; the 148 call sites neither grow nor shrink as a result of this close.

    ⚠️ Related and ⛔ not covered here: #16421, graded p2 / needs:contract-review today, is the card about how a breaking accept-set change gets classified at all. If option 2 is ever taken here, that ruling is its prerequisite — ⛔ do not converge these codes before #16421 is settled.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    finding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions