docs(api): INVALID_FIELD's searchFields clause covers the two value-shape refusals (#15882) - #16269
Merged
baozhoutao merged 1 commit intoSep 6, 2026
Conversation
…hape refusals The searchFields parenthetical in the INVALID_FIELD Cause only described the "real field outside the searchable set" refusal. It did not cover the two shape refusals raised by assertSearchFieldsAreSearchable (an array entry that is not a string, and a value that is neither a comma-separated string nor an array) — both of which throw the same code/status/param, just on a different axis of the value. This is a coverage gap in one clause of the Cause text, not a second meaning for the code (#15882). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
baozhoutao
marked this pull request as ready for review
September 6, 2026 11:43
baozhoutao
enabled auto-merge
September 6, 2026 11:43
baozhoutao
deleted the
claude/issue-15882-error-catalog-searchfields-shape
branch
September 6, 2026 12:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15882
What changed
Extended the
searchFieldsparenthetical inside the### INVALID_FIELDentry ofcontent/docs/api/error-catalog.mdx(lines 71-80 onorigin/main) so it also names the two value-shape refusals on that axis, alongside the existing "real field outside the searchable set" clause. No other entry in the file was touched.Producer sites (verified on
origin/mainat dispatch tip0e16fc454, re-read on the branch base77781151d)Both live in
packages/metadata-protocol/src/protocol.ts, insideassertSearchFieldsAreSearchable(function starts:9788)::9800-9807— array-entry-not-a-string:'${param}' entry #${badShape + 1} on object '${object}' is not a field name. '${param}' narrows which columns 'search' scans, as a comma-separated string or an array of field names.Setserr.code = 'INVALID_FIELD'(line 9804),err.status = 400(9805),err.param = param(9807).:9813-9821— value neither string nor array:'${param}' on object '${object}' must be a comma-separated string or an array of field names, received ${...}.Setserr.code = 'INVALID_FIELD'(9818),err.status = 400(9819),err.param = param(9821).Both confirmed:
code = 'INVALID_FIELD',status = 400, and the offending name lands inparam(notfield) — matching the catalog's existing framing for this axis.:9556classification: that line ('${param}' entry #${badShape + 1} on object '${object}' is not a field name.) lives inassertProjectionFieldsExist, notassertSearchFieldsAreSearchable— it is thefields/projection axis's own array-shape refusal (the retired nested-select object form,{ field, fields, alias }), a structurally identical message reused on a different parameter. It is not a thirdsearchFieldssite. The card's "two" producer sites forsearchFieldsstands; the fix covers exactly those two.Denominator re-run
Unchanged from triage's reading — 22
INVALID_FIELDassignment sites, of which the two above are thesearchFields-axis shape refusals this PR's clause now names.Framing
Per triage (endorsed and carried into this PR): the shape refusal is still field-name-flavoured — the value being refused is a list of field names. This is a coverage gap in one clause of the Cause text, not a second meaning for the code. The code, status, and
paramfield are unchanged; only the Cause prose is extended to describe both refusals this axis already raises.packages/metadata-protocolwas not touched.Gates
39 commands derived via
node scripts/pm/dispatch-gates.mjs --commands content/docs/api/error-catalog.mdxat branch base77781151d, all run to completion, all passing at head7f49c35a6(identical file content between the pre-commit working tree and the commit — no further edits after the gate run):node scripts/check-ci-filter-parity.mjs— 0node scripts/check-closing-keyword-parity.mjs(+--self-test) — 0 / 0node scripts/check-comment-mask-corpus.mjs— 0node scripts/check-doc-frontmatter.mjs(+--self-test) — 0 / 0node scripts/check-doc-route-spelling.mjs --advisory/--self-test— 0 / 0node scripts/check-docs-section-name.mjs(+--self-test) — 0 / 0node scripts/check-section-landing-index.mjs(+--self-test) — 0 / 0pnpm --filter @objectstack/lint run check:doc-formula-expressions— 0 (after building@objectstack/spec+@objectstack/lintdependency closure through the shared verify lock; first attempt returnedPREREQUISITE NOT METexit 3 pre-build)pnpm --filter @objectstack/lint run check:doc-security-posture— 0 (same prerequisite)pnpm --filter @objectstack/spec run check:docs— 0 (same prerequisite; needsgen:schema's output, produced by thespecbuild)pnpm --filter @objectstack/spec run check:empty-state— 0pnpm --filter @objectstack/spec run check:liveness— 0pnpm --filter @objectstack/spec run check:skill-examples— 0 (needed@objectstack/client-reactbuilt too; first two attempts werePREREQUISITE NOT METexit 1 for missing.d.ts— built via the shared lock, then green)pnpm --filter @objectstack/spec run check:strictness-ledger— 0pnpm --filter @objectstack/spec run check:variant-docs— 0pnpm --filter @objectstack/spec run check:yaml-examples— 0pnpm check:corpus-claim-drift— 0pnpm check:cross-package-test-inputs— 0pnpm check:doc-anchors— 0pnpm check:doc-authoring— 0pnpm check:docs-audit-scope— 0pnpm check:docs-redirects— 0pnpm check:docs-single-h1— 0pnpm check:docs-transcript-drift— 0 (same lint-build prerequisite as above)pnpm check:driver-memory-census— 0pnpm check:error-status-conformance— 0pnpm check:nul-bytes— 0 (re-run after commit, at head7f49c35a6)pnpm check:published-readme-links— 0pnpm check:react-page-adapter-contract— 0pnpm check:refd-timer-probe— 0pnpm check:role-word— 0pnpm check:skill-identifier-liveness— 0pnpm check:vendor-version-stamps— 0pnpm check:watch-hint-literal— 0TURBO_SCM_BASE="$BASE" pnpm exec turbo ls --affectedreports 0 affected packages for this diff (purecontent/docsprose, no package build graph edge) — no dependency-closure build was owed for the diff itself; the three builds above were pulled in only as prerequisites of otherwise-unrelated whole-tree doc gates that read compileddist/, not because this change touches those packages' sources.Changeset
content/docs/**publishes nothing from any released package →skip-changesetlabel applied to this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
Generated by Claude Code