You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): correct os explain query to where / orderBy, and assert key retention
The `query` catalog entry taught `filters` and `sort`. `BaseQuerySchema` is a
plain `z.object`, so both were dropped silently: the example parsed clean and
came back with no filter and no ordering, and the #14811 sweep was green on it
because `safeParse(...).success` stays true through a silent strip.
Both faces corrected to the schema's own spellings — `where` (one condition
tree, not a `Filter[]`) and `orderBy` (sort nodes whose direction key is
`order`, never `direction`).
The sweep grows a key-retention assertion: an example must parse AND survive
the parse with every declared key intact. Green across all nine bound entries
today — eight refuse unknown keys outright and `query` was the only open top
level — so it lands as a ratchet against a bound entry resolving to an open
top level again, not as a patch over a large hole.
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
Co-authored-by: Claude <noreply@anthropic.com>
{name: 'sort',type: 'SortConfig[]',description: 'Order by configuration'},
255
+
{name: 'where',type: 'FilterCondition',description: 'The condition TREE the query filters by — one object, never a `Filter[]`. A field-keyed entry is a condition on that field (a bare value is implicit equality, an object is a map of `$` operators such as `$in` / `$gte` / `$contains`), and `$and` / `$or` / `$not` combine conditions.'},
256
+
{name: 'orderBy',type: 'SortNode[]',description: 'Sort nodes, each `{ field, order }` with `order` one of `asc` / `desc`. The direction key is spelled `order` — `direction` is rejected by name, because when it was merely dropped the sort fell back to `asc` and, with `limit`, returned a different set of rows under an ordinary success.'},
251
257
{name: 'limit',type: 'number',description: 'Maximum records to return'},
0 commit comments