Skip to content

docs(metadata-protocol): fix stale where-slot arity note in ARRAY_VALUED_QUERY_SLOTS docblock - #8151

Merged
huangyiirene merged 2 commits into
mainfrom
claude/issue-8003-array-valued-query-slots-docblock
Aug 12, 2026
Merged

docs(metadata-protocol): fix stale where-slot arity note in ARRAY_VALUED_QUERY_SLOTS docblock#8151
huangyiirene merged 2 commits into
mainfrom
claude/issue-8003-array-valued-query-slots-docblock

Conversation

@huangyiirene

Copy link
Copy Markdown
Collaborator

Fixes#8003

What

Corrects the last sentence of the where row in the ARRAY_VALUED_QUERY_SLOTS docblock (packages/metadata-protocol/src/protocol.ts, the #7321 arity survey). The first sentence (why a blanket arity refusal would reject the AST body form) is correct and load-bearing — kept unchanged.

The last sentence was wrong two ways:

  1. It described isFilterAST failing as if it were the correct answer. isFilterAST failing produces malformedFilterArrayError — a 400 telling a caller whose filters were each well-formed that their filter is malformed. "Still refused" read as handled when it was not.
  2. It was stale for the route it described: finding: a repeated ?filter= on GET /data/:object cannot be told from a filter AST, so it is diagnosed as a malformed filter (and, rarely, succeeds) #7390 moved arity judgement for this slot to the REST querystring ingress (packages/rest, assertFilterParamSuppliedOnce), so a repeated ?filter= on GET /data/:object no longer reaches this block at all.

It also omitted the sharper half of #7390: ?filter=status&filter=%3D&filter=open spells a valid AST and succeeds with a filter nobody expressed.

The rewritten row tells the next reader which layer owns arity for this slot (the REST querystring ingress) and names #7390, so the docblock's survey purpose — deciding whether a slot needs arity treatment — stays accurate. Per #7390's ruling, enforcement stays in packages/rest; this PR does not move or add any runtime logic to packages/metadata-protocol.

Scope

Comment text only. Zero runtime change — diff touches only the docblock above ARRAY_VALUED_QUERY_SLOTS.

Verification

  • pnpm --filter '@objectstack/metadata-protocol^...' build — green (dependency closure).
  • pnpm --filter '@objectstack/metadata-protocol' build — green.
  • npx tsc --noEmit -p packages/metadata-protocol/tsconfig.json — 63 errors, exactly matching the package's recorded DEBT ledger entry in scripts/check-type-check-coverage.mjs (no typecheck script; package carries measured debt). None of the 63 are in protocol.ts itself — all are in test files, unrelated to this comment-only edit.
  • npx eslint packages/metadata-protocol/src/protocol.ts --no-inline-config — clean, no output.
  • node scripts/check-nul-bytes.mjs — OK.

No changeset: skip-changeset is applied to the issue (comment-only, releases nothing).


Generated by Claude Code

…UED_QUERY_SLOTS docblock
The where row's last sentence described isFilterAST failing as if it were
the correct refusal (it produces malformedFilterArrayError, a 400 telling a
caller whose filters were each well-formed that their filter is malformed),
and was stale for the route it described: #7390 moved arity judgement for
this slot to the REST querystring ingress (assertFilterParamSuppliedOnce),
so a repeated ?filter= on GET /data/:object no longer reaches this block.
Also names the sharper half of #7390: ?filter=status&filter=%3D&filter=open
spells a valid AST and succeeds with a filter nobody expressed.
Comment-only, zero runtime change.
Fixes#8003
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmES43BMDg4bPrxTdi5q7t
@vercel

vercelBot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 12, 2026 6:11pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol.

3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/metadata-lifecycle.mdx(via @objectstack/metadata-protocol)
  • content/docs/kernel/services-checklist.mdx(via @objectstack/metadata-protocol)
  • content/docs/protocol/kernel/http-protocol.mdx(via @objectstack/metadata-protocol)

1 release-owned page(s) also reference the affected code. These are read-only:

  • content/docs/releases/v9.mdx(via @objectstack/metadata-protocol)

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@huangyiirenehuangyiirene added skip-changeset PR has no user-facing published change; bypasses the changeset gate and removed size/xs labels Aug 12, 2026 — with Claude
@huangyiirene
huangyiirene marked this pull request as ready for review August 12, 2026 18:34
@huangyiirene
huangyiirene added this pull request to the merge queueAug 12, 2026
Merged via the queue into main with commit 5247fdaAug 12, 2026
32 checks passed
@huangyiirene
huangyiirene deleted the claude/issue-8003-array-valued-query-slots-docblock branch August 12, 2026 18:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding: the list-query normalizer's where arity note still says a repeated ?filter= is refused by isFilterAST failing

2 participants

@huangyiirene@claude