Repository navigation
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 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. |
60ba09b to
c94d2fe
Compare
c94d2fe to
141e97e
Compare
141e97e to
9e6a18c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e6a18c84b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9e6a18c to
42820a7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42820a7138
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
42820a7 to
b4c8f3d
Compare
|
Codex review: needs changes before merge. What this changesThis PR moves session-read pacing into the shared preparation owner, preserves asynchronous caller labels, and extends performance tooling. Example: Twelve ready session reads arrive together, with each consumer taking 7 ms.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored draft open; the shared-owner change is useful, but the existing benchmark mode has an introduced capture regression. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherGateway RPCs and session-event publishers pass selected sessions through the prepared-row owner, which combines worker placement facts and private actor snapshots before synchronous authorization and presentation. flowchart TD
A[Gateway RPCs and events] --> B[Shared read budget]
B --> C[Current session selection]
C --> D[Worker placement facts]
C --> E[Private memory actors]
D --> F[Synchronous prepared consumer]
E --> F
F --> G[Response or publication]
Technical reviewBest possible solution: Arm capture through the same handshake in both benchmark modes while retaining one shared runtime pacing owner. Do we have a high-confidence way to reproduce the issue? Source establishes both unpaced ordinary prepared reads on current main and the introduced default-benchmark failure; the reported multi-second production stall remains unreproduced, and no target code was executed during this review. Is this the best way to solve the issue? Moving pacing into the existing preparation owner removes duplicate scheduling, but the benchmark protocol must preserve its existing caller and measurements must establish the performance benefit. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5987a0332d5b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +38, Tests +182, Docs +44, Other +266. Total +530 across 12 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 21, 2026, 7:01 PM ET / 23:01 UTC. |
b4c8f3d to
755e216
Compare
755e216 to
e6b34ce
Compare
Move the event publication budget into the shared prepared-row owner, retain held placement facts through overlapping reads, and retire their reuse on publication. Carry caller attribution across waits without counting async time as synchronous work. Preserve private-session authority and progress across deferred retries.
Use explicit ownership and the main system agent when generating more than one configured agent. The corrected fixture passes the supported config validation boundary.
Acknowledge capture readiness after profiler startup and draining setup events. Persist raw captures and report observed handler counts when completeness fails.
Allow prepared reads to yield before selection while retaining exact shared and draft outcomes. Every response must match the independently observed visibility when published.
Prevent later prepared-row readers from reusing a snapshot invalidated before its source read settles. Cover pending and settled invalidation, and give synthetic roster agents independent canonical stores for benchmark admission.
e6b34ce to
cccbc65
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cccbc6532a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (message?.channel === 'list-rpc-capture' && message.action === 'arm') { | ||
| await waitForDiagnosticEventsDrained(); | ||
| rows = []; rowWork = []; namedStalls = []; callbackStarts = []; | ||
| callbacks = { count: 0, maxMs: 0, overOneSecond: 0 }; | ||
| turns = { count: 0, maxMs: 0, overOneSecond: 0 }; | ||
| hook.enable(); | ||
| process.send({ channel: 'list-rpc-capture', action: 'armed' }); |
There was a problem hiding this comment.
Arm diagnostics in the ordinary benchmark path
When the script runs in its default mode without --prepared-rows, this new explicit arm handler is never invoked—the only list-rpc-capture arm request is inside the prepared-row branch. Consequently rows and rowWork remain undefined when each ordinary CPU profile stops, and the standard reconnect/steady workload always fails its Incomplete diagnostic capture validation instead of producing a report. Restore capture initialization on profile start or send the arm request for ordinary phases as well.
Useful? React with 👍 / 👎.
|
Closing this candidate on its recorded benchmark result. At The underlying latency remains unresolved. A follow-up can use this benchmark as a baseline and measure the synchronous work within a single session-row publication. |
Decision
Do not merge: the candidate fails the v5/v5.2 performance gate. Two valid concurrent, interleaved-CPU pairs, with placement swapped in pair 2, show consistent RPC latency regressions. The mean paired increase is 40.5% in CPU-phase mean latency and 50.1% in heap-phase mean latency. Baselines differ by less than 5× and the deltas have the same sign. These decisive metrics need no third pair; measurement stopped after pair 2.
Problem and change
Ready prepared session-row reads can run back to back without giving I/O a turn. Work after an asynchronous wait also loses its originating stall label. The change moves the existing eight-read/6 ms event-publication budget into the shared prepared-row owner, admits before selection, and removes the event wrapper's prepare/discard/retry loop. It prepares only selected private queries and reuses placement snapshots while their readers retain them, with publication/invalidation retiring reuse coverage, including pending reads.
The stall owner carries code-owned caller identity across awaits and times
session-rows:select,:prepare, and:consumesynchronously. An empty background refresh now renews projection metadata directly without entering an empty worker-read scope. No schema, configuration, TTL, retention, or permission changes. Runtime code is net +41 lines: asynchronous attribution, shared admission, and snapshot/private-custody lifecycle account for the growth; the old event-only scheduler is deleted.The reported 1–3.5 second production stall was not reproduced. A likely cost in this candidate is that the waiter scheduler wakes only one reader per event-loop turn even when the eight-read/6 ms budget has capacity. This is a source-based explanation, not an independently measured causal finding; no unmeasured scheduler revision is included.
Measurement
Baseline
c234ee3561a2ca46b6b847efbb129ffb1e8d46a9; candidatecccbc6532a51bbf38b571519c1153b50d152a801. All 58,816 tracked entries per side matched their Git manifests; both used identical final fixture and measurement scripts. Synthetic fixture per side: 5,000 sessions, 6,000 retained runs, 810 worktrees, and 128 independently stored agents.Each side/phase ran 12 clients × 600 rounds: 7,200 reads, 1,200 per operation (broad/sidebar/compact list, describe, preview, agent roster), plus 60 mutations. Both CPU and heap captures contain all 7,260 handlers with no dropped diagnostic data. Polling was 100 ms, limit 100; CPU/heap starts were aligned. Exclusive slot A used even CPUs 96–126 versus odd CPUs 97–127, swapped for pair 2. Actual cgroups and lock ownership were verified. Both pairs exited 0 with no guard abort; pair 1 recorded one Dirty-page warning. Earlier guard-interrupted attempts are excluded.
Values below are baseline → candidate, with absolute and relative deltas.
Across both pairs/phases, maximum synchronous callback duration was 173.05 → 261.22 ms (n=3,315,728/3,399,674 callbacks). Maximum occupied turn was 281.27 → 263.40 ms (n=104,238/117,910 turns). Callback and occupied-turn counts over one second were 0 → 0 in every phase. These aggregate maxima describe the reproduction; the rejection is based on paired latency above.
Major-GC counts are below 50 per side: CPU pairs 4/8 and 6/23; heap pairs 3/5 and 3/23. Major GC remains context-only. No third pair was spent resolving loop/allocation/promotion ambiguity because consistent latency had already triggered STOP/REJECT.
Roster coverage and live signal
Ordinary
sessions.listrunswithAgentRosterFactsBatchinside the selector admitted by the shared prepared-row owner. The budget bounds consecutive frames, not one synchronous selector. Dirty-membership preflight can evaluate the selector before admission; plugin full-roster, search-preselection, and work-metrics paths also have separate boundaries. The production stacks alone do not identify which caller caused them.The intended new live labels are
gateway:rpc:<method>:session-rows:select|prepare|consume. This candidate is not landed or deployed, so those labels are not a new production signal. Continue watching prepared-row/roster stalls over one second; this fixture did not reproduce them.Proof
Exact-head CI run 39712552684 passed all 60 executed jobs, including
openclaw/ci-gate. Changed-file formatting/lint and independent review through P2 passed. The final two focused files passed 20/20 cases; the empty-refresh regression failed before its owner fix. Earlier ready-burst and pending-snapshot regressions also failed before their fixes. No Testbox lease or production Gateway mutation was used.Earlier review findings about in-flight snapshot invalidation and fixture key bounds were fixed and independently reviewed. The latest rebase preserved the existing seven lane patches, then added the reviewed empty-refresh/test repair. All final measurement source and harness hashes were rechecked unchanged after both pairs.