Skip to content

[finding] INVALID_FIELD is published with two different meanings — and the one in error-handling.mdx («Field value has wrong type») matches no producer I could find #15800

Description

@zhuangjianguo

Ungraded and unrouteddomain:*, priority and type are triage's. Filed unassigned by the domain:engine execution seat.

Surfaced by the CONTRACT_REVIEW_TIER re-review of PR #15708 (5550562004), which named it as a real pre-existing drift row it could not file itself (⛔ a review posts nothing). Verified and narrowed further here before filing.

Two published meanings for one code

page what it publishes
content/docs/protocol/kernel/error-handling.mdx:302-304 #### `INVALID_FIELD` · HTTP Status: 400 · Meaning: Field value has wrong type, with the example body "message": "Field 'age' must be a number"
content/docs/api/error-catalog.mdx:71 ### `INVALID_FIELD` · Cause: 「A field name in the request does not exist on the target object」 …plus every other read axis that names a field

Those are different conditions: a value of the wrong type versus a name that resolves to nothing. Both ship.

⚠️ The sharper reading: one of the two appears to have no producer at all

Measured on origin/main:

⇒ 「Field value has wrong type」 looks like a meaning without an emitter, not merely a second meaning. If so, an operator reading that page waits for a message the platform never sends, and the documented example (Field 'age' must be a number) is a fabrication of the docs rather than a quotation of the runtime.

⛔ What is deliberately NOT claimed

  • ⚠️ The zero is scoped, not repo-wide. I grepped one file (engine.ts) for one family of spellings. A type-shaped INVALID_FIELD producer may exist elsewhere — in validation, in the REST ingress, or under wording my pattern does not match. Stating 「no producer exists」 as a fact would be exactly the over-claim this repo keeps paying for. The measurement that settles it is a repo-wide producer sweep with a firing control, and it has not been run.
  • This is not PR feat(objectql,cli): backfillSummaryNulls accepts recomputeUndefinedOnEmpty — a just-declared min/max/avg roll-up can be filled on request (#15064) #15708's defect and is ⛔ not blocking it. That PR adds a name-shaped producer, which the catalog entry already covers; the review classified the page as anchor-noise for its own diff and was right to.
  • ⛔ No claim about which page should change. If the type meaning has a real producer, the catalog's Cause is incomplete; if it does not, error-handling.mdx is publishing a condition that does not exist. Those are opposite fixes and the measurement above decides between them.

Why it is worth a card

INVALID_FIELD is a standard-catalog code with a growing producer set — PR #15708 is adding one now, and the contract-review rounds on that card turned on precisely 「which code does this condition take」. A code whose two published pages disagree cannot answer that question, and the next author resolves it by picking whichever page they opened first. ADR-0112's 「one condition, one wire code」 has a mirror obligation: one wire code, one published meaning.

Re-check

git show origin/main:content/docs/protocol/kernel/error-handling.mdx | sed -n '300,315p'
git show origin/main:content/docs/api/error-catalog.mdx | sed -n '71,80p'
# the sweep this card does NOT claim to have run — with a firing control:
git grep -n "INVALID_FIELD" origin/main -- 'packages/**/*.ts' | grep -v '\.test\.ts'
git show origin/main:packages/objectql/src/engine.ts | grep -cE 'must be a (number|string|boolean)'   # 0, scoped to this file only

Dedup: ⚠️ /search/issues answers 403 in this container and an empty search is not a reading — repo-scoped REST list of open cards plus a local grep; no open card names this disagreement. Related: #15064 / PR #15708 (the third producer, and the review that surfaced this) · 5550562004 (the verdict's boundary flag) · #15779 (the sibling --json envelope gap on the same refusal path) · ADR-0112.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions