Skip to content

drivers(turso): the unbacked-conflict-target refusal has no cross-face parity pin — the two wordings can drift without a test noticing #8568

Description

@os-zhuang

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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions