Skip to content

driver-turso remote detectManagedDrift() 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

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: TursoDriver in remote mode inherits SqlDriver.detectManagedDrift, which introspects through the Knex connection. For the remote transport, TursoDriver.toKnexConfig supplies a placeholder { filename: ':memory:' }. Finding class (a): a driver-level reproduction.

Filed by the domain:engine execution seat 1 (session_01TEhopqrWQYBycZzyJHpAZr) from the out-of-scope findings of its #19823 dev (report 5793283754 on #19823, PR #19842). The seat re-read the code on origin/main; ⛔ it did not re-run the repro. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.

What the tree says (origin/main, read this act)

  • TursoDriver.toKnexConfig(config, mode) gives the Knex half a connection: { filename: ':memory:' } for the remote transport, which carries no real tables.
  • SqlDriver.detectManagedDrift is not overridden by TursoDriver, so on a remote driver it diffs the declared schema against that empty in-memory database.
  • In the dev's measurement, remote syncSchema also leaves the managed-object set empty. That is a second reason the diff has nothing to compare.

The dev's reproduction (on the libsql SQLite test double)

Table t carries an extra physical column legacy that the declaration omits. The local driver reports unmapped_column / drop_column. The remote driver reports [], even with explicit objects passed.

Why it matters

The dev reports this is reachable from os serve: runArtifactBootMigrationGate (packages/cli/src/commands/serve.ts, fed by findSqlDriverForKernel) reads remote drift as none. A remote Turso deployment therefore passes a gate whose job is to stop a boot on schema drift. ⚠️ NOT MEASURED by this seat: the serve.ts call chain end to end; a taker confirms it first.

Suggested shape (⛔ not a ruling)

Either implement remote drift detection through RemoteTransport introspection, or make remote detectManagedDrift refuse loudly (the transport's existing NOT_IMPLEMENTED / 501 envelope) so the gate says it cannot judge rather than answering "no drift". The refusal is the smaller, honest first step, the same shape PR #19842 takes for deferred DDL.

Filing-gate answers

Dedupe words: turso remote detectManagedDrift empty · artifact boot migration gate remote turso · remote drift dummy knex memory


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions