Commit 1a651dd
committed
test(driver-sql): run the pagination and filter-logic matrices across the driver axis (#4714)
#4245 (PR #4713) put the D-A3 driver axis under the temporal matrix and left a
reusable `live-dialect-matrix.testkit.ts` behind. Two other consumers of the
shared `@objectstack/spec/data` matrices in this package were still pinned to
one engine:
- `sql-driver-pagination-conformance.test.ts` — `client: 'better-sqlite3'` in
both describes, over `PAGINATION_CASES` / `PAGINATION_UNORDERED_CASES`;
- `sql-driver-or-filter.test.ts` — same client, over `FILTER_LOGIC_CASES`,
with the describe named `(SQLite)`.
The pagination one is the costly pin. Its own head note says the property half
proves nothing on SQLite: twelve rows come back in rowid order every time, so
the partition check passes with or without the tie-breaker. That is a local
fact about one engine, stated as a permanent excuse — on a real server the
property is the half with teeth, which is what objectui#3106 was reported as.
Both files now sweep once per cell of `DIALECT_CELLS` over the same cases,
asserting the same row-id sets cell for cell. Measured on a live PG 16 @
Asia/Shanghai and MariaDB 10.11 @ +08:00 under TZ=America/New_York: 46 tests per
cell, all three cells identical. With `paginationTieBreaker` sabotaged to return
null, the live-postgres cell reports 11 distinct ids over a 12-row walk — one
row served twice, another never — while every sorted case on SQLite stays green.
The cell exists and it bites.
- Table names carry the issue prefix (`os4714_*`); the bare `t` / `task` this
suite used while SQLite-only would collide with a parallel suite on a shared
live database and read as a conformance failure.
- `declareUnprovisionedCell` moves into the testkit and the temporal file now
calls it too, so one definition of the non-vacuity guard serves all three
matrices: missing URL is a named skip, and a red under
`OS_EXPECT_LIVE_DIALECT_MATRIX=1` (#4646).
- No server-timezone axis here: nothing in these matrices compares an instant,
so requiring a non-UTC server would only manufacture reds that say nothing
about pagination or `$or`.
- The unpaged-unordered read keeps its exact-sequence pin on SQLite only. #4363
promises the driver adds nothing to that shape, not that the server returns a
particular order — MySQL hands back InnoDB primary-key order and Postgres its
heap order, and pinning either would assert the server's plan as our contract.
The contract half (no ORDER BY emitted) is asserted per dialect.
- No new CI job: `Temporal Conformance (live PG + MySQL)` already runs the whole
package against both servers.
`@objectstack/spec/data` is consumed, not edited: no case was softened and no
tie-breaker was added to the fixture to keep a dialect green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Br2xsJsczFsTR9bvbh2Ny1 parent d52d4fe commit 1a651dd
5 files changed
Lines changed: 527 additions & 315 deletions
File tree
- .changeset
- packages/plugins/driver-sql/src
| 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 | + | |
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
137 | 168 | | |
138 | 169 | | |
139 | 170 | | |
| |||
Lines changed: 134 additions & 75 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
21 | 43 | | |
22 | 44 | | |
23 | | - | |
| 45 | + | |
24 | 46 | | |
25 | 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 | + | |
26 | 77 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
30 | 81 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
36 | 95 | | |
37 | | - | |
38 | 96 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
48 | 100 | | |
49 | | - | |
50 | | - | |
51 | 101 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
55 | 113 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
64 | 139 | | |
65 | | - | |
66 | | - | |
67 | 140 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 141 | + | |
| 142 | + | |
83 | 143 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 144 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
101 | 156 | | |
102 | | - | |
103 | | - | |
104 | 157 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
109 | 169 | | |
110 | | - | |
111 | 170 | | |
112 | 171 | | |
113 | | - | |
| 172 | + | |
0 commit comments