Repository navigation
perf(boards): admit reads alongside transcript-only appends - #173763
Merged
steipete merged 2 commits intoOct 16, 2026
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
steipete
marked this pull request as ready for review
October 16, 2026 04:00
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
steipete
deleted the
steipete/perf-micro-read-admission-behind-writes-20260919
branch
October 16, 2026 04:28
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 17, 2026
…#173763) * perf(boards): admit reads alongside transcript-only appends * test(boards): use test cancellation for concurrency cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes Board data reads waiting behind ordinary transcript appends even though SQLite WAL permits a concurrent snapshot read. An observed request took 33.185 seconds, including 33.167 seconds in two writer FIFO waits.
User Impact
Board widgets can read while a prepared transcript-only append holds the database writer. Widget grant changes, Board mutations, session lifecycle work, and cold initialization retain exclusive admission through native settlement. No configuration, schema, or stored-format changes are required.
Why This Change Was Made
Board authority reads used the generic write reservation. Reuse the existing queue's conflict keys: Board reads reserve the Board key, and certified warm actor appends reserve the transcript key. Every other writer remains exclusive; all writers retain mutual exclusion and FIFO ordering. Commands with initialization or reducers cannot opt into concurrency, and prepared-generation authority prevents reopening under the narrower reservation.
The redundant whole-database reservation is removed from Board reads. Production delta: +71/-21 lines (+50 net); this growth carries the transcript-only classification through the existing actor transport and preserves the live grant/settlement contract. No new queue, cache, revision fence, or compatibility path is introduced. Test delta: +108/-2 lines.
Evidence
The isolated Linux fixture contains 5,000 sessions, 6,000 retained runs, 200 approvals, 100 cron jobs, and 12 project worktrees. Baseline:
060a63ff446a. Measurements alternate baseline/head, head/baseline, baseline/head; each sample exercises the two real Board authority reads used by the RPC.The held-writer case improves about 276×; real owned-actor traffic p95 improves about 17×. Every actor run commits 100 messages and completes 40 Board read pairs without failure. Observing the existing pending queue confirms exclusive admission before and transcript admission after. Idle medians remain within noise (1.37–1.86 ms across paired controlled runs). Actor-workload medians are 1.14/1.30 ms and include idle reads after writers finish; the tail and controlled results isolate the contention benefit.
Validation:
board.data.readregression completes while a realBEGIN IMMEDIATEtransaction is held. The old admission path exceeded the original five-second reproduction bound. The committed test uses framework cancellation for cleanup rather than a separate wall-clock deadline.openclaw-agent-write-admission.test.ts,board.runtime-boundaries.test.ts,board.plugin-capabilities.test.ts, andsqlite-board-store.worker.test.ts. Existing grant, closure, publication, and read-after-write coverage remains intact.withinTest, independently reviewed the repair, and reran only the two affected files: 36 tests passed. All other first-head CI gates passed. Final-head CI passed on9b7cbb7e09d5df97cb1631303d6473b87b2322f2, including the combined CI gate, build, lint, typechecks, and selected test lanes.git diff --checkpassed. PR CI owns broad build/typecheck/test gates; no Testbox lease or local broad suite was run.Measurement limits: the remote harness omits RPC transport and binding-handler work; the focused regression covers the actual RPC handler. Legacy append and unbound SDK-manager controls retain exclusive admission. Two fixture-preparation attempts timed out before measurements; actor preparation was serialized outside the measured interval and the process startup allowance increased before completing the remaining matched pairs. An extra unpaired head run is excluded from aggregates. No production data or Gateway was used, and no production stress deployment is claimed.