Filed out of #8445. Observation-class: a test-coverage gap, no runtime defect. Unassigned.
The state after #8413 and #8445
One condition — a conflictKeys upsert whose target no unique index backs — is now refused on both TursoDriver faces, and by #5240 both must say it in one wording:
TursoDriver picks its face from url, so both can answer in one deployment and a reword of either makes the answer a property of the connection string.
The gap
Nothing compares the two. What exists:
So a future PR touching one package can drift the pair and both suites stay green. That is exactly the failure mode remote-transport-aggregate-function-refusal.test.ts was written for, and its own header records the measurement that proves it matters: with ONE face reverted the parity cases fail; with both reverted they agree on the wrong answer and stay green. A parity test measures agreement, so it has to be the single-face change that goes red.
The shape of the fix
Add a local-face case to turso-local-remote-unique-parity.test.ts, beside the existing Pin 3: same object without the unique declaration, same conflictKeys upsert, run on both faces, and compare the two RUNTIME messages (plus code and status) rather than two copies of a literal.
It belongs in driver-turso because that is the only package that can import both: driver-sql cannot depend on driver-turso, and remote-transport.ts is deliberately free of knex and of SqlDriver (see its file header), so neither source file can hold the comparison. #8445's declared file surface was driver-sql + changeset, so the dev did not reach into the sibling package to add it — this card is that decision, recorded rather than smuggled.
Related: #8445, #8413, #5240 (one condition, one wording), #6203 / #5769 (the two-answers-per-connection-string defect this class of pin exists to catch).
Generated by Claude Code
Filed out of #8445. Observation-class: a test-coverage gap, no runtime defect. Unassigned.
The state after #8413 and #8445
One condition — a
conflictKeysupsert whose target no unique index backs — is now refused on bothTursoDriverfaces, and by #5240 both must say it in one wording:driver-turso'sremote-transport.ts,refuseUnbackedConflictTarget(drivers(turso): the remote face dropsuniqueentirely — a declared-unique column takes duplicates, and an upsert onconflictKeysdies with a raw SqliteError #8413).driver-sql'ssql-driver.ts, same-named helper, first sentence copied verbatim (drivers(sql): anupsertwhoseconflictKeyshave no backing unique index throws a raw SqliteError — the local twin of #8413's consequence 2 #8445).TursoDriverpicks its face fromurl, so both can answer in one deployment and a reword of either makes the answer a property of the connection string.The gap
Nothing compares the two. What exists:
turso-local-remote-unique-parity.test.tsPin 3 asserts the refusal on the remote face only — the local face was still raw when that file was written.upsertwhoseconflictKeyshave no backing unique index throws a raw SqliteError — the local twin of #8413's consequence 2 #8445'ssql-driver-upsert-conflict-target-envelope.test.tspins the first sentence as a literal, which is one-way by construction: it fails if the local face is reworded and cannot see a reword of the remote one.So a future PR touching one package can drift the pair and both suites stay green. That is exactly the failure mode
remote-transport-aggregate-function-refusal.test.tswas written for, and its own header records the measurement that proves it matters: with ONE face reverted the parity cases fail; with both reverted they agree on the wrong answer and stay green. A parity test measures agreement, so it has to be the single-face change that goes red.The shape of the fix
Add a local-face case to
turso-local-remote-unique-parity.test.ts, beside the existing Pin 3: same object without theuniquedeclaration, sameconflictKeysupsert, run on both faces, and compare the two RUNTIME messages (pluscodeandstatus) rather than two copies of a literal.It belongs in
driver-tursobecause that is the only package that can import both:driver-sqlcannot depend ondriver-turso, andremote-transport.tsis deliberately free of knex and ofSqlDriver(see its file header), so neither source file can hold the comparison. #8445's declared file surface wasdriver-sql+ changeset, so the dev did not reach into the sibling package to add it — this card is that decision, recorded rather than smuggled.Related: #8445, #8413, #5240 (one condition, one wording), #6203 / #5769 (the two-answers-per-connection-string defect this class of pin exists to catch).
Generated by Claude Code