Repository navigation
docs(sqlite): design transferable writer admission authority - #170440
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: needs maintainer review before merge. What this changesThis PR documents a staged design for moving SQLite writer admission to a dedicated worker while preserving live authority and commit settlement. Example: The reported chat.send investigation attributed 673 of 765 ms of one acknowledgment to admission waits.
Review scores
ProductKind: Docs · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it provides a coherent, source-grounded design for reducing admission waits, and no actionable defect was found in the documentation change. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe SQLite broker coordinates queued database operations, policy-owner admission, native execution, and committed receipts; the proposed worker would evaluate transferable admission facts while host COMMIT authorization remains. flowchart TD
A[Gateway write request] --> B[SQLite broker FIFO]
B --> C[Native SQLite worker]
D[Existing authority owners] --> E[Proposed admission worker]
C --> E
C --> F[Host COMMIT authorization]
F --> G[Native commit and receipt settlement]
Technical reviewBest possible solution: Land the documentation through normal checks, then implement the specified owner slices with measured benefit and preserved authority contracts. Do we have a high-confidence way to reproduce the issue? No runtime reproduction applies to this documentation-only patch; current source supports the host admission boundary, while the reported latency measurements remain historical context. Is this the best way to solve the issue? The staged proposal is a reasonable documentation step because it preserves existing owners, commit authorization, retention, and SDK behavior while requiring implementation-specific correctness and performance proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 81e2765b2658. SecurityNone. EvidenceWhat I checked:
PR surfaceDocs +184. Total +184 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 12, 2026, 8:26 PM ET / October 13, 2026, 00:26 UTC. |
What Problem This Solves
Writer admission waits for the Gateway main thread even when the SQLite worker and physical writer are ready. The previous
chat.sendinvestigation traced 673 of 765 ms of one ACK to admission; a plain shared snapshot was fast but incorrectly survived policy revocation.Related: #170376. Retention dependency: #170423.
User Impact
This is the documentation phase of the requested redesign. It changes no runtime behavior, schema, permissions, configuration, or update path. Production LOC delta: 0. No new performance result is claimed.
Why This Change Was Made
The architecture proposal inventories admission authority and mutation points against source commit
4ca02f6c720e6346a0d57b158cc38484fdf5c8da, defines owner-written shared revisions and typed policy/preparation operations, and preserves final host COMMIT authorization and native receipt settlement. It names the residual host waits and the released SDK callback contract that still requires a host adapter.The first implementation slice transfers profile authority and its existing pre-COMMIT fence, followed by one owner per PR. The design reuses #170423's open-time generation reconciliation rather than introducing a second retention protocol. It includes independent service-crash refusal, owner-specific rollback semantics, adversarial tests, and the before/after measurement protocol.
Evidence
git diff --checkpass. The default docs lint command expanded to the whole tree and was stopped; the scoped run passed.