Repository navigation
fix(codex): keep completed nodes from blocking catalog refreshes - #149396
Conversation
Use actual node publication completion to decide when a local filled-page scan can yield to queued catalog requests. Preserve in-flight invocation and publication ownership beyond the fail-soft response, failed discovery, independent local progress, and completed-result behavior. Related: #149030
|
🦞👀 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 15, 2026, 9:50 PM ET / September 16, 2026, 01:50 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR lets Codex catalog scans yield between local pages once node work finishes, while retaining unfinished invocations and publications, and adds regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still prevents handoff after selected nodes finish. No blocking correctness or security findings remain, and the recorded production-path proof supports the scheduling change. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin combines local and paired-node session listings for OpenClaw’s session catalog. Its resumable scan shares the Gateway’s admission queue with other catalog requests, so its handoff decisions affect when other sources become visible. flowchart TD
A[Catalog requests] --> B[Gateway admission queue]
B --> C[Codex catalog scan]
C --> D[Local session pages]
C --> E[Node results and publications]
D --> F{Remaining work and nodes settled?}
E --> F
F -->|More pages and settled| B
F -->|List complete| G[Catalog response]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +25, Tests +216. Total +241 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the existing admission and publication owners, allowing intermediate handoff when node work has actually settled rather than when the node result list is empty. Do we have a high-confidence way to reproduce the issue? Yes, from source: a completed terminal-only or offline node leaves a nonempty host list, causing current main to refill local pages without yielding. Registered-provider regressions cover that trigger; this review did not execute them. Is this the best way to solve the issue? Yes. Tracking existing publication completion is a narrow repair that preserves native page atomicity, late-result ownership, failure handling, and the established response deadline. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fc1cadae3286. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Merged via squash.
|
…nclaw#149396) Use actual node publication completion to decide when a local filled-page scan can yield to queued catalog requests. Preserve in-flight invocation and publication ownership beyond the fail-soft response, failed discovery, independent local progress, and completed-result behavior. Related: openclaw#149030
Related: #149030.
What Problem This Solves
Fixes unrelated catalog refreshes waiting behind a local Codex multi-page scan when selected nodes have already finished, including a connected node that only offers terminal access.
User Impact
Waiting session sources get a turn between completed local pages, so a completed node placeholder no longer delays their appearance.
Why This Change Was Made
The list driver used the number of returned node hosts to decide whether it could yield. A terminal-only or offline host can remain in the result after its work is done. The driver now tracks the existing node publication completions, which include invocation and any late publication beyond the eight-second foreground timeout. Failed discovery and local failures remain conservative, and fully completed lists still return at the existing response deadline. The tracker lives outside the driver's request scope so late callbacks do not retain that scope.
Evidence
The current head is
62ee0ffd194977be7b88b1d984a2f4151e518ec9, a signed main sync with the same two-file fix. CI for this head passed. Its focused CI-watcher suite passed all 189 tests, including the newly incorporated run-status revalidation case. The completed 69 tests, changed-file checks, and green CI below are for3aeac3a414b88cb143d346f193ad30012aed9181; the accepted remote proof is ford627e87963e5460555995e19eed5d90b0b2901b3. Both remain ancestors of the current head.3aeac3a414b88cb143d346f193ad30012aed9181, all 69 focused tests across the driver, node-listing, source-backoff, and catalog-client-lifetime suites pass. These include held invocation/publication beyond the eight-second foreground deadline (using fake timers), publication rejection, final-result timing, source recovery, request authority, sibling progress, and closure.3aeac3a414b88cb143d346f193ad30012aed9181in a physical checkout outside ancestor dependency installations. The initial nested-checkout declaration guard refusal is retained; it was resolved by the isolated checkout without changing code or weakening the guard. Independent source review is clean through P2 for the unchanged fix. Original-head CI passed ford627e87963e5460555995e19eed5d90b0b2901b3; CI for3aeac3a414b88cb143d346f193ad30012aed9181passed.d627e87963e5460555995e19eed5d90b0b2901b3using Blacksmith Testbox run 35040351339. Four original Codex holders occupied the existing admission capacity when the real browser's fifth request queued. An original incomplete step settled at event 205; the browser's healthy provider started at 207, before the second physicalthread/listsend at 235. The browser received its fast-host progress at 237, before page two was released at 239. Request, handler, provider, progress, and queue identities were independently joined. The Testbox hosting workflow’s cancelled final state is separate from the successful application and launcher receipts.This remote result uses a real Gateway, WebSocket, Control UI, and Chromium with a synthetic App Server peer and terminal-only node roster. It is one candidate scheduling proof, without a matched remote baseline, real-node pairing, native-binary CPU, or production latency evidence. It does not establish that wider production stalls are eliminated. The target catalog RPC completed successfully; 46 of 47 observed browser RPCs had successful receipts, while one ancillary
sessions.branches.listremained pending when context closure began. No completion is claimed for that ancillary request. Full state and raw capability metadata remain private.