Repository navigation
fix(swarm): keep collector results reliable through races and restarts - #112989
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 23, 2026 11:07
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(swarm): keep collector results reliable through races and restarts This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Contributor
Author
|
Land-ready verification is complete on head Proof:
The latest ClawSweeper comments are still review-start placeholders and contain no rank-up moves. No proof gaps remain for the changed surfaces. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
openclaw#112989) * fix(swarm): harden collector lifecycle and dashboards * fix(swarm): initialize collector completion state * test(swarm): satisfy cross-environment type checks * test(codex): allow direct request handler calls * style(ui): avoid Swarm widget shadowing * test(swarm): keep internal helpers private * refactor(ui): own Swarm roster helpers in runtime
steipete
added a commit
that referenced
this pull request
Sep 30, 2026
…roval admission (#161469) The exec-approval admission catch matched a plain Error whose message was "gateway is draining for restart". That matched the untyped refusal that runWithGatewayIndependentRootWorkAdmission threw when the check was added in #104172. #112989 changed that producer to GatewayDrainingError, so the instanceof branch already covered it, and #160869 then changed the draining copy, so the string could no longer match anything. No path delivers a draining refusal here without class identity: the admission call passes no AbortSignal, the wrapper and the error class come from the same module, and the callback's spawn and authorization failures are caught inside the admitted run.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 30, 2026
…roval admission (openclaw#161469) The exec-approval admission catch matched a plain Error whose message was "gateway is draining for restart". That matched the untyped refusal that runWithGatewayIndependentRootWorkAdmission threw when the check was added in openclaw#104172. openclaw#112989 changed that producer to GatewayDrainingError, so the instanceof branch already covered it, and openclaw#160869 then changed the draining copy, so the string could no longer match anything. No path delivers a draining refusal here without class identity: the admission call passes no AbortSignal, the wrapper and the error class come from the same module, and the callback's spawn and authorization failures are caught inside the admitted run.
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 a cluster of Swarm reliability issues found during large-group stress testing where collector waits could lose results across cancellation, restart, or delete-mode cleanup; phase and structured-output state could disagree across projections; Codex could time out before a full
agents_waitresult returned; and the Control UI could miss hidden cross-agent workers, retain stale rows, or render unbounded historical dots.Why This Change Was Made
This change makes the collector registry the durable owner of queued launch identity, terminal result capture, wait retention, and restart recovery. It normalizes structured collector success before task/session/hook projections, makes Codex server-request deadlines cancel blocked dispatch, and gives the Control UI a lazy, source-scoped roster hydrator that respects effective per-agent Swarm configuration and caps rendered history while preserving active workers.
The implementation is AI-assisted. I reviewed the complete diff, verified the pinned
@openai/codex0.144.6 app-server request contract directly in sibling Codex source, and ran repeated Codex autoreview passes until no actionable findings remained.User Impact
Large Swarms now remain waitable and accurately represented through launch races, cancellation, Gateway restarts, delete-mode cleanup, and delayed structured completion. Codex can use the full documented wait budget without an outer timeout winning first. Dashboard users see cross-agent workers beyond the ordinary session page, fresh terminal status after hydration, per-agent enablement, bounded retry behavior, and a capped dot display instead of potentially tens of thousands of DOM nodes.
Evidence
+N; Codex timed-out requests cannot dispatch later.tbx_01ky6y6k82sxf7wb65b4b4w4nw, Actions run https://github.com/openclaw/openclaw/actions/runs/29988503135, passed. Control UI startup JavaScript measured 315.0 KiB gzip against the 317.0 KiB limit and 322547 B against the 324608 B baseline ceiling.git diff --checkpassed.tbx_01ky73e12yx619kazdbwvxhv0n, Actions run https://github.com/openclaw/openclaw/actions/runs/29993678176, passed every format, contract, typecheck, lint, cycle, and policy lane.Before — all 301 lifetime dots render and the active worker is buried at the end:
After — the active worker stays first, history caps at 256 rendered dots, and
+45preserves the hidden count: