Repository navigation
improve: move Board writes off the Gateway thread - #153159
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 20, 2026, 1:36 AM ET / 05:36 UTC (Revision 10). ClawSweeper reviewWhat this changesMoves disk-backed dashboard Board mutations to the shared database worker while preserving ordered reads, authorization, and committed-change notifications. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful: current main still performs Board mutations on the caller thread. No actionable introduced defect was found. The previous migration-proof blocker is unsupported by the actual diff. Priority: P2 Review scores
Verification
How this fits togetherBoards store dashboard widgets and layouts for each session. Gateway requests enter the Board store, which persists mutations and publishes changes consumed by session projections and clients. flowchart TD
A[Gateway Board requests] --> B[Capture inputs and session target]
B --> C[Per-agent writer queue]
C --> D{Disk or incognito}
D -->|Disk| E[Shared database worker]
D -->|Incognito| F[Process-held database]
E --> G[Existing transaction kernels and authority checks]
F --> G
G --> H[Committed notifications and response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +286, Tests +834, Docs +22. Total +1142 across 26 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the shared worker implementation with the existing schema, transaction kernels, live-authority checks, and exact-session publication owner. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: this is an execution-boundary improvement, and current-main source confirms ordinary Board mutations still run synchronously on the caller thread. Is this the best way to solve the issue? Yes. Reusing the canonical worker and existing kernels avoids competing storage owners; the unchanged persisted contract does not justify retaining the previous migration-proof blocker. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9343ea4099ba. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
ff61ae3 to
1685273
Compare
1685273 to
415d247
Compare
Move ordinary persistent Board mutations onto the canonical agent worker while preserving revisions, grants, physical targets, and host notifications. Keep protected reads in the same FIFO and retain the caller's async context when invoking consumers. Preserve known committed results through cleanup failures, invalidate unknown outcomes without replay, and retain Windows environment lookup semantics. Bootstrap, admission, reads, and incognito remain native. Related: #153159, #153150, #153286
415d247 to
f1b386f
Compare
f1b386f to
f394c28
Compare
Move ordinary persistent Board mutations onto the canonical agent worker while preserving revisions, grants, physical targets, and host notifications. Keep protected reads in the same FIFO and retain the caller's async context when invoking consumers. Preserve known committed results through cleanup failures, invalidate unknown outcomes without replay, and retain Windows environment lookup semantics. Bootstrap, admission, reads, and incognito remain native. Related: #153159, #153150, #153286
f394c28 to
96c38c3
Compare
96c38c3 to
e548bf7
Compare
|
Merged via squash.
|
Related: #153150, #153286, #153351, #153296.
Foundation #153150 and shared fixture repairs #153286, #153296, and #153351 are merged. This candidate is a single focused consumer commit on actual main
44b012703080. Its catalog union preserves main’sworkspaceMemoryandworkspaceSkillsregistrations alongside the originalboardStoreregistration. Main’s database-worker routes are retained in full, with Board parity registered once and the other seven original Board/Canvas routes added.What Problem This Solves
Board updates return promises but still execute ordinary SQLite writes on the caller thread.
User Impact
Board mutations execute off the Gateway thread while preserving revisions, grants, persistence, and notifications. Protected results also respect earlier queued mutations. Schema/bootstrap work, source admission, protected reads, cold
hasBoard, and incognito remain native; this does not move all SQLite activity off-thread.Why This Change Was Made
The existing synchronous Board kernels borrow the canonical agent worker connection. Inputs and physical targets stay captured across the writer queue, MCP source policy and live authority are revalidated, and committed changes reach the host publisher before results are exposed. Unknown outcomes invalidate the original session without replay; known completed results survive cleanup failures.
Protected read turns join the same queue, then release it before awaiting external consumer work. Consumers retain their original caller context rather than inheriting temporary reentrant queue ownership. Host environment capture preserves Windows case-insensitive lookup. No additional physical actor, schema, protocol, or configuration surface is introduced.
Evidence
f394c2837044(157 jobs completed, no failures). The preceding catalog composition96c38c3ef8c7passed 57 runtime tests, both routing guards, a real build-entry mapping probe for all three registrations, and a fresh P2 review. The current routing-union candidatee548bf795c9apassed all 189 selected tests (93 routing-owner and 96 runtime/parity/reclamation tests), with a fresh P2 review. The catalog and its mapping owner are unchanged from the qualified probe. Current-head CI is pending. An earlier run’s final extension shard was still running when the qualified successor superseded it; that shard is not claimed as a pass.