Uh oh!
There was an error while loading. Please reload this page.
test(driver-turso): pin the unbacked-conflict-target refusal across both faces (#8568) - #8579
Conversation
…oth faces (#8568) The refusal is pinned on the remote face here and on the local face in driver-sql's own suite, each against its OWN literal — so a reword of one package that updates its own literal drifts the pair with every suite green. TursoDriver picks its face from url, so that drift makes the answer to one condition a property of the connection string (#5240). Adds a local-face case beside Pin 3 that raises the same condition on both faces and compares the two RUNTIME errors to each other (message, code, status), plus a two-face positive control so the agreement cannot be bought by refusing every conflictKeys upsert. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VoxQqG5FiUHZKCST7KDoZC
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
os-zhuang
commented
Aug 13, 2026
ACCEPT — reviewed against the tree at The one thing this card could have gotten wrong is the thing it exists to prevent, so I checked that first and directly: expect(localErr!.message).toBe(remoteErr!.message);expect(localErr!.code).toBe(remoteErr!.code);expect(localErr!.status).toBe(remoteErr!.status);Two runtime values, compared to each other. Not each against its own literal — which is the form that stays green forever while the faces drift, i.e. the defect re-created inside its own fix. Confirmed present in the diff, not merely described. Verified independently of the description:
Reverse verification, both legs, is the part that makes this a pin rather than a decoration. Leg 2 is the one that matters: rewording only the remote face turns it red while all nine pre-existing cases stay green — Pin 3 included, because its assertions are token regexes ( The stale- Scope and disposition: Holding ready + merge queue until all 24 check runs report green — several are still Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8568
Test-only. Adds the cross-face parity pin for the unbacked-conflict-target refusal to
packages/drivers/driver-turso/src/turso-local-remote-unique-parity.test.ts, beside the existing remote-only Pin 3.What was missing
One condition — a
conflictKeysupsert whose target no unique index backs — is refused on bothTursoDriverfaces, in one wording by #5240. Both existing pins are single-face and each pins its own wording as a literal: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.tsasserts the LOCAL face's first sentence as a literal.So a reword of one package, with its own literal updated in the same commit, drifts the pair while every suite stays green.
TursoDriverpicks its face fromurl, so that drift makes the answer to one condition a property of the connection string.The assertion
Two RUNTIME errors, raised from one condition on both faces, compared to each other — never each against its own literal, which is the form that stays green forever while the faces diverge:
Two guards around it, both load-bearing:
TypeErroronnull;VALIDATION_ERROR/400, plus the SQLite ground truth surviving ascauseon both faces). Agreement alone is satisfied by both faces regressing together — two raw SqliteErrors agree oncode: 'SQLITE_ERROR'and onstatus: undefinedjust as well. This is a value assertion, not a wording literal: an identical reword of BOTH faces keeps{ field: {} }(零个操作符的字段约束)在同仓有三个答案:driver-sql 组合子内 TRUE、顶层抛 INVALID_FILTER、formula/driver-memory FALSE #5240 satisfied and is meant to stay green.Plus a two-face positive control, mirroring Pin 3's: a pair of faces refusing every
conflictKeysupsert would agree perfectly, so both must still MERGE on a backed target.Reverse verification — direction predicted per leg, both legs run
Two-way redness is the whole property; a pin red on one leg only is the one-way pin this card replaces.
driver-sql)1 failed / 9 passeddriver-turso)1 failed / 9 passedLeg 2 is the one worth reading: under it every pre-existing pin stayed green, Pin 3 included — its assertions are token regexes (
/crm_contact_plain/,/email/,/unique/i) that a reword preserving those words walks straight past. That is precisely how the drift could have landed unnoticed. In leg 1, #8445's own literal pin also went red, which is the literal a drifting author updates in the same commit.One measured trap recorded in the file header: the local face arrives through the BUILT
@objectstack/driver-sql(this package resolves the workspace dependency to itsdist, no vitest alias tosrc), so leg 1 ran GREEN against a staledistuntil that package was rebuilt — which reads exactly like a pin that does not work.Both reworded faces were restored from the commit;
git diff origin/main --statis the one test file, 117 insertions.Scope and changeset
No production code —
sql-driver.tsandremote-transport.tsare untouched in the diff. Nothing user-visible ships, so this takes theskip-changesetlabel rather than a changeset file;check-empty-changesetbans a stub, and a declaring changeset would announce a release note for a change no consumer can observe.Related: #8445, #8413, #5240 (one condition, one wording), #6203 / #5769 (the two-answers-per-connection-string defect class).
Generated by Claude Code