Uh oh!
There was an error while loading. Please reload this page.
docs(metadata-protocol): fix stale where-slot arity note in ARRAY_VALUED_QUERY_SLOTS docblock - #8151
Conversation
…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
…ay-valued-query-slots-docblock
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8003
What
Corrects the last sentence of the
whererow in theARRAY_VALUED_QUERY_SLOTSdocblock (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:
isFilterASTfailing as if it were the correct answer.isFilterASTfailing producesmalformedFilterArrayError— 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.?filter=onGET /data/:objectcannot 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=onGET /data/:objectno longer reaches this block at all.It also omitted the sharper half of #7390:
?filter=status&filter=%3D&filter=openspells 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 topackages/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 inscripts/check-type-check-coverage.mjs(notypecheckscript; package carries measured debt). None of the 63 are inprotocol.tsitself — 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-changesetis applied to the issue (comment-only, releases nothing).Generated by Claude Code