Skip to content

driver-turso remote syncSchemasBatch — 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

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site, the isRemote arm of TursoDriver.syncSchemasBatch in packages/drivers/driver-turso/src/turso-driver.ts. Finding class (a): a driver-level reproduction; the boot-path reach is NOT MEASURED end to end.

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)

reading result
TursoDriver.supports.batchSchemaSync true (SqlDriver's is false)
ObjectQLPlugin.syncRegisteredSchemas (packages/objectql/src/plugin.ts) takes the batch branch when driver.supports?.batchSchemaSync holds and syncSchemasBatch exists ⇒ a remote Turso boot syncs through syncSchemasBatch
TursoDriver.syncSchemasBatch, isRemote arm return this.remoteTransport!.syncSchemasBatch(schemas); and nothing else
TursoDriver.initObjects / syncSchema, isRemote arms (the other two remote doors) both call registerRemoteFieldMetadata(...) (the read-coercion registries) and then backfillRemoteCanonicalTemporalQuietly()

⇒ The door the engine's boot actually takes is the one remote door that skips both. initObjects' own comment names what the registration prevents: 「otherwise a boolean reads back as raw 0/1, JSON as a string, dates as raw text. (Root cause of the 2026-07-06 case_escalation 1 != true incident.)」

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

syncSchemasBatch([{ object: 'w', schema: { fields: { flag: { type: 'boolean' }, meta: { type: 'json' } } } }]), then create a row, then findOne: flag reads 1, meta reads the string {"k":1}, and paginationTieBreaker('w') is null. With the same object synced through syncSchema: flag is true, meta is an object, and the tie-breaker is id.

⚠️ NOT MEASURED

Whether a real remote-Turso boot through ObjectQLPlugin reads booleans/JSON wrong. Something else on the boot path may populate the registries (another door, or a later initObjects call). ⇒ A taker starts by driving a boot through ObjectQLPlugin against the transport's test double and reading one boolean and one JSON field back, and records whether the batch door alone decides it. If the boot is measured clean, the card narrows to the canonical-backfill and managed-object halves, or closes with the reading.

Suggested shape (⛔ not a ruling)

Give the remote arm of syncSchemasBatch the same two post-DDL steps its sibling remote doors run: register the field metadata per object, then one batched canonical-backfill probe, so the three remote doors cannot drift apart again. Pin the batch door with the dev's repro and a syncSchema control.

Filing-gate answers

Dedupe words: turso remote syncSchemasBatch read coercion · registerRemoteFieldMetadata batch path · batchSchemaSync remote boolean 0/1 · remote boot canonical backfill skipped


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

bugSomething isn't workingdomain:enginepriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions