Commit 716ac9b
* fix(driver-sql): refuse an unresolvable WHERE column on both find() and count() (#8790)
One predicate had two answers: the #3821 ladder's rungs all re-apply
`query.where`, so a WHERE-side unknown column could never be recovered and
fell to `return []`, while `count()` — which has no ladder — threw the
dialect's own error with the bound literals inlined.
Both halves now refuse with the ADR-0112 envelope this path already declares:
`INVALID_FILTER` / 400, naming the column. The dialect message goes to the
server log instead of the caller. The ladder's projection and ORDER-BY
recoveries are deliberately untouched — only the WHERE-failure terminal
becomes a refusal (maintainer ruling 2026-08-15).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeQRiAa7vYRVX5Fog7Zby8
* test(driver-sql): type the refusal suite's queries as DriverQuery
`check:query-options-erasure` measured the new suite growing the test
surface 240 -> 256: sixteen `as any` casts on the query argument. That is
the erasure `DriverQuery` exists to prevent — its own docblock records that
a direct caller holding only a `where` reached for a blanket cast and lost
`where`'s type with it. Typed instead of ceiling-raised; the ratchet is back
at 240.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeQRiAa7vYRVX5Fog7Zby8
* test(driver-sql): scope the refusal pins to plain columns; record the dotted key per dialect
Live-measured on PG 16.13 and MySQL 8.0.46 (origin/main vs this branch): the
three dialects do not agree on what a dotted key IS. knex compiles
{'title.x': v} to the qualified reference "title"."x", so Postgres reads
`title` as a TABLE and raises undefined_table (42P01), not undefined_column
(42703) — a shape the classifier does not match and never has. On Postgres a
dotted key therefore raised a raw 42P01 on BOTH halves before this card and
after it, byte for byte; the card's headline repro is SQLite-specific.
The refusal pins now cover the RULED scope (a plain column the table lacks),
which holds on both recognised dialects. The dotted key is RECORDED per
dialect in DOTTED_STATUS_QUO with #8371 — the open FILTER-axis dotted-path
verdict — named as the owner, plus a both-halves-agree assertion that is true
whichever way #8371 lands. No classifier change: teaching it 42P01 would mint
a dotted-path verdict at the driver and pre-empt that card.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeQRiAa7vYRVX5Fog7Zby8
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a777944 commit 716ac9b
5 files changed
Lines changed: 826 additions & 8 deletions
File tree
- .changeset
- packages
- drivers/driver-sql/src
- spec/src/migrations
- entries/semantic
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
0 commit comments