You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spec: TursoConfigSchema accepts turso configs the driver refuses or ignores — a remote url beside syncUrl or a forced replica/local mode, a non-file: replica, syncUrl/sync under mode: remote #19977
Filing gate: ① a defect with a named landing site: the superRefine of TursoConfigSchema in packages/spec/src/data/driver/turso.zod.ts, and its driver-local copy packages/drivers/driver-turso/src/spec/turso.zod.ts. Finding class (b), with one class-(c) arm folded in (same schema, same refinement).
Seam: spec:TursoConfigSchema.url / .syncUrl / .sync / .mode → runtime: TursoDriver constructor (turso-driver.ts), reached through buildTursoDriverConfig from packages/runtime/src/turso-driver-factory.ts and packages/services/service-datasource/src/default-datasource-driver-factory.ts
Filed by the domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) from the out-of-scope findings of its #19893 dev (report comment 5815469979 on #19893). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.
The contract the schema already states
The spec's own TSDoc on syncUrl reads: "Remote sync endpoint that turns a local file into an embedded replica". Yet the schema's only refinement is sync without syncUrl. It accepts syncUrl beside any url, and mode: 'replica' or mode: 'local' beside a remote url.
Arm 1, class (b): configurations the runtime refuses at construction once PR #19971 lands
PR #19971 (#19893, in flight) makes new TursoDriver(...) refuse with VALIDATION_ERROR / 400:
a remote url beside syncUrl, or under a forced mode: 'replica' / mode: 'local';
a replica whose url is not a local file: path.
Before it lands, these configurations silently lose every write to a :memory: engine (#19893). Either way, authoring accepts a datasource that cannot work: after the PR it fails at connect, and before it, it loses data. The dev measured where the schema is parsed: validateDriverConfig via DatasourceSchema (datasource.zod.ts) and DatasourceAdminService (datasource-admin-service.ts). Neither runtime factory parses a schema, so today the constructor is the only gate.
Arm 2, class (c): syncUrl / sync under mode: 'remote' are silently inert
The dev measured this on the built dist at PR #19971's head 5fb95579: new TursoDriver({ url: 'libsql://r.turso.io', mode: 'remote', syncUrl, sync: { intervalSeconds: 60 } }) constructs.
After connect(), isSyncEnabled() answers true.
sync() rejects SYNC_NOT_SUPPORTED.
createRemoteClient forwards no syncUrl (grep 0), and the remote connect arm starts no interval.
A stored datasource config (producer: the Studio datasource form / DatasourceAdminService, forwarded by buildTursoDriverConfig) can therefore declare syncing that never happens, while the driver reports it as enabled.
Suggested shape (⛔ not a ruling)
Refine both schema copies to refuse, at authoring, what the runtime refuses or cannot honour, and name the supported spelling in the message (url: 'file:…' beside syncUrl for a replica; the remote url alone for a remote database). Decide in the same card whether the constructor should also refuse syncUrl / sync under mode: 'remote' (arm 2's runtime half), so isSyncEnabled() never answers true for a sync that cannot run.
Filing gate: ① a defect with a named landing site: the
superRefineofTursoConfigSchemainpackages/spec/src/data/driver/turso.zod.ts, and its driver-local copypackages/drivers/driver-turso/src/spec/turso.zod.ts. Finding class (b), with one class-(c) arm folded in (same schema, same refinement).Seam:
spec:TursoConfigSchema.url / .syncUrl / .sync / .mode→runtime: TursoDriver constructor (turso-driver.ts), reached through buildTursoDriverConfig from packages/runtime/src/turso-driver-factory.ts and packages/services/service-datasource/src/default-datasource-driver-factory.tsFiled by the
domain:engineexecution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) from the out-of-scope findings of its #19893 dev (report comment 5815469979 on #19893). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.The contract the schema already states
The spec's own TSDoc on
syncUrlreads: "Remote sync endpoint that turns a local file into an embedded replica". Yet the schema's only refinement issyncwithoutsyncUrl. It acceptssyncUrlbeside anyurl, andmode: 'replica'ormode: 'local'beside a remoteurl.Arm 1, class (b): configurations the runtime refuses at construction once PR #19971 lands
PR #19971 (#19893, in flight) makes
new TursoDriver(...)refuse withVALIDATION_ERROR/ 400:urlbesidesyncUrl, or under a forcedmode: 'replica'/mode: 'local';urlis not a localfile:path.Before it lands, these configurations silently lose every write to a
:memory:engine (#19893). Either way, authoring accepts a datasource that cannot work: after the PR it fails at connect, and before it, it loses data. The dev measured where the schema is parsed:validateDriverConfigviaDatasourceSchema(datasource.zod.ts) andDatasourceAdminService(datasource-admin-service.ts). Neither runtime factory parses a schema, so today the constructor is the only gate.Arm 2, class (c):
syncUrl/syncundermode: 'remote'are silently inertThe dev measured this on the built dist at PR #19971's head
5fb95579:new TursoDriver({ url: 'libsql://r.turso.io', mode: 'remote', syncUrl, sync: { intervalSeconds: 60 } })constructs.connect(),isSyncEnabled()answerstrue.sync()rejectsSYNC_NOT_SUPPORTED.createRemoteClientforwards nosyncUrl(grep 0), and the remote connect arm starts no interval.A stored datasource config (producer: the Studio datasource form /
DatasourceAdminService, forwarded bybuildTursoDriverConfig) can therefore declare syncing that never happens, while the driver reports it as enabled.Suggested shape (⛔ not a ruling)
Refine both schema copies to refuse, at authoring, what the runtime refuses or cannot honour, and name the supported spelling in the message (
url: 'file:…'besidesyncUrlfor a replica; the remote url alone for a remote database). Decide in the same card whether the constructor should also refusesyncUrl/syncundermode: 'remote'(arm 2's runtime half), soisSyncEnabled()never answerstruefor a sync that cannot run.Filing-gate answers
domain:specseat, as aSeam:card; arm 2's constructor half touchesdriver-turso(domain:engine) after PR fix(driver-turso)!: refuse a remote url beside syncUrl, and any replica not on a local file, instead of running on :memory: #19971 lands.closedincluded:turso syncUrl remote url schema refinement TursoConfigSchema replica file→ 9 hits: driver-turso: a remote url plus syncUrl is classified replica and handed a :memory: Knex connection, so every write lands in process memory and never reaches the remote #19893, driver-turso remote planMediaColumnMove answers empty, so os migrate files-to-references reports nothing to move on a remote Turso database whose media columns are present #19894 (open, driver arms, not the schema), driver-turso remotesyncSchemasBatch— the engine boot door — skips read-coercion registration, managed-object recording and the canonical backfill: a remote boolean can read back as 1, JSON as a string #19844, driver-turso remote mode ignores deferred DDL —os migrate planagainst a remote Turso datasource performs the DDL and the canonical backfill it was meant to preview, and prints no pending work #19823, driver-turso remotedetectManagedDrift()diffs against the dummy:memory:Knex connection remote mode is given — drift is always empty, so the artifact boot migration gate reads a remote Turso database as never drifted #19845, driver-turso: remote mode never materializes object-levelindexes— every declared secondary index is absent on production Turso tenant databases, so hot polling queries full-scan #17609, turso: the bound secret is never read, so post-#8078 a new turso datasource cannot be authenticated by any supported route #8152, turso 迁回本仓后,CLI 的 URL→driver 解析仍对libsql://抛 UnsupportedDriverError —— runtime 的 provisioning 却把 turso 排在偏好第一位,两处口径相反 #5602 (closed, other turso gaps).turso syncUrl sync ignored in remote mode isSyncEnabled SYNC_NOT_SUPPORTED→ 3 hits: driver-turso: a remote url plus syncUrl is classified replica and handed a :memory: Knex connection, so every write lands in process memory and never reaches the remote #19893, driver-turso remote mode ignores deferred DDL —os migrate planagainst a remote Turso datasource performs the DDL and the canonical backfill it was meant to preview, and prints no pending work #19823, driver-turso remotesyncSchemasBatch— the engine boot door — skips read-coercion registration, managed-object recording and the canonical backfill: a remote boolean can read back as 1, JSON as a string #19844. None is this defect.Dedupe words:
turso syncUrl remote url schema refinement·TursoConfigSchema syncUrl file replica refine·turso syncUrl remote mode ignored·isSyncEnabled remote mode syncUrlGenerated by Claude Code