Skip to content

Commit 5247fda

Browse files
huangyiireneclaude
andauthored
docs(metadata-protocol): fix stale where-slot arity note in ARRAY_VALUED_QUERY_SLOTS docblock (#8151)
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 Claude-Session: https://claude.ai/code/session_01AmES43BMDg4bPrxTdi5q7t Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7c21fb2 commit 5247fda

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/metadata-protocol/src/protocol.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,8 +1747,13 @@ const WIRE_DOLLAR_ALIASES: readonly (readonly [string, string])[] = [
17471747
* and the array from either slot.
17481748
* - `where` — a FILTER AST is an array (`['status','=','open']`), so a
17491749
* blanket arity refusal here would reject the AST body form
1750-
* outright. A repeated `?filter=` is still refused, one
1751-
* block down, by `isFilterAST` failing to read it.
1750+
* outright. Arity for this slot is judged one layer up, at
1751+
* the REST querystring ingress (`assertFilterParamSuppliedOnce`,
1752+
* #7390) — the only layer that knows an array on this wire
1753+
* is a repetition and can be nothing else. A repeated
1754+
* `?filter=` never reaches this block on `GET /data/:object`;
1755+
* worse, `?filter=status&filter=%3D&filter=open` spells a
1756+
* valid AST and succeeds with a filter nobody expressed.
17521757
* - `groupBy` — `z.array(GroupByNodeSchema)`.
17531758
* - `aggregations` — `z.array(AggregationNodeSchema)`.
17541759
* - `joins` / `windowFunctions` — retired ARRAY keys (#4286). The tombstone,

0 commit comments

Comments
 (0)