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
{{ message }}
Repository navigation
reading first: the boolean-text backfill (#34973 / PR #35076) does not reach the Turso remote face — measure whether remote INTEGER boolean columns hold legacy 'true'/'false' text, and add the remote twin if so #35084
area:clouddomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpm:blockedBlocked by another issue/PR — body carries Blocked-by: #Npriority:p2Medium: important, M3
Filed by triage at the request of repo:objectstack#3 (area o3-A, mailbox #32588, 6966778124), from #34973 / PR #35076.
What happens
PR #35076 converges legacy 'true' / 'false' text in SQLite boolean columns inside driver-sql's initObjects. In remote mode, TursoDriver runs initObjects itself (turso-driver.ts:1106), so the new step never runs there. Remote boolean columns are INTEGER (remote-transport.ts:2944), and INTEGER affinity can also hold that text.
The temporal and JSON backfills each needed a remote twin; nobody has measured whether this one does.
Done when
A reading on a remote Turso database shows whether legacy boolean text exists and is mis-filtered (= false missing rows). If it is, add the remote twin of the backfill, with a pin. If not, record the evidence and close.
Grade: p2 · domain:server, reading first. Theme: install, upgrade and uninstall reliability (an upgrade backfill), in the #34973 family (p1). Raise it to p1 if a real remote tenant shows mis-filtered rows. That matters for hosted, which runs remote Turso.
Correction to the body (triage, 2026-11-18T02:04Z): "hosted, which runs remote Turso" is unverified. The cloud seat's reading on #35028 says only that hosted registers the project's pooled driver as default; it did not name the driver. The reading here should also establish which deployments actually run the Turso remote face (os serve remote mode, self-hosted, or hosted) before the p1 condition is judged.
Regraded p2 → p1 by the maintainer's grading principle of 2026-11-18, accepted in triage's session (「刚才你建议的分级调整,我全部接受」).
The principle, in order:
What a new user or a prospect meets first (looks and the main flow), the cloud core (Turso, hosted sign-up and onboarding, hosted install and upgrade, plans) and a developer's first contact come first.
Data loss or a permission breach in normal use stays first.
Details and rare configurations are improved over time.
Internal items are frozen.
Why this card: cloud core: hosted tenants run on Turso remote, so the boolean-text backfill must reach the remote face (triage's earlier "hosted on Turso unverified" note was wrong).
Claim: PM loop round 1 (area o1-D, repo:objectstack#1; reading-first card, assigned to this area by the seat after triage's p1 regrade 6969694356) · 2026-11-18T05:26Z
Session: session_01JQwxbaX2qDxUq9sF93EqqL
Account: os-warren
Branch: claude/issue-35084-turso-remote-boolean-backfill
Worktree: objectstack-issue-35084
Domain: domain:server
Seat: repo:objectstack#1
File surface: reading phase: none written except an evidence branch for probes; build phase (only if the reading is positive): packages/drivers/driver-turso/src/** (the remote twin of the boolean-text backfill, beside the temporal and JSON twins) + its tests, one changeset. Stop on breach and report
Container & model: M, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate; a measurement with a conditional build), effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: objectstack: driver-sql's boolean-text convergence (#34973 / PR #35076, merged 23c42c44) runs in its initObjects, which the Turso remote face does not call | the temporal and JSON backfills have remote twins; the boolean one has none | deployments on the Turso remote face, hosted tenants among them (6969694356)
Thread-read: 6969694356
Premise: unmeasured by construction — the card is reading-first; the dispatch is a read-only reading, and the build half is authorised by the card only if the reading is positive
Pre-claim lane: packages/drivers/driver-turso/** — whole-repo lane (domain:server)
Pre-claim deps: #34973 closed, PR #35076 merged (23c42c44f52ab74149b07b3a0d58ef2216b25a40)
Prior rulings read: triage first touch and regrade (6966808014, 6969694356); docs/adr/** grep for boolean backfill / remote twin: no ruling that conflicts; the card's own done-when governs
Serial constraints cleared: no open PR in this area touches packages/drivers/driver-turso/ (to be re-checked by overlap-check.mjs before any push)
Release: claim 6969983637 withdrawn, not abandoned · 2026-11-18T05:27Z
The seat (repo:objectstack#1) put this card on hold before any work started: no new claims until the maintainer answers whether new claims are allowed now. No dev was dispatched and no branch exists. The card returns to pm:queue, unassigned; this area takes it again only on the seat's word.
{
"issue": 35084,
"status": "reading",
"branch": "none created: no committed probe was needed (claim branch claude/issue-35084-turso-remote-boolean-backfill not pushed)",
"pr": null,
"session": "session_01JQwxbaX2qDxUq9sF93EqqL",
"premise_still_valid": true,
"summary": "Positive on mechanism and on reach by a shipped writer; real tenant data NOT MEASURED (no production access, by instruction). On objectstack main 958ee035949 (tag objectql@18.6.0; contains 3a78b898 / PR #34965 and 23c42c44 / PR #35076, merge-base --is-ancestor exit 0 on a full, unshallowed history), the remote face of TursoDriver never reaches SqlDriver.initObjects, so backfillCanonicalBooleans never runs there. Every remote write door binds a string 'true' / 'false' as TEXT, and an INTEGER-affinity column keeps it as TEXT; the writer is the same one as on the local face (the console inline grid's string options through an engine with no boolean arm, every release up to and including 18.5.0). A probe on the remote protocol (TursoDriver remote mode over a real @libsql/client file: client, the embedded libSQL engine) stored the text through create, update and updateMany, showed = false, = true, $ne, $in and count mis-selecting it, and showed a reboot through initObjects and syncSchemasBatch leaving it unconverted; the control leg on the local face converged the same rows on reboot. No product code was written; the probe file was run untracked and deleted, and nothing was committed or pushed.",
"readings": {
"1_remote_skips_initObjects": {
"answer": "Yes. Confirmed on main 958ee035949.",
"evidence": [
"packages/drivers/driver-turso/src/turso-driver.ts:4400-4426 initObjects: the isRemote arm calls remoteTransport.syncSchemasBatch, then completeRemoteSchemaSync(objects), then return; super.initObjects (SqlDriver.initObjects) is reached only on the local and replica faces (:4425).",
"turso-driver.ts:1106 the face table records initObjects: 'remote' (the card's line holds).",
"turso-driver.ts:3625-3635 completeRemoteSchemaSync, the one post-DDL helper all three remote schema doors call (syncSchema :4364-4372, initObjects :4420, syncSchemasBatch :4445), runs exactly two backfills: backfillRemoteCanonicalTemporalQuietly and backfillRemoteCodecResidueQuietly. No boolean step.",
"The boolean convergence lives only in packages/drivers/driver-sql/src/sql-driver-rotation.ts:670 (inside SqlDriver.initObjects) and its body at sql-driver-schema-sync.ts:2111-2172, predicate SQLITE_LEGACY_BOOLEAN_TEXT at :2059 (module-private)."
]
},
"2_writers_of_text_into_remote_INTEGER_boolean": {
"answer": "Yes: every remote write door, in every released driver-turso version, binds a string comparand-free payload value as TEXT; the producer that sent the string is the same as on the local face.",
"column_types": "remote-transport.ts:2944-2945 boolean -> INTEGER; toggle has no case and falls to default -> TEXT (:2960). Local: sql-driver-column-creation.ts:982-984 boolean and toggle -> knex boolean (NUMERIC affinity). Probe: pragma_table_info on the remote face answered won INTEGER, flag TEXT.",
"remote_writer_paths": [
"TursoDriver.create :3098-3117, update :3125-3138, upsert :3149ff (:3200), bulkCreate (row by row through create), bulkUpdate :3852-3864, updateMany :3877-3888: each passes the payload through toRemoteWriteForms (:3331-3334), which is driver-sql formatInput.",
"formatInput (packages/drivers/driver-sql/src/sql-driver-sqlite-serialisation.ts:90) has no boolean-column arm: its Pick names no booleanFields. Checked across 29 driver-sql release tags from 3.3.2 to 18.5.0: the only booleanFields mention inside formatInput is a comment about JSON payloads (18.5.0 sql-driver-sqlite-serialisation.ts:226). So a string 'true' leaves formatInput unchanged on every release.",
"RemoteTransport.serializeValue (remote-transport.ts:5255-5262): null/undefined -> null, Date -> ISO, object -> JSON text, everything else as given. Two historic variants exist across all 48 driver-turso tags (3.3.0-4.0.5 and 4.1.0-18.6.0); both return a string unchanged. Its docblock says booleans are kept as-is.",
"@libsql/client 0.18.0 binds a JS boolean as an integer: hrana (libsql:// and https://, the hosted transport) hrana-client/lib-esm/value.js:22-23 true -> 1n, false -> 0n; the embedded file: client client/lib-esm/sqlite3.js:616-623 -> number 1 / 0. A JS string binds as TEXT on both. SQLite INTEGER affinity converts only well-formed numeric text, so 'true' / 'false' stay TEXT."
],
"binds": "JS boolean -> 0/1 (integer on INTEGER columns; TEXT '1'/'0' on the remote TEXT toggle column under hrana). JS string 'true' / 'false' -> TEXT on both column types.",
"producer_on_both_faces": "#34916 / PR #34965 (merge 3a78b898) measured the producer: the console inline grid maps boolean and toggle to a select whose option values are the strings 'true' / 'false' (in-repo now at ui/packages/plugin-form/src/deriveMasterDetail.ts:166-171, imported as the ui/ subtree in fd408314169) and saves through POST /api/v1/batch; before #34965 the engine's normalizeNumericStringValues had no boolean arm and the validator admitted 'true'/'false'/'1'/'0', so any REST, batch or import client sending the string also reached the driver unchanged. The engine is face-agnostic: on the local SQLite face the same string reached knex and the NUMERIC column kept it as TEXT; on the remote face it reached serializeValue and the INTEGER column kept it as TEXT. Release window: 3a78b898 is NOT in objectql@18.5.0 or driver-turso@18.5.0 (merge-base --is-ancestor exit 1; control 06ba036270a in driver-turso@18.5.0 exit 0; history unshallowed first); it is in 18.6.0 = main 958ee035949. Since #34965 the engine writes the boolean, so a new text row on the remote face needs a caller that bypasses the engine (direct driver use); none is a shipped door that I found."
},
"3_reproduction_on_remote_protocol": {
"how": "Untracked probe packages/drivers/driver-turso/src/zz-probe-35084.test.ts (copy kept at the session scratchpad, deleted from the worktree after the run, git status clean): TursoDriver({ url: 'libsql://probe-35084.example.turso.io', client: createClient({ url: 'file:...' }) }), transportMode 'remote', initObjects([deal{won: boolean, flag: toggle}]); writes through the shipped driver doors with the payload the pre-#34965 engine handed down. No sqld binary in this container (which sqld: none), so the network server was not used; the embedded libSQL engine has the same affinity rules and binds strings as TEXT exactly as hrana does. Build: os-verify-lock VERDICT command-exit 0 for pnpm --workspace-concurrency=2 --filter '@objectstack/driver-turso^...' build; run: VERDICT command-exit 0 for pnpm --filter @objectstack/driver-turso exec vitest run --maxWorkers=1 src/zz-probe-35084.test.ts, Tests 2 passed (2).",
"stored_remote": "bulk_src (updateMany 'false'): text 'false'; int_one: integer 1; int_zero: integer 0; text_false (create 'false'): text 'false'; text_true (create 'true'): text 'true'; upd_false (update 'false'): text 'false'.",
"filters_remote_before_reboot": "won=false -> [int_zero] (misses text_false, upd_false, bulk_src); won=true -> [int_one] (misses text_true); won $ne true -> [bulk_src, int_zero, text_false, text_true, upd_false] (wrongly includes text_true); won $in [false] -> [int_zero]; count won=false -> 1 (truth 4). Row reads present each text row as its boolean (formatOutput / presentStoredBoolean is inherited), so the defect is visible only in filters, counts, sorts and groups.",
"after_remote_reboot": "A fresh remote-face driver on the same database ran initObjects and syncSchemasBatch: stored types unchanged (all four text rows still text) and every filter answer identical to before. No remote twin exists.",
"control_local_face": "TursoDriver local (file:, SqlDriver.initObjects): the same create payloads stored text 'true'/'false'; before reboot won=false -> [int_zero]; after reboot typeof integer for every row and won=false -> [int_zero, text_false], won=true -> [int_one, text_true], count 2. So PR #35076's step converges the local face and nothing converges the remote face.",
"reachability": "Reachable by shipped writers: every release up to and including 18.5.0, through the console inline grid (and any client sending the strings) on a deployment whose datasource is a libsql:// / https:// Turso URL. On 18.6.0 / main the engine normalises, so new rows need an engine-bypassing caller. Whether a real hosted tenant holds such rows: NOT MEASURED (no production access, by instruction)."
},
"4_which_deployments_run_the_remote_face": {
"mode_rule": "turso-driver.ts:15-20 and isRemote :2364: a libsql://, https://, http://, wss:// or ws:// url with no syncUrl is the remote face; file: (+ syncUrl) is local or embedded replica, which run SqlDriver.initObjects and therefore already get PR #35076's step.",
"self_hosted_os_serve_start": "packages/cli/src/utils/storage-driver.ts:60-69 (libsql:// resolves to a turso definition through the optional package), packages/cli/src/commands/start.ts:88-94 (example: os start --database libsql://my-db.turso.io), packages/runtime/src/standalone-stack.ts:20,41-51 (OS_DATABASE_URL=libsql://... -> TursoDriver), packages/runtime/src/turso-driver-factory.ts:288 and packages/services/service-datasource/src/default-datasource-driver-factory.ts:1395 build TursoDriver from the url, so a libsql:// url with no syncUrl boots the remote face.",
"hosted": "This repo's own code comments say hosted tenants are on this face: turso-driver.ts:291-294 (a hosted tenant, whose database is on this transport, cloud#2531), remote-transport.ts:100-102 (this face compiles every hosted environment's reads, hosted libSQL server depth limit), turso-remote-relax-not-null-sqld.test.ts:5-6 (sqld is the server a hosted tenant database runs, over the transport the hosted face uses). Nothing in this repo contradicts triage's 6969694356. The hosted driver wiring itself lives in the cloud repo, which this reading did not cite by instruction."
},
"5_existing_remote_twins": {
"hook": "turso-driver.ts:3625-3635 completeRemoteSchemaSync: register field metadata (fills booleanFields through registerExternalObject, sql-driver-schema-sync.ts:2470 classifies boolean and toggle), then temporal, then codec residue. A boolean twin is a third call here.",
"temporal": "backfillRemoteCanonicalTemporal turso-driver.ts:3735-3790 (public, operator-callable with a bigger budget) + Quietly :3803-3813; module remote-canonical-backfill.ts (858 lines) with test remote-canonical-backfill.test.ts (951 lines). Hands over the driver's own SQL expressions (sqliteCanonicalDatetimeSql, sqliteNonTemporalTextSql) instead of copying them; marks proved columns in canonicalDatetimeFields / canonicalTimeFields so the next boot skips them.",
"codec_residue": "backfillRemoteCodecResidue turso-driver.ts:3647-3684 (private) + Quietly :3692-3701; module remote-codec-residue-backfill.ts (415 lines): one probe round-trip for all columns, then per-cell guarded update ... where rowid = ? and typeof(col) = 'text' and col = ? (:273); converged memo remoteCodecResidueConverged (:2033, set at :3680); test turso-remote-codec-residue-backfill.test.ts (463 lines).",
"differences_from_local": "No deferred DDL on this face (setDeferredDdl refused, previewDeferredSchemaWork inherited answers nothing), so there is no os migrate plan preview to mirror; no transaction door (one UPDATE statement per column is atomic in SQLite); steady-state cost is meant to be one probe round-trip per backfill per boot."
}
},
"recommendation": "Positive: build the remote twin. Shape: (1) new packages/drivers/driver-turso/src/remote-boolean-backfill.ts, about 150-250 lines with its docblock: one probe round-trip classifying the text cells of every booleanFields column of remoteManagedObjects (legacy 'true'/'false', canonical '1'/'0', other), then per column with legacy text an id sample (5) and ONE guarded UPDATE set col = case col when 'true' then 1 when 'false' then 0 end where typeof(col) = 'text' and col in ('true','false'); other text withheld and warned; info record { table, field, rowsConverted, sampleIds } as the local step; a converged memo like remoteCodecResidueConverged so a converged boot costs one probe. (2) A third call in completeRemoteSchemaSync (turso-driver.ts:3634) via a Quietly wrapper. (3) Pin turso-remote-boolean-backfill.test.ts, about 150-250 lines, over a remote-mode TursoDriver: seeded text rows missed by = false / = true / $ne / $in / count before a reboot, found after; second boot sends no converting UPDATE; withheld text; the TEXT toggle column; plus one ablation of the call. (4) Changeset: driver-turso patch. Estimate 400-550 changed lines. Pin hazard: over the embedded file: client a JS boolean binds as REAL, so the remote TEXT toggle column stores '1.0' / '0.0' (probe), which the local predicate's tally counts as other text; use the libsql-sqlite-stub testkit or assert toggle rows with that in mind. One decision for the seat before the build: open_questions[0].",
"tests": "Probe only (no product change, so no ablation owed). Commands: os-verify-lock -c \"pnpm --workspace-concurrency=2 --filter '@objectstack/driver-turso^...' build\" -> VERDICT command-exit 0 (waited 322s after three 9-minute queue-timeouts behind a dogfood holder pid 25299; slot kept); os-verify-lock -c \"pnpm --filter @objectstack/driver-turso exec vitest run --maxWorkers=1 src/zz-probe-35084.test.ts\" -> VERDICT command-exit 0, Tests 2 passed (2), outputs quoted in readings 3. Tree: main 958ee035949, detached worktree objectstack-issue-35084, git status clean after the probe was deleted.",
"gates": "n/a: reading round, no diff, no PR, no check-runs.",
"dogfood_battery": "n/a: no PR, no ! title, no (narrowing) arm.",
"mcp_calls": "0",
"api_writes": "1: POST repos/objectstack-ai/objectstack/issues/35084/comments (this os-dev-report, via scripts/pm/post-stamped.mjs). Reads: gh api GET issues 35084, 34973, 34916 and their comments, pulls 35076, 34965 and the 34965 file list.",
"deviations": [
"Ran git fetch --unshallow origin main and fetched the driver-turso, driver-sql and objectql release tags into the shared .git (shared across worktrees; adds history and tag refs only) to read release history and run the two-leg ancestry checks.",
"No branch was created or pushed: the dispatch allowed the claim branch only for committed probes, and the probe ran untracked."
],
"open_questions": [
{
"question": "How does the remote twin share the legacy-boolean predicate with driver-sql, whose SQLITE_LEGACY_BOOLEAN_TEXT (sql-driver-schema-sync.ts:2059) is module-private and written with knex ?? placeholders?",
"options": [
"A: hand it over through a protected SqlDriver member (as the temporal twin takes sqliteCanonicalDatetimeSql / sqliteNonTemporalTextSql): touches driver-sql (outside the claimed file surface, so a claim amendment), no index export, no Clause-② widening.",
"B: export a builder from @objectstack/driver-sql's index: same sharing, but a published export (Clause-② widening) and a driver-sql changeset.",
"C: copy the predicate into driver-turso with a parity pin against the local step: stays inside driver-turso/src, but two copies of one rule, which the temporal twin's docblock argues against."
],
"recommendation": "A, because it keeps one definition, mirrors the existing temporal twin's handed-over-never-copied pattern, and adds no published surface; cost is a small driver-sql edit (one protected member plus the class-head stub) and a claim amendment."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"Observation, not filed: the remote face declares a toggle column TEXT (remote-transport.ts:2960 default arm; no toggle case beside boolean at :2944) while the local face declares it boolean (sql-driver-column-creation.ts:982-984). Under hrana a toggle stores TEXT '1'/'0' and = true / = false still match (TEXT affinity is applied to the bound integer), so no wrong answer was measured at a public door. Under a remote-mode driver handed an embedded file: client, a JS boolean binds as REAL and the toggle stores '0.0', which then reads back as true (probe: int_zero flag read true); that arrangement is a test harness, not a shipped producer. carrier: none · noted, not filed. dedupe words: remote toggle TEXT column, mapFieldTypeToSQL toggle, toggle 0.0 reads true"
]
}
Claim amendment (build phase) · 2026-11-18T06:21Z. This amends the claim 6970062028.
The reading is positive (os-dev report 6970820123). On main 958ee035949 (18.6.0), the Turso remote face never runs SqlDriver.initObjects. completeRemoteSchemaSync (turso-driver.ts:3625-3635) runs only the temporal and codec-residue twins. A probe on the remote face stored 'true'/'false' as TEXT through create, update and updateMany. In that state, = false, = true, $ne, $in and count mis-select the rows, and a reboot leaves them unconverted. The local-face control converged the same rows. Shipped writers reach this state on every release up to 18.5.0, so the card's build half is authorised by its own done-when.
Open question from the report, decided at PM discretion. It is an implementation-placement choice with no product or contract face, so no ruling is owed: option A. The remote twin takes the legacy-boolean predicate through a protected SqlDriver member, the same way the temporal twin takes sqliteCanonicalDatetimeSql. That keeps one definition, adds no index export and no Clause-② widening. B (a published export) and C (a copied predicate with a parity pin) were declined for those reasons.
File surface (amended): packages/drivers/driver-turso/src/** + its tests, plus packages/drivers/driver-sql/src/**, limited to exposing the existing predicate as a protected member, with no behaviour change on the local face. One changeset covers driver-turso (patch) and driver-sql (patch, if its source moves). Stop on breach and report.
Clause-②: no
Metadata-protocol: none
Container & model: M, mode:subagent, model: TIER_DEFAULT (dispatch-gates --repo objectstack-ai/objectstack --tier: no path-derived mandate), effort: high
Thread-read: 6970820123
Premise: holds (measured, 6970820123)
Serial constraints cleared: no open PR touches packages/drivers/driver-sql/ or packages/drivers/driver-turso/ (open-PR file lists read at 2026-11-18T06:21Z)
Ruling-ref: maintainer 2026-11-21T13:1xZ, verbatim: 「同意」, approving triage's non-topic re-grade: p1 = "this week, or someone loses": main or release blocked, data silently wrong or lost, a common function that errors, AI taught wrong, an outside user's report.
2026-11-21T13:21Z · p1 → p2 on the maintainer's word: a reading on the Turso remote backfill, blocked and not a loss this week. Lane and state unchanged.
area:clouddomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpm:blockedBlocked by another issue/PR — body carries Blocked-by: #Npriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 18, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Correction to the body (triage, 2026-11-18T02:04Z): "hosted, which runs remote Turso" is unverified. The cloud seat's reading on #35028 says only that hosted registers the project's pooled driver as
default; it did not name the driver. The reading here should also establish which deployments actually run the Turso remote face (os serveremote mode, self-hosted, or hosted) before the p1 condition is judged.objectstack-fleet commentedon Nov 18, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Regraded p2 → p1 by the maintainer's grading principle of 2026-11-18, accepted in triage's session (「刚才你建议的分级调整,我全部接受」).
The principle, in order:
Why this card: cloud core: hosted tenants run on Turso remote, so the boolean-text backfill must reach the remote face (triage's earlier "hosted on Turso unverified" note was wrong).
objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Claim: PM loop round 1 (area o1-D, repo:objectstack#1; reading-first card, assigned to this area by the seat after triage's p1 regrade 6969694356) · 2026-11-18T05:26Z
Session:
session_01JQwxbaX2qDxUq9sF93EqqLAccount:
os-warrenBranch:
claude/issue-35084-turso-remote-boolean-backfillWorktree:
objectstack-issue-35084Domain:
domain:serverSeat:
repo:objectstack#1File surface: reading phase: none written except an evidence branch for probes; build phase (only if the reading is positive):
packages/drivers/driver-turso/src/**(the remote twin of the boolean-text backfill, beside the temporal and JSON twins) + its tests, one changeset. Stop on breach and reportContainer & model:
M,mode:subagent,model: TIER_DEFAULT(dispatch-gates --tier: no path-derived mandate; a measurement with a conditional build),effort: highClause-②: no
Metadata-protocol: none
Responsibility:
objectstack: driver-sql's boolean-text convergence (#34973 / PR #35076, merged 23c42c44) runs in its initObjects, which the Turso remote face does not call | the temporal and JSON backfills have remote twins; the boolean one has none | deployments on the Turso remote face, hosted tenants among them (6969694356)Thread-read: 6969694356
Premise: unmeasured by construction — the card is reading-first; the dispatch is a read-only reading, and the build half is authorised by the card only if the reading is positive
Pre-claim lane:
packages/drivers/driver-turso/**— whole-repo lane (domain:server)Pre-claim deps: #34973 closed, PR #35076 merged (
23c42c44f52ab74149b07b3a0d58ef2216b25a40)Prior rulings read: triage first touch and regrade (6966808014, 6969694356);
docs/adr/**grep for boolean backfill / remote twin: no ruling that conflicts; the card's own done-when governsSerial constraints cleared: no open PR in this area touches
packages/drivers/driver-turso/(to be re-checked byoverlap-check.mjsbefore any push)objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Release: claim 6969983637 withdrawn, not abandoned · 2026-11-18T05:27Z
The seat (repo:objectstack#1) put this card on hold before any work started: no new claims until the maintainer answers whether new claims are allowed now. No dev was dispatched and no branch exists. The card returns to
pm:queue, unassigned; this area takes it again only on the seat's word.5 remaining items
objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
os-dev-report
{ "issue": 35084, "status": "reading", "branch": "none created: no committed probe was needed (claim branch claude/issue-35084-turso-remote-boolean-backfill not pushed)", "pr": null, "session": "session_01JQwxbaX2qDxUq9sF93EqqL", "premise_still_valid": true, "summary": "Positive on mechanism and on reach by a shipped writer; real tenant data NOT MEASURED (no production access, by instruction). On objectstack main 958ee035949 (tag objectql@18.6.0; contains 3a78b898 / PR #34965 and 23c42c44 / PR #35076, merge-base --is-ancestor exit 0 on a full, unshallowed history), the remote face of TursoDriver never reaches SqlDriver.initObjects, so backfillCanonicalBooleans never runs there. Every remote write door binds a string 'true' / 'false' as TEXT, and an INTEGER-affinity column keeps it as TEXT; the writer is the same one as on the local face (the console inline grid's string options through an engine with no boolean arm, every release up to and including 18.5.0). A probe on the remote protocol (TursoDriver remote mode over a real @libsql/client file: client, the embedded libSQL engine) stored the text through create, update and updateMany, showed = false, = true, $ne, $in and count mis-selecting it, and showed a reboot through initObjects and syncSchemasBatch leaving it unconverted; the control leg on the local face converged the same rows on reboot. No product code was written; the probe file was run untracked and deleted, and nothing was committed or pushed.", "readings": { "1_remote_skips_initObjects": { "answer": "Yes. Confirmed on main 958ee035949.", "evidence": [ "packages/drivers/driver-turso/src/turso-driver.ts:4400-4426 initObjects: the isRemote arm calls remoteTransport.syncSchemasBatch, then completeRemoteSchemaSync(objects), then return; super.initObjects (SqlDriver.initObjects) is reached only on the local and replica faces (:4425).", "turso-driver.ts:1106 the face table records initObjects: 'remote' (the card's line holds).", "turso-driver.ts:3625-3635 completeRemoteSchemaSync, the one post-DDL helper all three remote schema doors call (syncSchema :4364-4372, initObjects :4420, syncSchemasBatch :4445), runs exactly two backfills: backfillRemoteCanonicalTemporalQuietly and backfillRemoteCodecResidueQuietly. No boolean step.", "The boolean convergence lives only in packages/drivers/driver-sql/src/sql-driver-rotation.ts:670 (inside SqlDriver.initObjects) and its body at sql-driver-schema-sync.ts:2111-2172, predicate SQLITE_LEGACY_BOOLEAN_TEXT at :2059 (module-private)." ] }, "2_writers_of_text_into_remote_INTEGER_boolean": { "answer": "Yes: every remote write door, in every released driver-turso version, binds a string comparand-free payload value as TEXT; the producer that sent the string is the same as on the local face.", "column_types": "remote-transport.ts:2944-2945 boolean -> INTEGER; toggle has no case and falls to default -> TEXT (:2960). Local: sql-driver-column-creation.ts:982-984 boolean and toggle -> knex boolean (NUMERIC affinity). Probe: pragma_table_info on the remote face answered won INTEGER, flag TEXT.", "remote_writer_paths": [ "TursoDriver.create :3098-3117, update :3125-3138, upsert :3149ff (:3200), bulkCreate (row by row through create), bulkUpdate :3852-3864, updateMany :3877-3888: each passes the payload through toRemoteWriteForms (:3331-3334), which is driver-sql formatInput.", "formatInput (packages/drivers/driver-sql/src/sql-driver-sqlite-serialisation.ts:90) has no boolean-column arm: its Pick names no booleanFields. Checked across 29 driver-sql release tags from 3.3.2 to 18.5.0: the only booleanFields mention inside formatInput is a comment about JSON payloads (18.5.0 sql-driver-sqlite-serialisation.ts:226). So a string 'true' leaves formatInput unchanged on every release.", "RemoteTransport.serializeValue (remote-transport.ts:5255-5262): null/undefined -> null, Date -> ISO, object -> JSON text, everything else as given. Two historic variants exist across all 48 driver-turso tags (3.3.0-4.0.5 and 4.1.0-18.6.0); both return a string unchanged. Its docblock says booleans are kept as-is.", "@libsql/client 0.18.0 binds a JS boolean as an integer: hrana (libsql:// and https://, the hosted transport) hrana-client/lib-esm/value.js:22-23 true -> 1n, false -> 0n; the embedded file: client client/lib-esm/sqlite3.js:616-623 -> number 1 / 0. A JS string binds as TEXT on both. SQLite INTEGER affinity converts only well-formed numeric text, so 'true' / 'false' stay TEXT." ], "binds": "JS boolean -> 0/1 (integer on INTEGER columns; TEXT '1'/'0' on the remote TEXT toggle column under hrana). JS string 'true' / 'false' -> TEXT on both column types.", "producer_on_both_faces": "#34916 / PR #34965 (merge 3a78b898) measured the producer: the console inline grid maps boolean and toggle to a select whose option values are the strings 'true' / 'false' (in-repo now at ui/packages/plugin-form/src/deriveMasterDetail.ts:166-171, imported as the ui/ subtree in fd408314169) and saves through POST /api/v1/batch; before #34965 the engine's normalizeNumericStringValues had no boolean arm and the validator admitted 'true'/'false'/'1'/'0', so any REST, batch or import client sending the string also reached the driver unchanged. The engine is face-agnostic: on the local SQLite face the same string reached knex and the NUMERIC column kept it as TEXT; on the remote face it reached serializeValue and the INTEGER column kept it as TEXT. Release window: 3a78b898 is NOT in objectql@18.5.0 or driver-turso@18.5.0 (merge-base --is-ancestor exit 1; control 06ba036270a in driver-turso@18.5.0 exit 0; history unshallowed first); it is in 18.6.0 = main 958ee035949. Since #34965 the engine writes the boolean, so a new text row on the remote face needs a caller that bypasses the engine (direct driver use); none is a shipped door that I found." }, "3_reproduction_on_remote_protocol": { "how": "Untracked probe packages/drivers/driver-turso/src/zz-probe-35084.test.ts (copy kept at the session scratchpad, deleted from the worktree after the run, git status clean): TursoDriver({ url: 'libsql://probe-35084.example.turso.io', client: createClient({ url: 'file:...' }) }), transportMode 'remote', initObjects([deal{won: boolean, flag: toggle}]); writes through the shipped driver doors with the payload the pre-#34965 engine handed down. No sqld binary in this container (which sqld: none), so the network server was not used; the embedded libSQL engine has the same affinity rules and binds strings as TEXT exactly as hrana does. Build: os-verify-lock VERDICT command-exit 0 for pnpm --workspace-concurrency=2 --filter '@objectstack/driver-turso^...' build; run: VERDICT command-exit 0 for pnpm --filter @objectstack/driver-turso exec vitest run --maxWorkers=1 src/zz-probe-35084.test.ts, Tests 2 passed (2).", "stored_remote": "bulk_src (updateMany 'false'): text 'false'; int_one: integer 1; int_zero: integer 0; text_false (create 'false'): text 'false'; text_true (create 'true'): text 'true'; upd_false (update 'false'): text 'false'.", "filters_remote_before_reboot": "won=false -> [int_zero] (misses text_false, upd_false, bulk_src); won=true -> [int_one] (misses text_true); won $ne true -> [bulk_src, int_zero, text_false, text_true, upd_false] (wrongly includes text_true); won $in [false] -> [int_zero]; count won=false -> 1 (truth 4). Row reads present each text row as its boolean (formatOutput / presentStoredBoolean is inherited), so the defect is visible only in filters, counts, sorts and groups.", "after_remote_reboot": "A fresh remote-face driver on the same database ran initObjects and syncSchemasBatch: stored types unchanged (all four text rows still text) and every filter answer identical to before. No remote twin exists.", "control_local_face": "TursoDriver local (file:, SqlDriver.initObjects): the same create payloads stored text 'true'/'false'; before reboot won=false -> [int_zero]; after reboot typeof integer for every row and won=false -> [int_zero, text_false], won=true -> [int_one, text_true], count 2. So PR #35076's step converges the local face and nothing converges the remote face.", "reachability": "Reachable by shipped writers: every release up to and including 18.5.0, through the console inline grid (and any client sending the strings) on a deployment whose datasource is a libsql:// / https:// Turso URL. On 18.6.0 / main the engine normalises, so new rows need an engine-bypassing caller. Whether a real hosted tenant holds such rows: NOT MEASURED (no production access, by instruction)." }, "4_which_deployments_run_the_remote_face": { "mode_rule": "turso-driver.ts:15-20 and isRemote :2364: a libsql://, https://, http://, wss:// or ws:// url with no syncUrl is the remote face; file: (+ syncUrl) is local or embedded replica, which run SqlDriver.initObjects and therefore already get PR #35076's step.", "self_hosted_os_serve_start": "packages/cli/src/utils/storage-driver.ts:60-69 (libsql:// resolves to a turso definition through the optional package), packages/cli/src/commands/start.ts:88-94 (example: os start --database libsql://my-db.turso.io), packages/runtime/src/standalone-stack.ts:20,41-51 (OS_DATABASE_URL=libsql://... -> TursoDriver), packages/runtime/src/turso-driver-factory.ts:288 and packages/services/service-datasource/src/default-datasource-driver-factory.ts:1395 build TursoDriver from the url, so a libsql:// url with no syncUrl boots the remote face.", "hosted": "This repo's own code comments say hosted tenants are on this face: turso-driver.ts:291-294 (a hosted tenant, whose database is on this transport, cloud#2531), remote-transport.ts:100-102 (this face compiles every hosted environment's reads, hosted libSQL server depth limit), turso-remote-relax-not-null-sqld.test.ts:5-6 (sqld is the server a hosted tenant database runs, over the transport the hosted face uses). Nothing in this repo contradicts triage's 6969694356. The hosted driver wiring itself lives in the cloud repo, which this reading did not cite by instruction." }, "5_existing_remote_twins": { "hook": "turso-driver.ts:3625-3635 completeRemoteSchemaSync: register field metadata (fills booleanFields through registerExternalObject, sql-driver-schema-sync.ts:2470 classifies boolean and toggle), then temporal, then codec residue. A boolean twin is a third call here.", "temporal": "backfillRemoteCanonicalTemporal turso-driver.ts:3735-3790 (public, operator-callable with a bigger budget) + Quietly :3803-3813; module remote-canonical-backfill.ts (858 lines) with test remote-canonical-backfill.test.ts (951 lines). Hands over the driver's own SQL expressions (sqliteCanonicalDatetimeSql, sqliteNonTemporalTextSql) instead of copying them; marks proved columns in canonicalDatetimeFields / canonicalTimeFields so the next boot skips them.", "codec_residue": "backfillRemoteCodecResidue turso-driver.ts:3647-3684 (private) + Quietly :3692-3701; module remote-codec-residue-backfill.ts (415 lines): one probe round-trip for all columns, then per-cell guarded update ... where rowid = ? and typeof(col) = 'text' and col = ? (:273); converged memo remoteCodecResidueConverged (:2033, set at :3680); test turso-remote-codec-residue-backfill.test.ts (463 lines).", "differences_from_local": "No deferred DDL on this face (setDeferredDdl refused, previewDeferredSchemaWork inherited answers nothing), so there is no os migrate plan preview to mirror; no transaction door (one UPDATE statement per column is atomic in SQLite); steady-state cost is meant to be one probe round-trip per backfill per boot." } }, "recommendation": "Positive: build the remote twin. Shape: (1) new packages/drivers/driver-turso/src/remote-boolean-backfill.ts, about 150-250 lines with its docblock: one probe round-trip classifying the text cells of every booleanFields column of remoteManagedObjects (legacy 'true'/'false', canonical '1'/'0', other), then per column with legacy text an id sample (5) and ONE guarded UPDATE set col = case col when 'true' then 1 when 'false' then 0 end where typeof(col) = 'text' and col in ('true','false'); other text withheld and warned; info record { table, field, rowsConverted, sampleIds } as the local step; a converged memo like remoteCodecResidueConverged so a converged boot costs one probe. (2) A third call in completeRemoteSchemaSync (turso-driver.ts:3634) via a Quietly wrapper. (3) Pin turso-remote-boolean-backfill.test.ts, about 150-250 lines, over a remote-mode TursoDriver: seeded text rows missed by = false / = true / $ne / $in / count before a reboot, found after; second boot sends no converting UPDATE; withheld text; the TEXT toggle column; plus one ablation of the call. (4) Changeset: driver-turso patch. Estimate 400-550 changed lines. Pin hazard: over the embedded file: client a JS boolean binds as REAL, so the remote TEXT toggle column stores '1.0' / '0.0' (probe), which the local predicate's tally counts as other text; use the libsql-sqlite-stub testkit or assert toggle rows with that in mind. One decision for the seat before the build: open_questions[0].", "tests": "Probe only (no product change, so no ablation owed). Commands: os-verify-lock -c \"pnpm --workspace-concurrency=2 --filter '@objectstack/driver-turso^...' build\" -> VERDICT command-exit 0 (waited 322s after three 9-minute queue-timeouts behind a dogfood holder pid 25299; slot kept); os-verify-lock -c \"pnpm --filter @objectstack/driver-turso exec vitest run --maxWorkers=1 src/zz-probe-35084.test.ts\" -> VERDICT command-exit 0, Tests 2 passed (2), outputs quoted in readings 3. Tree: main 958ee035949, detached worktree objectstack-issue-35084, git status clean after the probe was deleted.", "gates": "n/a: reading round, no diff, no PR, no check-runs.", "dogfood_battery": "n/a: no PR, no ! title, no (narrowing) arm.", "mcp_calls": "0", "api_writes": "1: POST repos/objectstack-ai/objectstack/issues/35084/comments (this os-dev-report, via scripts/pm/post-stamped.mjs). Reads: gh api GET issues 35084, 34973, 34916 and their comments, pulls 35076, 34965 and the 34965 file list.", "deviations": [ "Ran git fetch --unshallow origin main and fetched the driver-turso, driver-sql and objectql release tags into the shared .git (shared across worktrees; adds history and tag refs only) to read release history and run the two-leg ancestry checks.", "No branch was created or pushed: the dispatch allowed the claim branch only for committed probes, and the probe ran untracked." ], "open_questions": [ { "question": "How does the remote twin share the legacy-boolean predicate with driver-sql, whose SQLITE_LEGACY_BOOLEAN_TEXT (sql-driver-schema-sync.ts:2059) is module-private and written with knex ?? placeholders?", "options": [ "A: hand it over through a protected SqlDriver member (as the temporal twin takes sqliteCanonicalDatetimeSql / sqliteNonTemporalTextSql): touches driver-sql (outside the claimed file surface, so a claim amendment), no index export, no Clause-② widening.", "B: export a builder from @objectstack/driver-sql's index: same sharing, but a published export (Clause-② widening) and a driver-sql changeset.", "C: copy the predicate into driver-turso with a parity pin against the local step: stays inside driver-turso/src, but two copies of one rule, which the temporal twin's docblock argues against." ], "recommendation": "A, because it keeps one definition, mirrors the existing temporal twin's handed-over-never-copied pattern, and adds no published surface; cost is a small driver-sql edit (one protected member plus the class-head stub) and a claim amendment." } ], "security_findings": "none", "out_of_scope_findings": [ "Observation, not filed: the remote face declares a toggle column TEXT (remote-transport.ts:2960 default arm; no toggle case beside boolean at :2944) while the local face declares it boolean (sql-driver-column-creation.ts:982-984). Under hrana a toggle stores TEXT '1'/'0' and = true / = false still match (TEXT affinity is applied to the bound integer), so no wrong answer was measured at a public door. Under a remote-mode driver handed an embedded file: client, a JS boolean binds as REAL and the toggle stores '0.0', which then reads back as true (probe: int_zero flag read true); that arrangement is a test harness, not a shipped producer. carrier: none · noted, not filed. dedupe words: remote toggle TEXT column, mapFieldTypeToSQL toggle, toggle 0.0 reads true" ] }objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Claim amendment (build phase) · 2026-11-18T06:21Z. This amends the claim 6970062028.
The reading is positive (os-dev report 6970820123). On main
958ee035949(18.6.0), the Turso remote face never runsSqlDriver.initObjects.completeRemoteSchemaSync(turso-driver.ts:3625-3635) runs only the temporal and codec-residue twins. A probe on the remote face stored'true'/'false'as TEXT through create, update and updateMany. In that state,= false,= true,$ne,$inand count mis-select the rows, and a reboot leaves them unconverted. The local-face control converged the same rows. Shipped writers reach this state on every release up to 18.5.0, so the card's build half is authorised by its own done-when.Open question from the report, decided at PM discretion. It is an implementation-placement choice with no product or contract face, so no ruling is owed: option A. The remote twin takes the legacy-boolean predicate through a protected
SqlDrivermember, the same way the temporal twin takessqliteCanonicalDatetimeSql. That keeps one definition, adds no index export and no Clause-② widening. B (a published export) and C (a copied predicate with a parity pin) were declined for those reasons.File surface (amended):
packages/drivers/driver-turso/src/**+ its tests, pluspackages/drivers/driver-sql/src/**, limited to exposing the existing predicate as a protected member, with no behaviour change on the local face. One changeset covers driver-turso (patch) and driver-sql (patch, if its source moves). Stop on breach and report.Clause-②: no
Metadata-protocol: none
Container & model:
M,mode:subagent,model: TIER_DEFAULT(dispatch-gates --repo objectstack-ai/objectstack --tier: no path-derived mandate),effort: highThread-read: 6970820123
Premise: holds (measured, 6970820123)
Serial constraints cleared: no open PR touches
packages/drivers/driver-sql/orpackages/drivers/driver-turso/(open-PR file lists read at 2026-11-18T06:21Z)objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbabAdcWyApSTGBYJNY
Blocked · 2026-11-18T06:25Z. A security item is with the owner seat. This card stops here; no build branch is pushed.
objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Ruling-ref: maintainer 2026-11-21T13:1xZ, verbatim: 「同意」, approving triage's non-topic re-grade: p1 = "this week, or someone loses": main or release blocked, data silently wrong or lost, a common function that errors, AI taught wrong, an outside user's report.
2026-11-21T13:21Z · p1 → p2 on the maintainer's word: a reading on the Turso remote backfill, blocked and not a loss this week. Lane and state unchanged.