Skip to content

Commit 582bf0d

Browse files
committed
chore(changeset): patch @objectstack/cli for the os explain query correction
Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 69eda19 commit 582bf0d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.changeset/quiet-pugs-tickle.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
`os explain query` now teaches the two keys `QuerySchema` actually declares.
6+
7+
The entry's example and its two optional-table rows named `filters` and `sort`.
8+
Neither is a key of `BaseQuerySchema`, which is a plain `z.object` — so both
9+
were dropped silently: an author who copied the example got a query that parsed
10+
clean and ran with no filter and no ordering, with nothing in the output saying
11+
so.
12+
13+
Both faces now read the schema's own spellings:
14+
15+
- `where` — one condition **tree**, not a `Filter[]`. A field-keyed entry is a
16+
condition on that field (a bare value is implicit equality, an object is a map
17+
of `$` operators), and `$and` / `$or` / `$not` combine conditions.
18+
- `orderBy` — sort nodes, each `{ field, order }`. The direction key is spelled
19+
`order`; `direction` is rejected by name.
20+
21+
No schema changed, and no accept set moved: the correction is to the catalog
22+
entry only. The `os explain` catalog sweep also gains a key-retention assertion
23+
— an example must parse **and** come back with every key it declares — so the
24+
next entry whose schema strips a key is named instead of passing.

0 commit comments

Comments
 (0)