Observed while taking the #11152 readings. Filed unassigned as an observation — it is a reach question about an existing harness, not a defect with a settled fix.
What was observed
packages/drivers/driver-sql/src/sql-driver-aggregation-conformance.test.ts constructs its driver with a literal:
driver=newSqlDriver({client: 'better-sqlite3',connection: {filename: ':memory:'},useNullAsDefault: true,});Its sibling sql-driver-pagination-conformance.test.ts — the same family, the same package — goes through live-dialect-matrix.testkit.ts and so runs on Postgres and MySQL whenever OS_TEST_POSTGRES_URL / OS_TEST_MYSQL_URL are provisioned.
So the shared aggregate-vocabulary standard, which exists so that two faces of one platform cannot answer one aggregation two ways, is measured on exactly one dialect of the driver that speaks three.
Why it matters, concretely
This is not hypothetical reach. Measured on a live PostgreSQL 16.13 (recorded on #11455): sum, avg, min and max over a boolean column all throw42883 on Postgres while answering normally on SQLite. The aggregation conformance suite is green throughout, on main, on every PR — because no cell of it has ever executed against Postgres.
That is the same shape the testkit's own head note was written about, quoted from it:
a hard-coded client is invisible. sql-driver-temporal-conformance.test.ts carried four of them while its own head note claimed it ran "against real Postgres and MySQL too" — declared != enforced, and the ADR's Postgres at minimum never executed for the matrix at all.
ADR-0053 D-A3 states the matrix is driver {SQLite, Postgres at minimum}.
What it would take, and the reason this is filed rather than done
Converting the suite is more than swapping the constructor: the fixture is seeded per cell, the count/count_distinct answers come back as strings on pg (measured: count(flag) => [{"n":"6"}], types=["string"]) where SQLite hands back numbers, so actualFor's Number(r.n) coercion and the readback assertions need a per-dialect reading rather than a mechanical port. And on today's main the converted suite would be red on Postgres for any boolean case, and red for the reason #11455 records rather than for a reason this conversion introduces.
So the order matters: #11455 (or whatever settles the boolean-aggregand contract) first, this conversion after. Doing it in the other order lands a red.
Related: #11152, #11455, #11249, #11065.
Observed while taking the #11152 readings. Filed unassigned as an observation — it is a reach question about an existing harness, not a defect with a settled fix.
What was observed
packages/drivers/driver-sql/src/sql-driver-aggregation-conformance.test.tsconstructs its driver with a literal:Its sibling
sql-driver-pagination-conformance.test.ts— the same family, the same package — goes throughlive-dialect-matrix.testkit.tsand so runs on Postgres and MySQL wheneverOS_TEST_POSTGRES_URL/OS_TEST_MYSQL_URLare provisioned.So the shared aggregate-vocabulary standard, which exists so that two faces of one platform cannot answer one aggregation two ways, is measured on exactly one dialect of the driver that speaks three.
Why it matters, concretely
This is not hypothetical reach. Measured on a live PostgreSQL 16.13 (recorded on #11455):
sum,avg,minandmaxover a boolean column all throw42883on Postgres while answering normally on SQLite. The aggregation conformance suite is green throughout, onmain, on every PR — because no cell of it has ever executed against Postgres.That is the same shape the testkit's own head note was written about, quoted from it:
ADR-0053 D-A3 states the matrix is
driver {SQLite, Postgres at minimum}.What it would take, and the reason this is filed rather than done
Converting the suite is more than swapping the constructor: the fixture is seeded per cell, the
count/count_distinctanswers come back as strings onpg(measured:count(flag) => [{"n":"6"}],types=["string"]) where SQLite hands back numbers, soactualFor'sNumber(r.n)coercion and the readback assertions need a per-dialect reading rather than a mechanical port. And on today'smainthe converted suite would be red on Postgres for any boolean case, and red for the reason #11455 records rather than for a reason this conversion introduces.So the order matters: #11455 (or whatever settles the boolean-aggregand contract) first, this conversion after. Doing it in the other order lands a red.
Related: #11152, #11455, #11249, #11065.