Skip to content

fix: preserve Swarm progress and simplify owner plumbing - #139269

Merged
steipete merged 1 commit into
mainfrom
codex/swarm-owner-simplify
Sep 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/swarm-owner-simplify

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #139219
Closes #139223

Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.

What Problem This Solves

Fixes issues where dashboard progress disappears after a temporary refresh failure, or never loads in a retained pane whose unqualified session key already has an acknowledged board owner.

Why This Change Was Made

The dashboard keeps its last loaded card beside a compact retry notice. Widgets inherit only a missing agent owner from their own loaded board acknowledgment, preserving the original session key and explicit owner. Retained chat panes wait for accepted history before requesting progress. Participation denial still clears the displayed card.

The accompanying maintainer-requested Swarm cleanup removes browser-only Gateway-version negotiation and its unused presentation plumbing. The Control UI ships with its Gateway; independently upgraded native clients retain their existing capability checks. Qualified progress keys keep their existing key-only RPC shape, and raw targets retain their explicit owner. Collector tests now use the production peek/consume API instead of a global test API, scheduler enqueue reuses its existing reservation/activation parameters, and numeric config bounds share one reader with unchanged defaults and inheritance.

User Impact

Dashboard progress remains readable during temporary failures, Retry restores fresh data, and saved raw-key panes display the correct agent's card. Swarm scheduling, configured limits, cancellation, structured-result retry budgets, and native-client compatibility retain their behavior.

Production LOC: +75/−140 (net −65). Tests: +483/−301 (net +182). Test support: −18. Additional tests exercise failure recovery and ownership; no configuration options, dependencies, database schemas, migrations, or protocol fields change.

Evidence

  • 402 passing tests across 17 selected files: 71 focused Swarm/config/collector cases, 227 lifecycle/restart/cancellation cases, 96 UI component cases, and 8 Chromium browser cases. This is focused coverage, not the full repository suite.
  • Before the repair, the dashboard component and both desktop/mobile browser cases fail after the injected refresh error. Geometry checks also caught the full-height error notice pushing retained content outside the tile; the final tests require the heading inside both the widget and viewport.
  • The retained-pane case restores a saved split layout, observes the raw board.get request, and verifies the acknowledged owner reaches the rendered widget. Its before-repair owner assertion fails; explicit-global and ordinary qualified targets remain distinct, and a pending replacement board does not reuse the old owner.
  • Added structured-output persistence rollback/retry cases and owner replacement while both collector wait entrypoints are parked. Existing SQLite reopen and independent sibling-cancellation coverage passes.
  • Keyless UI localization baseline succeeded. Final local changed checks passed format, boundaries, all typecheck lanes, localization, and declaration/deprecation guards. The duplicate broad dead-export scan was deliberately stopped (exit 143); exact-head PR CI subsequently completed the remaining broad scan and lint gates successfully. Both earlier test-lint findings pass targeted lint after repair.
  • Linux validation caught the required assertion baseline decrease and two test lint errors; all were repaired. Targeted lint and all 127 tests affected by the final corrections pass. Earlier failed receipts are retained separately.
  • Final independent Codex review: scoped-clean through P2 after the request-contract and test-lint corrections. ClawSweeper also reported no findings or pre-merge actions on the same head. Its image retrieval failed; the local capture inspection is separate evidence.
  • Exact-head CI run 33983373718 completed successfully for 2c60be7144521726cceb791c0376ea399ab54b84, including core lint, source contracts, guards, tests, and openclaw/ci-gate. The pre-push rebase preserved the reviewed patch (git range-diff: identical).

Browser proof uses the actual built Control UI and a deterministic mocked Gateway WebSocket; it does not claim a live provider run or a Team deployment. All attached captures were inspected and contain synthetic data only.

Desktop refresh failure

Before After
Before: dashboard progress disappears After: retained progress remains visible beside Retry

Mobile refresh failure

Before After
Before: mobile dashboard loses its progress card After: mobile progress and Retry remain visible

Retained unqualified pane

Before owner repair After
Before: retained raw-key pane cannot display its card After: both panes display the acknowledged owner's progress
Validation commands
node scripts/run-vitest.mjs src/agents/tools/structured-output-tool.test.ts src/agents/tools/swarm-tools.integration.test.ts src/agents/tools/agents-wait-tool.test.ts src/agents/subagents/swarm/swarm-config.test.ts src/agents/subagents/swarm/swarm-scheduler.test.ts src/agents/agent-tools.collector.integration.test.ts
node scripts/run-vitest.mjs src/agents/subagents/registry/subagent-control.concurrency.test.ts src/agents/subagents/registry/subagent-registry.persistence.resume.test.ts src/agents/subagents/registry/subagent-registry-lifecycle.test.ts
node scripts/run-vitest.mjs src/agents/tools/agents-wait-tool.test.ts ui/src/lib/session-progress-cards.test.ts ui/src/components/board/board-widget-cell-plugin.test.ts ui/src/components/session-progress-hovercard-target.test.ts ui/src/pages/chat/chat-pane-identity.test.ts ui/src/pages/chat/chat-pane-progress-history.test.ts ui/src/pages/chat/chat-pane-board.test.ts ui/src/e2e/session-progress-widget.e2e.test.ts ui/src/e2e/session-progress-live-placement.e2e.test.ts
pnpm ui:i18n:baseline
OPENCLAW_TESTBOX=0 node scripts/check-changed.mjs

The listed tests were executed in scoped batches; the first combined run exposed the retained-history guard dependency, which was repaired and rerun. Failure and success receipts remain separate.

Keep loaded dashboard progress beside a compact retry notice, and carry
the acknowledged board owner into retained raw-key widgets. Preserve
qualified-key request semantics while removing browser version negotiation.

Simplify Swarm config and scheduler forwarding, remove the collector global
test API, and strengthen ownership, retry, restart and browser coverage.

Fixes #139219
Fixes #139223
@steipete steipete self-assigned this Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 18:13
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 2:21 PM ET / 18:21 UTC.

ClawSweeper review

What this changes

Preserves dashboard progress during refresh failures, carries acknowledged session ownership into retained panes, and simplifies Swarm configuration, scheduler forwarding, and test support.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: both dashboard defects persist on fetched main. No introduced blocking defect was found, and the compatibility cleanup follows the established Control UI policy.

Priority: P2
Reviewed head: 2c60be7144521726cceb791c0376ea399ab54b84

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused repairs and meaningful boundary coverage support a normal good-quality rating, with no blocking correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository State identifies a MEMBER author, so the external-contributor proof gate does not apply. The body reports built-UI refresh/retry/denial and retained-pane scenarios with linked captures; image retrieval failed here, so visual contents remain independently unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a MEMBER author, so the external-contributor proof gate does not apply. The body reports built-UI refresh/retry/denial and retained-pane scenarios with linked captures; image retrieval failed here, so visual contents remain independently unverified.
Evidence reviewed 11 items Pinned introduction and clean checkout: Reviewed the local base-to-head changes at the host-verified original head. The diff whitespace check passed and git status reported no changes.
Fix remains necessary on fetched main: Fetched main still returns only the error notice after an unavailable refresh. The four central UI owner/store/widget files are unchanged between the pinned base and fetched main; the proposed repairs therefore remain distinct.
Renderer repair uses existing retained state: The widget now renders cached content alongside a compact retry notice. The existing shared store retains cards on temporary errors and sets the card to null for SESSION_PARTICIPATION_REQUIRED, preserving denial behavior.
Findings None None.
Security None None.

How this fits together

The Control UI reads session progress from the Gateway and shares cached cards across dashboards, composers, and hovercards. Session identity determines which card is requested; refresh results determine whether existing content remains visible.

flowchart TD
  A[Saved pane or selected session] --> B[Accepted board or history owner]
  B --> C[Progress card cache]
  C --> D[Gateway session access checks]
  D --> E[Progress response]
  E --> F{Refresh outcome}
  F --> G[Show refreshed or retained card]
  F --> H[Hide card when access denied]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -65, Tests +164, Docs 0, Other 0. Total +99 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 14 75 140 -65
Tests 13 482 318 +164
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 29 559 460 +99

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net −65 lines; tests net +182; test support −18 The repairs reuse existing owners while removing compatibility and test-only plumbing; added coverage targets failure recovery and ownership boundaries.

Root-cause cluster

Relationship: canonical
Canonical: #139269
Summary: This PR owns candidate repairs for two related but distinct dashboard defects.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep progress retention in the shared store, repair dashboard presentation at its renderer, and propagate acknowledged ownership without changing canonical session identity.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes both failures: an unavailable refresh takes the widget’s early error return, and a retained raw-key board omits its acknowledged owner. The supplied reports describe failing browser/component cases; this review did not execute them.

Is this the best way to solve the issue?

Yes. The patch fixes the renderer and owner handoff directly; changing shared retention or rewriting session keys would disturb already-correct sibling behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 64c543a78b7f.

Labels

Label changes:

  • add P2: Repairs bounded dashboard visibility and retained-pane progress defects without evidence of stored data loss or a blocked core workflow.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository State identifies a MEMBER author, so the external-contributor proof gate does not apply. The body reports built-UI refresh/retry/denial and retained-pane scenarios with linked captures; image retrieval failed here, so visual contents remain independently unverified.

Label justifications:

  • P2: Repairs bounded dashboard visibility and retained-pane progress defects without evidence of stored data loss or a blocked core workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Repository State identifies a MEMBER author, so the external-contributor proof gate does not apply. The body reports built-UI refresh/retry/denial and retained-pane scenarios with linked captures; image retrieval failed here, so visual contents remain independently unverified.

