Repository navigation
perf(worker): trim unused actor admission replica metadata - #184018
Merged
steipete merged 1 commit intoOct 26, 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. |
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-untyped-worker-object-messages-20261026
branch
October 26, 2026 01:28
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 26, 2026
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
Actor worker admissions repeatedly clone replica metadata that their live grant handlers never consume.
User Impact
A small reduction in worker-message bytes and allocation during session activity, with no user-visible behavior change or migration.
Why This Change Was Made
Narrow the existing authority projection to the exact physical/session target and complete session entry. Replica version, write token, and dependency IDs remain in full read results and committed receipts; expected-version checks stay in the worker command. Live authority and operation-publication checks still run at both transaction boundaries. No new cache, protocol mechanism, or configuration.
Runtime production delta: −3 LOC. Required reproducible benchmark tooling adds 134 LOC; the requested non-test/non-doc diff including that tooling is +131 LOC (139 additions, 8 deletions). The standalone benchmark’s usage is in its header. No shared performance README change.
Evidence
The existing actor admission regression fails on the baseline: 407 framing bytes, exceeding its <32-byte budget beyond target and entry. With the fix, all 28 actor tests pass, including stale-version rejection, native receipt recovery, and fresh-message authority revocation. Core typecheck, changed-file lint/format, export-name collision guard, and both import-closure guards pass (22 closure tests).
Independent subagent review (autoreview route unavailable): fresh-context Codex review found no actionable P0–P2 findings. The autoreview helper refused the requested provider because it did not match operator configuration; configuration was not changed. GitHub’s separate Codex review also completed on this exact head with no findings.
Native owner measurement
The committed
scripts/perf/session-actor-admission-measure.tsreads one actual row from an isolated synthetic Gateway, then measures the production authority projection plus native MessageChannel cloning. The row contains 31,461 serialized bytes.Five alternating AB/BA pairs completed on the fixed PR head: 5,000 operations per arm per pair, 25,000 per arm per mode, after 1,000 warmups per process. Timing is untraced; allocation uses a separate collected-object sampling pass. Both CPU and allocation improved in every pair. This is a small allocation win; CPU is owner-thread sender/receiver cost on a busy Mac, not a whole-Gateway throughput claim.
Paired measurements and host load
Host load is the one-minute load average measured per arm. An earlier incomplete campaign was interrupted by checkout recovery and excluded in full; the table is the fresh five-pair campaign. GC observer output from this short synchronous harness is not a GC acceptance measurement.
The lane's pure-deletion fast path applies: no multi-pair ten-minute Gateway A/A campaign and no whole-Gateway latency claim. The real Gateway run below establishes frequency and attribution. No production Gateway was load-tested.
Refined untyped-message attribution
Baseline built Gateway: 10,800 synthetic sessions, 128 MiB transcripts, 40 enabled plugins, four WebSocket clients, four concurrent mock-provider turns with tools/native subagents, sidebar/list/history/search churn. The refined window was 120.016 seconds, four rounds. Scratch sender instrumentation records field names and call-site stacks, never payload contents, and is not committed. Sizes use V8 serialization and are wire-size estimates, not allocated heap bytes. Ordinary SQLite replies are identified by their separate typed request and omitted from this table.
The actor's complete entry remains necessary for policy checks and dominates its residual payload. Provider prompt/history inputs are consumed by hashing/encoding. Entry-patch and database-admission owners are unchanged. This PR removes only unused fields at the existing actor projection owner; it does not claim to eliminate the larger residual.