Repository navigation
fix: prevent SQLite admission refusals during Gateway delays - #154682
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. Reviewed September 21, 2026, 6:50 AM ET / 10:50 UTC (Revision 4). ClawSweeper reviewWhat this changesSQLite workers now wait for the host’s admission decision instead of refusing database operations after five seconds, with regression coverage and documentation. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release retain the premature admission timeout. The previous merge-conflict blocker is resolved, and this review found no actionable defect in the remaining SQLite change. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw runs database operations in workers while the Gateway retains caller authority. Workers request permission before protected operations, and the broker retains custody until execution settles or the worker exits. flowchart TD
A[Chat and task operations] --> B[SQLite worker broker]
B --> C[Worker admission request]
C --> D[Host checks current authority]
D -->|Grant| E[Database operation]
D -->|Refuse| F[Operation rejected]
E --> G[Settlement and custody release]
B -->|Worker failure| H[Join worker exit]
H --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +47, Docs +5. Total +55 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep admission decisions with the live host owner while preserving revocation checks and broker-owned settlement. Do we have a high-confidence way to reproduce the issue? Yes, from source: delaying host admission service beyond five seconds makes the current-main worker refuse a still-pending request. This read-only review did not execute the reproduction. Is this the best way to solve the issue? Yes. Removing the competing worker deadline repairs the existing admission owner without adding retries, configuration, or another authorization path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 56455cb33377. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
d902c09 to
6472c86
Compare
|
Merged via squash.
|
…w#154682) Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes chat turns and task lists failing with "SQLite transaction admission was refused" when a busy Gateway takes longer than five seconds to service a worker authority request.
User Impact
Accepted database operations wait for the live owner's decision instead of failing solely because the host was delayed. Revoked authority still refuses the operation. No configuration, schema, durability, retention, or permission changes; updating requires no migration or operator action.
Why This Change Was Made
The worker independently expired a request that the host still owned, preventing a later valid grant. Keep the shared decision pending until the host grants or refuses it. Broker failure still terminates and joins the worker before releasing custody; coordinator-lock and broker-capacity deadlines are unchanged. This also removes the race between a late host grant and worker-side refusal.
Evidence
2374731264e; the prior recovery verified all three affected SQLite files and their patch byte-identical at6472c860283. This continuation did not rerun those tests.6472c860283613f0d81ba5cfee5d17d6803348b5: scoped-clean, no P0-P2 findings, exit 0. The supplied unchanged-source context and binary patch hashes were verified against the candidate. Earlier authentication failures produced no passing evidence and are superseded by this completed run.Atomics.waitcontract confirms an omitted timeout waits indefinitely and the compare-before-wait handles a decision arriving before suspension.6472c860283613f0d81ba5cfee5d17d6803348b5. Required CI, dependency-review, and security-sensitive-review gates are successful; the observed rollup has 168 passing and 43 skipped/neutral checks, with no failing or pending checks.Earlier CI failure and conflict resolution
The original CI shard failed Discord audio-worker pacing because fixture readiness preceded real audio consumption. The original shard replay passed 289 files / 4,079 tests; that passing replay alone did not resolve the race.
Main subsequently landed the owning first-packet readiness correction in 761725d03f2. This PR is based on that correction and drops its redundant Discord test commit. The resulting diff is SQLite-only: one production file, its regression test, and matching documentation. Upstream owns the Discord fixture and its repeatability evidence; no thresholds are weakened by this PR.