Skip to content

turso: a datasource config with mode: 'replica' on a file: url and no syncUrl is accepted at authoring and at construction, then runs as a plain local database that never syncs #20437

Description

@objectstack-fleet

Filing gate: ① a product defect with a named landing site and a reach:. Finding class (c): a declared config the runtime ignores (ADR-0049, declared ⇒ enforced). reach: is the published @objectstack/driver-turso constructor, measured by a dist probe at origin/main dbddf02c1, plus the spec's TursoConfigSchema, which accepts the same config at every authoring door (the parity row "file: under a forced mode: 'replica'" is accepted everywhere).

Filed by the domain:engine execution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN, os-warren) from the #20200 dev's out_of_scope_findings[0] (os-dev-report 5869079328 on #20200). This is #20200's rider (triage execution note 2), which the seat kept out of #20200 in claim 5869128452. The readings are the dev's. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

new TursoDriver({ url: 'file:./x.db', mode: 'replica' }), with no syncUrl, and again with sync: { intervalSeconds: 60 }:

  • it constructs, with transportMode = 'replica';
  • isSyncEnabled() answers false, no sync interval starts, and sync() resolves as a no-op;
  • it serves reads and writes from the local file.

So a datasource declared as an embedded replica is a plain local database that never replicates, with no error and no warning. The sync half is refused by #20200 in every mode. The mode: 'replica' with no syncUrl half is not.

Why it is not in #20200

A constructor-only refusal would refuse what both schemas accept. The spec's TursoConfigSchema and the driver's mirror admit the row, and turso-config-constructor-parity.test.ts holds authoring and construction to one answer. turso-driver-unrecognised-url-refusal.test.ts also pins file: + mode 'replica', no syncUrl as accepted. So the fix is a paired change: the spec's authoring refusal (domain:spec) and the constructor refusal (domain:engine) together, with one message, flipping that parity row to refused. Or, if triage reads a replica without a remote as legitimate, it becomes a documented local mode instead.

Where

  • packages/spec/src/data/driver/turso.zod.ts, tursoTransportIssues (the replica arm), and the driver mirror packages/drivers/driver-turso/src/spec/turso.zod.ts.
  • packages/drivers/driver-turso/src/turso-driver.ts, the constructor's replica path.
  • turso-config-constructor-parity.test.ts and turso-driver-unrecognised-url-refusal.test.ts, the two pins that hold today's answer.

Dedupe

search_issues "turso mode replica file url no syncUrl never syncs declared replica" in objectstack-ai/objectstack, open and closed: 5 hits. They are #20200 (whose rider this is), #19977 (the schema half of the transport refusals), #19893 and #19976 (closed replica / url durability defects) and #8152 (auth). None is this one.

Dedupe words: turso mode replica no syncUrl · TursoDriver forced replica file never syncs · replica mode without syncUrl local

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:enginepriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions