Skip to content

Commit 58d167b

Browse files
committed
docs(driver-turso): the replica arm's sync is not cancelled, and the mirror does not declare mode (#16024)
Two prose repairs the contract review raised as non-blocking; no behaviour and no schema changes. - packages/drivers/driver-turso/README.md — the README named both arms and the WebSocket gap but dropped the clause `turso-driver.ts`'s docblock and the changeset both carry: on the replica arm the native binding's own sync is not cancelled, only no longer awaited. Wording matched to the docblock. - docs/design/driver-turso.md §10 — "Both declare exactly the keys the driver reads" overstated: the package-published mirror does not declare `mode`, which `TursoDriver.detectMode` reads. The sentence now claims only the direction ADR-0049 governs (no declared key the driver does not read) and names the gap. The gap itself is pre-existing and deliberately left alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADLdAs2pVcH17h9tZKWMBg
1 parent 18d5e0d commit 58d167b

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

docs/design/driver-turso.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,11 @@ packages/plugins/driver-turso/
513513
`TursoConfigSchema` exists twice on purpose: the authoring contract in
514514
`packages/spec/src/data/driver/turso.zod.ts` (strict — what a `datasource` may declare), and the
515515
package-published Spec / Studio mirror in `packages/drivers/driver-turso/src/spec/turso.zod.ts`.
516-
Both declare exactly the keys the driver reads (ADR-0049 enforce-or-remove); the mirror keeps its
517-
retired keys (`timeout``timeoutMs`; `localPath` and `wasm`, removed) as `z.never()` tombstones
518-
whose refusal carries the prescription. The live keys:
516+
Neither declares a key the driver does not read — the direction ADR-0049 (enforce-or-remove)
517+
governs. The converse does not hold, and the mirror is the shorter list: it does not declare
518+
`mode`, which the driver does read (`TursoDriverConfig.mode`). The mirror keeps its retired keys
519+
(`timeout``timeoutMs`; `localPath` and `wasm`, removed) as `z.never()` tombstones whose refusal
520+
carries the prescription. The live keys:
519521

520522
| Property | Type | Default | Description |
521523
|:---|:---|:---:|:---|

packages/drivers/driver-turso/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ interface TursoDriverConfig {
213213
* client makes is aborted once the window elapses, and the operation fails
214214
* as TIMEOUT / 504 instead of hanging. wss:// and ws:// URLs use the
215215
* WebSocket transport, which has no such seam, and are not bounded.
216-
* - Replica mode: bounds sync(), the one remote operation on that arm.
216+
* - Replica mode: bounds sync(), the one remote operation on that arm. A
217+
* sync still running when the window closes rejects with the same
218+
* envelope; the native binding's own sync is not cancelled, only no longer
219+
* awaited.
217220
* Not the libSQL busy timeout (`Config.timeout`), which is a local-file
218221
* lock-contention setting that remote clients ignore.
219222
*/

0 commit comments

Comments
 (0)