Evidence

What I checked:

  • Pinned introduction and clean checkout: Reviewed the local base-to-head changes at the host-verified original head. The diff whitespace check passed and git status reported no changes. (2c60be714452)
  • Fix remains necessary on fetched main: Fetched main still returns only the error notice after an unavailable refresh. The four central UI owner/store/widget files are unchanged between the pinned base and fetched main; the proposed repairs therefore remain distinct. (ui/src/lib/board/widgets/session-progress.ts:84, 64c543a78b7f)
  • Renderer repair uses existing retained state: The widget now renders cached content alongside a compact retry notice. The existing shared store retains cards on temporary errors and sets the card to null for SESSION_PARTICIPATION_REQUIRED, preserving denial behavior. (ui/src/lib/board/widgets/session-progress.ts:62, 2c60be714452)
  • Owner propagation and lifecycle boundary: renderBoardPanel fills only a missing agent owner after its provider has loaded a snapshot. The original session key remains intact. The provider retires replacement-client snapshots, and retained composer progress uses accepted history fenced by client, connection epoch, session key, and session ID. (ui/src/pages/chat/chat-pane-board.ts:308, 2c60be714452)
  • Request and authorization contracts: Qualified progress requests preserve their key-only shape; canonical global and unknown targets retain explicit ownership. Gateway handlers resolve the requested owner and assert current session authorization immediately before storage access. These are OpenClaw-owned paths, with no affirmative dependency on the Codex harness or protocol. (src/gateway/server-methods/progress-card.ts:61, 2c60be714452)
  • Intentional browser coupling; native compatibility preserved: The fully read UI guide explicitly prohibits Gateway-version compatibility in the bundled browser UI. The updated documentation matches that policy. The macOS transport still checks owner-scope capability before sending agentId; native request construction remains unchanged. (ui/AGENTS.md, 2c60be714452)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready review completed for 2c60be7144521726cceb791c0376ea399ab54b84. CI run 33983373718 is green, including broad lint/source-contract gates. The PR body contains the commands, 402-test breakdown, inspected before/after captures, and the deliberately interrupted duplicate local scan; that scan is not represented as passing.

The final independent P2 review is clean. I read the latest ClawSweeper review: no findings, no pre-merge actions, and no Rank-up moves were listed. Its image download failed; I separately inspected all 13 latest dashboard captures and the six attached before/after images. Browser proof uses the built UI with a mocked Gateway, with no live-provider or Team-deployment claim. Proceeding through native preparation and merge.

@steipete
steipete merged commit 652d103 into main Sep 5, 2026
265 checks passed
@steipete
steipete deleted the codex/swarm-owner-simplify branch September 5, 2026 18:29
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 5, 2026
* commit '911d7d5b0c107f7274f2415ca9655dcc6105f0e8': (867 commits)
  fix(skills): deliver pending Workshop approval controls (#139248)
  fix(gateway): deliver loopback ask_user prompts to the originating channel (#138831)
  docs: keep root agent instructions focused on repository policy (#139258)
  fix(matrix): exclude archived state roots from scans and selection (#112329)
  perf(agents): prepare exact tool names once per catalog batch (#139267)
  fix: preserve Swarm progress and simplify owner plumbing (#139269)
  fix(tailscale): release claims after gateway process-group exit (#139261)
  refactor(cli): simplify lazy command registration (#139108)
  test(ui): retain synthetic widget failure evidence (#139229)
  fix(buzz): keep implicit replies at thread root (#138879)
  test(diagnostics): await graceful Gateway shutdown before cleanup (#139247)
  fix(ci): unblock releases with different tooling package managers (#139259)
  feat(ui): add social preview links for private sessions (#139250)
  fix(codex): retain failed conversations for guarded continuation (#139246)
  chore(ui): refresh control ui locales (#139200)
  fix(ci): run browser checks for real-gateway inputs (#139256)
  fix(llama-cpp): reconcile managed router state before requests (#136363)
  chore(i18n): refresh native locales (#139237)
  refactor(worker): unify inference payload handling (#139245)
  refactor(terminal): replay wrapped prefixes in one pass (#139240)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…9269)

Keep loaded dashboard progress beside a compact retry notice, and carry
the acknowledged board owner into retained raw-key widgets. Preserve
qualified-key request semantics while removing browser version negotiation.

Simplify Swarm config and scheduler forwarding, remove the collector global
test API, and strengthen ownership, retry, restart and browser coverage.

Fixes openclaw#139219
Fixes openclaw#139223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Retained dashboard panes lose the acknowledged progress owner [Bug]: Dashboard progress card disappears after a temporary refresh failure

1 participant