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
Protocol-19 form switch has no path on the Turso remote face: applyStoredFormsOf refuses (no transactions), so hosted tenants with old-shape forms stay 404 #39197
Filing category ① (class b): a measured defect, filed under cross-repo rule 1. Source: objectstack-ai/cloud#5381, dev report 7361699745 on that card, and cloud PR #5390, which carries the tests that measure it.
In cloud PR #5390, protocol-switch.e2e.test.ts runs at pin b706ec6e against libSQL behind TursoDriver's remote face:
the census reads NO-ROLLBACK;
apply is refused and writes nothing, and the form stays 404;
with the guard ablated, applyStoredFormsOf itself fails, answering 500.
The same flow on SQLite switches and serves the form again.
Seam
spec: ADR-0159 D7's switch (FORM_TYPE_SWITCH_MIGRATION_ID, os migrate protocol --to 19 --apply), consumed by runtime: metadata-protocol's storedFormRunRefusal and applyStoredFormsOf, and the driver-turso remote transport (transactionsUnsupported).
f42afe7 (#38957) says moved forms are served again "including hosts that assemble their own kernel", but no switch path exists for the transport every hosted tenant uses.
Also (same seam, not a defect)
The framework exports no host-side switch orchestration, so cloud re-spells the CLI's order: census, refusal, ceremony, census, recordDataMigrationRun. An exported switchStoredFormsOf(protocol, engine) would remove the copy and the drift risk.
Acceptance
On the Turso remote face, the protocol-19 switch either moves old-shape forms with an all-or-nothing guarantee or refuses with a documented operator remedy.
Claim: PM loop round 7 · 2026-12-03T04:54Z
Ruling-ref: the maintainer, in the cloud seat's session, put objectstack's open pm:queue + area:cloud p1/p2 cards in this seat's lane: 「这些任务也应该归你处理 is:issue state:open label:pm:queue label:priority:p2,priority:p1 label:area:cloud」, 「objectstack 仓库的 …」.
Scope: give the protocol-19 stored-form switch a path on the Turso remote face. Either the move runs all-or-nothing there (for example as one libSQL batch, or as an interactive transaction if the transport offers one), or it refuses with a documented operator remedy. Add a test on libSQL's remote transport. Optional, same seam: export host-side switch orchestration, but only if it falls out with no new contract. Cloud's call site is not touched here.
Session: session_01TsNV8Bsjqmw7aXCo2QuLU1
Account: zhuangjianguo
Branch: claude/issue-39197-turso-form-switch
Worktree: objectstack-issue-39197
Domain: domain:data
Seat: repo:cloud@zhuangjianguo
File surface: packages/metadata-protocol/src/, packages/drivers/driver-turso/src/ (reason: the switch runner and the remote transport the card measures)
Container & model: L, mode:subagent, model: default (dispatch-gates --tier: no mandate), effort: high (reason: an all-or-nothing data migration on a transport without transactions; a partial move strands tenant forms)
Clause-②: no
Metadata-protocol: none
Responsibility: the protocol-19 stored-form switch on the Turso remote transport | f42afe7 (#38957) | every hosted tenant with old-shape forms (they stay 404 with no path back)
Thread-read: 7361699745
Premise: holds (cloud PR #5390's protocol-switch.e2e.test.ts at pin b706ec6e: census NO-ROLLBACK, apply refused, form stays 404)
Serial constraints cleared: none
{
"issue": 39197,
"status": "needs_decision",
"branch": "claude/issue-39197-turso-form-switch",
"pr": null,
"session": "session_01TsNV8Bsjqmw7aXCo2QuLU1",
"premise_still_valid": true,
"summary": "The defect holds at origin/main 93e035410. Every file the card names is byte-equal to pin b706ec6e (git diff --stat b706ec6e 93e035410 over protocol-stored-form-apply.ts, turso-driver.ts, remote-transport.ts, cli stored-forms.ts, core migration-journal.ts and spec driver.zod.ts is empty). The remote face declares transactionsUnsupported (turso-driver.ts:1971), so engineCanRollBack answers false. The census says NO-ROLLBACK (cli stored-forms.ts:45) and the ceremony refuses before writing (protocol-stored-form-apply.ts:268). The transport does offer atomic primitives: libSQL batch is one transaction (hrana.js executeHranaBatch: BEGIN, conditional steps, COMMIT, ROLLBACK on failure), and HttpClient.transaction() opens an interactive transaction over a Hrana stream (http.js:155). The dispatch's assumed mechanism is FALSIFIED: the switch's writes cannot be precomputed into one batch. Every repo.put/delete reads between its writes: resolveWriteHead, nextItemVersion (MAX of history), nextEventSeq, appendHistoryRow's seq re-derivation (sys-metadata-repository.ts:1349-1489, 1653-1677), and step 3 reads each copy back and requires its hash (protocol-stored-form-apply.ts:346). A captured batch would hand every put the same event_seq and fail the read-back, unless the repository's write logic were forked into SQL. The only atomic route left is real interactive transactions on the remote face. That is not scoped to the switch: it flips the face's transaction declaration for every hosted engine.transaction caller. Any switch-scoped variant needs a new driver contract (Clause-② yes). So this is a fork between architectures, and I stopped before writing code (os-dev.md, when to stop). No commit, no PR. Only the empty probe branch was pushed. The dispatch carried no decision axes, so the per-axis analysis is owed once the PM supplies them.",
"tests": "No code change, so no suite ran. A transport reading at 93e035410, on @libsql/client 0.18.0's native file client (node probe script in the scratchpad, exit 0): (1) batch(['INSERT a','INSERT a'],'write') gave SQLITE_CONSTRAINT and 0 rows after the failed batch, so the batch is all or nothing; (2) transaction('write'): an insert was seen inside the tx (count 1), and after rollback the count was 0. The Hrana/HTTP behaviour is from reading http.js:155 and hrana.js:214-242, not a network measurement. No sqld binary is in the container (which sqld/turso: none). No ablation: no tested behaviour changed.",
"gates": "NOT MEASURED: no diff, so dispatch-gates.mjs --commands has nothing to derive and no family is owed. No PR, so there are no check-runs to cite.",
"mcp_calls": "0",
"api_writes": "2 - git push of the empty probe branch claude/issue-39197-turso-form-switch (dev-worktree.sh --probe, at origin/main 93e035410); this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/39197/comments)",
"classifier_refusals": [],
"open_questions": [
{
"question": "The switch's writes cannot be one libSQL batch (repo.put reads between its writes, and step 3 reads each copy back). Which route should give hosted (Turso remote) tenants a path through the protocol-19 stored-form switch?",
"options": [
"A: Real interactive transactions on the Turso remote face. Remote beginTransaction() returns a handle over client.transaction('write'). Each remote arm that refuses options.transaction today (21 sites in turso-driver.ts), plus the autonumber helper, routes the handle to a RemoteTransport bound to that libSQL transaction (all its SQL goes through sendStatement/sendBatch, remote-transport.ts:2415-2441). commit/rollback call the libSQL transaction, and supports.transactionsUnsupported becomes false on remote. The census and the ceremony then work unchanged, and the guarantee is real. Cost: every engine.transaction on a hosted tenant becomes a real interactive write transaction that holds the tenant DB's write lock across network round trips (grep reading at 93e035410: 31 '.transaction(' call sites in 15 non-test source files, an approximate count). Discovery's transactionalBatch flips to true for hosted tenants. Turso documents a timeout on interactive transactions, not measured here. The ceremony (roughly 15 round trips per moved form) may exceed it on large tenants: still all or nothing, but the run fails. This completes the work turso-driver.ts records as deferred ('Implementing transactions on this transport is a separate piece of work'). Work: L to XL, its own card, measured against a real sqld/Turso endpoint before landing.",
"B: Refuse with a documented operator remedy. Keep NO-ROLLBACK, and reword the census sentence (cli stored-forms.ts:45) and the ceremony refusal (protocol-stored-form-apply.ts:270) to name a remedy that exists for a remote database, documented in the upgrade docs. Cost: S in code. But the remedy is an operator procedure nobody has measured, for example: export the tenant DB to a local SQLite file, run 'os migrate protocol --to 19 --apply' against it, then re-import it. That needs downtime and cloud tooling, and forms stay 404 until an operator runs it.",
"C: A switch-scoped atomic path through a new driver capability, either a declared scoped-transaction member or a batch-capture API the ceremony reads. That is a new published contract (Clause-② yes). The capture variant is not feasible without forking the repository's write logic (event_seq, version and read-back are each read between writes).",
"D: Relax all or nothing on the remote face to an ordered, resumable run: write copies and read them back first, take old rows after, and a re-run is idempotent (already true). This overturns the ADR-0159 D7 all-or-nothing ruling, so it needs a maintainer ruling and an ADR amendment."
],
"recommendation": "A, gated on one measurement first: the ceremony on a real sqld/Turso endpoint, checking the lock and timeout against the ceremony's round-trip count. A is the only route that is atomic without a new contract or a ruling reversal, and it fixes the same false-atomicity for every hosted transaction caller, not only the switch. If the measurement shows the timeout bites at realistic form counts, fall back to B with a cloud-owned procedure. Axis analysis: the dispatch carried no decision axes (os-dev.md: the axes come verbatim from pm-dispatch SKILL.md, and the dev does not draft its own). PM, please send them, and I will grade each option on them."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: objectstack#39197 (card owner) · noted, not filed: the card's 'Also' item. An exported switchStoredFormsOf(protocol, engine) would remove cloud's copy of the CLI's order (census, refusal, ceremony, census, recordDataMigrationRun). Out of scope per the dispatch unless the card's owner rules otherwise. It would be a new published export (Clause-② yes).",
"carrier: cloud#5381 · noted: whichever route is chosen, cloud's protocol-switch e2e (PR #5390, Turso remote case) is the downstream pin that flips from NO-ROLLBACK to a moved form."
]
}
Dev stopped at an architecture fork → needs-user-decision · 2026-12-03T05:04Z
Dev report 7368326827, at origin/main 93e035410. Every file the card names is byte-equal to pin b706ec6e, so the defect holds. No code was written.
Measured / read:
libSQL's batch is all or nothing (probe: a failed batch leaves 0 rows).
transaction('write') is real on the libSQL client, and the Hrana HTTP client opens interactive transactions over a stream (http.js:155).
The switch's writes cannot be precomputed into one batch. Every repo.put / delete reads between its writes (write head, nextItemVersion, nextEventSeq, history seq), and step 3 reads each copy back and checks its hash. A captured batch would give every put the same event_seq.
Out of scope (noted): the card's "Also" item, an exported switchStoredFormsOf, would be a new published export (Clause-② yes) and needs its own ruling. Cloud's protocol-switch e2e (cloud PR #5390, Turso remote case) is the downstream pin that flips once a route lands.
2026-12-03T22:58Z · Release (claim only) · seat repo:cloud@zhuangjianguo's account zhuangjianguo is out of tokens. The maintainer's takeover order went to seat repo:cloud#5, whose project takes only objectstack-ai/cloud cards, so this objectstack card stays with the objectstack lane.
Release: claim 7368180230 (session session_01TsNV8Bsjqmw7aXCo2QuLU1, account zhuangjianguo, seat repo:cloud@zhuangjianguo). Provenance: who = the maintainer (Jack, hotlong); words, verbatim: 「zhuangjianguo 座位没有token了,你看一下他的任务你全部接手」; where = hotlong's fleet project 「cloud #5」 (seat repo:cloud#5), 2026-12-03T22:44Z.
Resume-from: claude/issue-39197-turso-form-switch@93e03541031a9b62f740c25afe0026bb07ed9190
Handover: needs-user-decision stays; the card waits on the maintainer. Per director#1's correction (latest comment), it no longer holds the production deploy. The cloud side, cloud#5381, is the maintainer's card. Assignee zhuangjianguo cleared in this stroke.
Activity
objectstack-fleet commentedon Dec 3, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
First touch · 2026-12-03T00:04Z
定级:
area:cloud · Bug · p2 · 托管租户库(Turso 远程连接无事务)跑不了协议 19 表单切换,旧格式表单一直 404 且无路可恢复 · 实测(cloud PR #5390 的测试)domain:data(驱动无事务)、类型 Bug,进pm:queue。objectstack-fleet commentedon Dec 3, 2026
repo:cloud@zhuangjianguo · zhuangjianguo · session_01TsNV8Bsjqmw7aXCo2QuLU1
Claim: PM loop round 7 · 2026-12-03T04:54Z
Ruling-ref: the maintainer, in the cloud seat's session, put objectstack's open
pm:queue+area:cloudp1/p2 cards in this seat's lane: 「这些任务也应该归你处理 is:issue state:open label:pm:queue label:priority:p2,priority:p1 label:area:cloud」, 「objectstack 仓库的 …」.Scope: give the protocol-19 stored-form switch a path on the Turso remote face. Either the move runs all-or-nothing there (for example as one libSQL batch, or as an interactive transaction if the transport offers one), or it refuses with a documented operator remedy. Add a test on libSQL's remote transport. Optional, same seam: export host-side switch orchestration, but only if it falls out with no new contract. Cloud's call site is not touched here.
Session:
session_01TsNV8Bsjqmw7aXCo2QuLU1Account:
zhuangjianguoBranch:
claude/issue-39197-turso-form-switchWorktree:
objectstack-issue-39197Domain:
domain:dataSeat:
repo:cloud@zhuangjianguoFile surface:
packages/metadata-protocol/src/,packages/drivers/driver-turso/src/(reason: the switch runner and the remote transport the card measures)Container & model:
L,mode:subagent,model: default (dispatch-gates --tier: no mandate),effort: high (reason: an all-or-nothing data migration on a transport without transactions; a partial move strands tenant forms)Clause-②: no
Metadata-protocol: none
Responsibility: the protocol-19 stored-form switch on the Turso remote transport | f42afe7 (#38957) | every hosted tenant with old-shape forms (they stay 404 with no path back)
Thread-read: 7361699745
Premise: holds (cloud PR #5390's
protocol-switch.e2e.test.tsat pinb706ec6e: census NO-ROLLBACK, apply refused, form stays 404)Serial constraints cleared: none
objectstack-fleet commentedon Dec 3, 2026
repo:cloud@zhuangjianguo · zhuangjianguo · session_01TsNV8Bsjqmw7aXCo2QuLU1
os-dev-report
{ "issue": 39197, "status": "needs_decision", "branch": "claude/issue-39197-turso-form-switch", "pr": null, "session": "session_01TsNV8Bsjqmw7aXCo2QuLU1", "premise_still_valid": true, "summary": "The defect holds at origin/main 93e035410. Every file the card names is byte-equal to pin b706ec6e (git diff --stat b706ec6e 93e035410 over protocol-stored-form-apply.ts, turso-driver.ts, remote-transport.ts, cli stored-forms.ts, core migration-journal.ts and spec driver.zod.ts is empty). The remote face declares transactionsUnsupported (turso-driver.ts:1971), so engineCanRollBack answers false. The census says NO-ROLLBACK (cli stored-forms.ts:45) and the ceremony refuses before writing (protocol-stored-form-apply.ts:268). The transport does offer atomic primitives: libSQL batch is one transaction (hrana.js executeHranaBatch: BEGIN, conditional steps, COMMIT, ROLLBACK on failure), and HttpClient.transaction() opens an interactive transaction over a Hrana stream (http.js:155). The dispatch's assumed mechanism is FALSIFIED: the switch's writes cannot be precomputed into one batch. Every repo.put/delete reads between its writes: resolveWriteHead, nextItemVersion (MAX of history), nextEventSeq, appendHistoryRow's seq re-derivation (sys-metadata-repository.ts:1349-1489, 1653-1677), and step 3 reads each copy back and requires its hash (protocol-stored-form-apply.ts:346). A captured batch would hand every put the same event_seq and fail the read-back, unless the repository's write logic were forked into SQL. The only atomic route left is real interactive transactions on the remote face. That is not scoped to the switch: it flips the face's transaction declaration for every hosted engine.transaction caller. Any switch-scoped variant needs a new driver contract (Clause-② yes). So this is a fork between architectures, and I stopped before writing code (os-dev.md, when to stop). No commit, no PR. Only the empty probe branch was pushed. The dispatch carried no decision axes, so the per-axis analysis is owed once the PM supplies them.", "tests": "No code change, so no suite ran. A transport reading at 93e035410, on @libsql/client 0.18.0's native file client (node probe script in the scratchpad, exit 0): (1) batch(['INSERT a','INSERT a'],'write') gave SQLITE_CONSTRAINT and 0 rows after the failed batch, so the batch is all or nothing; (2) transaction('write'): an insert was seen inside the tx (count 1), and after rollback the count was 0. The Hrana/HTTP behaviour is from reading http.js:155 and hrana.js:214-242, not a network measurement. No sqld binary is in the container (which sqld/turso: none). No ablation: no tested behaviour changed.", "gates": "NOT MEASURED: no diff, so dispatch-gates.mjs --commands has nothing to derive and no family is owed. No PR, so there are no check-runs to cite.", "mcp_calls": "0", "api_writes": "2 - git push of the empty probe branch claude/issue-39197-turso-form-switch (dev-worktree.sh --probe, at origin/main 93e035410); this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/39197/comments)", "classifier_refusals": [], "open_questions": [ { "question": "The switch's writes cannot be one libSQL batch (repo.put reads between its writes, and step 3 reads each copy back). Which route should give hosted (Turso remote) tenants a path through the protocol-19 stored-form switch?", "options": [ "A: Real interactive transactions on the Turso remote face. Remote beginTransaction() returns a handle over client.transaction('write'). Each remote arm that refuses options.transaction today (21 sites in turso-driver.ts), plus the autonumber helper, routes the handle to a RemoteTransport bound to that libSQL transaction (all its SQL goes through sendStatement/sendBatch, remote-transport.ts:2415-2441). commit/rollback call the libSQL transaction, and supports.transactionsUnsupported becomes false on remote. The census and the ceremony then work unchanged, and the guarantee is real. Cost: every engine.transaction on a hosted tenant becomes a real interactive write transaction that holds the tenant DB's write lock across network round trips (grep reading at 93e035410: 31 '.transaction(' call sites in 15 non-test source files, an approximate count). Discovery's transactionalBatch flips to true for hosted tenants. Turso documents a timeout on interactive transactions, not measured here. The ceremony (roughly 15 round trips per moved form) may exceed it on large tenants: still all or nothing, but the run fails. This completes the work turso-driver.ts records as deferred ('Implementing transactions on this transport is a separate piece of work'). Work: L to XL, its own card, measured against a real sqld/Turso endpoint before landing.", "B: Refuse with a documented operator remedy. Keep NO-ROLLBACK, and reword the census sentence (cli stored-forms.ts:45) and the ceremony refusal (protocol-stored-form-apply.ts:270) to name a remedy that exists for a remote database, documented in the upgrade docs. Cost: S in code. But the remedy is an operator procedure nobody has measured, for example: export the tenant DB to a local SQLite file, run 'os migrate protocol --to 19 --apply' against it, then re-import it. That needs downtime and cloud tooling, and forms stay 404 until an operator runs it.", "C: A switch-scoped atomic path through a new driver capability, either a declared scoped-transaction member or a batch-capture API the ceremony reads. That is a new published contract (Clause-② yes). The capture variant is not feasible without forking the repository's write logic (event_seq, version and read-back are each read between writes).", "D: Relax all or nothing on the remote face to an ordered, resumable run: write copies and read them back first, take old rows after, and a re-run is idempotent (already true). This overturns the ADR-0159 D7 all-or-nothing ruling, so it needs a maintainer ruling and an ADR amendment." ], "recommendation": "A, gated on one measurement first: the ceremony on a real sqld/Turso endpoint, checking the lock and timeout against the ceremony's round-trip count. A is the only route that is atomic without a new contract or a ruling reversal, and it fixes the same false-atomicity for every hosted transaction caller, not only the switch. If the measurement shows the timeout bites at realistic form counts, fall back to B with a cloud-owned procedure. Axis analysis: the dispatch carried no decision axes (os-dev.md: the axes come verbatim from pm-dispatch SKILL.md, and the dev does not draft its own). PM, please send them, and I will grade each option on them." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: objectstack#39197 (card owner) · noted, not filed: the card's 'Also' item. An exported switchStoredFormsOf(protocol, engine) would remove cloud's copy of the CLI's order (census, refusal, ceremony, census, recordDataMigrationRun). Out of scope per the dispatch unless the card's owner rules otherwise. It would be a new published export (Clause-② yes).", "carrier: cloud#5381 · noted: whichever route is chosen, cloud's protocol-switch e2e (PR #5390, Turso remote case) is the downstream pin that flips from NO-ROLLBACK to a moved form." ] }objectstack-fleet commentedon Dec 3, 2026
repo:cloud@zhuangjianguo · zhuangjianguo · session_01TsNV8Bsjqmw7aXCo2QuLU1
Dev stopped at an architecture fork → needs-user-decision · 2026-12-03T05:04Z
Dev report 7368326827, at origin/main
93e035410. Every file the card names is byte-equal to pinb706ec6e, so the defect holds. No code was written.Measured / read:
batchis all or nothing (probe: a failed batch leaves 0 rows).transaction('write')is real on the libSQL client, and the Hrana HTTP client opens interactive transactions over a stream (http.js:155).repo.put/deletereads between its writes (write head,nextItemVersion,nextEventSeq, history seq), and step 3 reads each copy back and checks its hash. A captured batch would give every put the sameevent_seq.维护者速读
--rows,由维护者执行。Out of scope (noted): the card's "Also" item, an exported
switchStoredFormsOf, would be a new published export (Clause-② yes) and needs its own ruling. Cloud's protocol-switch e2e (cloud PR #5390, Turso remote case) is the downstream pin that flips once a route lands.objectstack-fleet commentedon Dec 3, 2026
director#1 · hotlong · session_f4c42f815d5e47b39de5e9fb0d6d7864
普查读数到了(cloud#5381 评论 7371379303,2026-12-03T07:55Z):生产 50 个租户库里 3 个在用环境有
active旧格式表单(7 行,另 1 行草稿);staging 51 个里 2 个在用、4 个归档。维护者据此裁定生产的 objectos 部署先缓(cloud#5381 本席记录),所以本卡现在挡着协议 19 的生产部署。优先级要不要上调,已呈维护者。objectstack-fleet commentedon Dec 3, 2026
director#1 · hotlong · session_f4c42f815d5e47b39de5e9fb0d6d7864
更正(2026-12-03T08:05Z):受影响的旧格式行经核实全是内部记录表单,没有公开链接,也没有操作指向它们,部署后用户看不到变化。维护者已把生产部署改回照常部署(cloud#5381 本席改判记录)。本卡不再挡生产部署,不需要因此上调优先级。
objectstack-fleet commentedon Dec 3, 2026
repo:cloud#5 · hotlong · session_01Q4EjjQPiTGVjMVAbb5yijp
2026-12-03T22:58Z · Release (claim only) · seat
repo:cloud@zhuangjianguo's accountzhuangjianguois out of tokens. The maintainer's takeover order went to seatrepo:cloud#5, whose project takes only objectstack-ai/cloud cards, so this objectstack card stays with the objectstack lane.Release: claim 7368180230 (session
session_01TsNV8Bsjqmw7aXCo2QuLU1, accountzhuangjianguo, seatrepo:cloud@zhuangjianguo). Provenance: who = the maintainer (Jack,hotlong); words, verbatim: 「zhuangjianguo 座位没有token了,你看一下他的任务你全部接手」; where = hotlong's fleet project 「cloud #5」 (seatrepo:cloud#5), 2026-12-03T22:44Z.Resume-from: claude/issue-39197-turso-form-switch@93e03541031a9b62f740c25afe0026bb07ed9190
Handover:
needs-user-decisionstays; the card waits on the maintainer. Per director#1's correction (latest comment), it no longer holds the production deploy. The cloud side, cloud#5381, is the maintainer's card. Assigneezhuangjianguocleared in this stroke.