Repository navigation
fix: support large SQLite worker commands with bounded transport - #146019
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 12, 2026, 10:46 AM ET / 14:46 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR transfers large SQLite worker commands in bounded chunks, preserves admission and cleanup behavior, and adds regression coverage and documentation. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main still rejects commands above 32 MiB. No blocking defect was found. The previous migration-proof blocker does not apply because this patch changes transport without changing the persisted data model. Priority: P2 Review scores
Verification
How this fits togetherSQLite worker stores move plugin database operations off the application thread. The broker admits serialized commands, transfers them to the database-owning worker, and returns complete results while retaining operation ownership. flowchart TD
A[Plugin database command] --> B[Snapshot and admission]
B --> C{Capacity available?}
C -->|No| D[Overload error]
C -->|Yes| E[Inline or chunked transfer]
E --> F[Validate complete command]
F --> G[Execute database operation once]
G --> H[Return result and release credits]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +168, Tests +292, Docs +19. Total +479 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Preserve complete domain values through the existing worker owner without introducing a storage size limit or a second persistence path. Do we have a high-confidence way to reproduce the issue? Yes, from source: executing a serialized command above 32 MiB reaches current main's unconditional input-size rejection. This review did not execute the failure. Is this the best way to solve the issue? Yes. Reusing the existing framing primitive preserves the store interface, exactly-once execution boundary, and lifecycle ownership without changing durable formats. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fd9e782dc27e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…nclaw#146019) * fix: support large SQLite worker commands with bounded transport * refactor: keep SQLite transfer handles in the leaf contract
What Problem This Solves
Resolves a problem where plugins using worker-backed SQLite could not write valid commands larger than 32 MiB. Managed-flow state and wait data have no corresponding domain size limit, so moving those writes to workers otherwise rejects values accepted by the existing storage contract.
Why This Change Was Made
The existing worker broker now stages large execute commands through the same bounded transfer primitive used for large results. The original job retains its actor and lifecycle until the complete command is validated and executed once. Small requests retain the existing path; cancellation, failure, and close release staging ownership without partially executing or replaying a command.
The 32 MiB message and 64 MiB aggregate transport budgets remain unchanged. Queued commands charge their full serialized size. Commands larger than the aggregate budget require an idle slot and reserve a 32 MiB transport window; otherwise they receive the existing overload error. The budget bounds admitted transport queues and windows, while the complete active command or result remains operation memory. This distinction is documented explicitly.
User Impact
Plugins can write large valid SQLite values through workers while retaining bounded transport messages and backpressure. This is the transport prerequisite for the separate managed-flow mutation migration; it does not add a database schema, public size limit, or PostgreSQL backend.
Evidence