Skip to content

refactor: simplify update state and test setup - #147993

Merged
steipete merged 11 commits into
mainfrom
codex/deslop-update-status-feedback
Sep 14, 2026
Merged

steipete merged 11 commits into
mainfrom
codex/deslop-update-status-feedback

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The update dialog and its tests carry overlapping state and repeated setup left by #147883.

User Impact

No intended product behavior or appearance change. Update feedback, stale-response handling, retry confirmation, disconnect handling, and the early disk warning remain covered.

Why This Change Was Made

Use one dialog request state and the existing progress snapshot. Remove redundant test waits and an assertion, reuse the shared appearance server, and give saved and live cloud replies consistent producer metadata. Five files, 59 lines removed overall.

Related: #147883. Main's update-check warnings and shared cloud history remain intact. Earlier qualification repairs landed in #148425 and #148444; neither is duplicated here. The later main-only registry regression from #148451 is tracked separately by #148493.

Evidence

  • All 79 update-dialog, campaign, helper, and interlock cases pass after integrating the update-check warning changes. Earlier proof covered 64 selected update/UI/disk cases; cloud and appearance E2Es pass 2/2 after the shared-history integration.
  • Focused changed checks, types, lint, formatting, and independent P2 reviews pass. The final five-file patch matches the reviewed patch after mechanical main integration.
  • The final CI planner generates 51 jobs with exactly one canonical and planned wizard recovery entry. Main's Custodian repair passes 50 lifecycle/sibling cases; 68 routing/ownership cases also passed during qualification.
  • Original visual and published-updater proof remains in fix(update): show status refresh feedback and earlier disk warnings #147883; fix(update): check snapshot capacity before staging #147908 supplies snapshot-capacity preflight.

Current-head CI passed, including all UI/browser and Node suites. GitHub reports 116 successful checks and no pending or failed checks. ClawSweeper also reviewed this exact head without actionable findings. The previous run failed only in plugin runtime inspection, where a valid-config fixture intermittently produced an invalid-config reply; all other jobs passed. That separate failure did not recur in the current full CI run; its cause remains under investigation. Passing standalone and Linux replays did not establish a cause, and this PR adds no speculative plugin repair. Failed or canceled runs are not passing gates.

@clawsweeper

clawsweeper Bot commented Sep 14, 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 app: web-ui App: web-ui cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@steipete
steipete marked this pull request as ready for review September 14, 2026 06:19
@steipete steipete self-assigned this Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 3:15 PM ET / 19:15 UTC (Revision 15).

ClawSweeper review

What this changes

Simplifies the update dialog’s temporary state, reuses shared browser-test setup, and removes redundant waits and assertions while aligning cloud reply fixtures.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a coherent, maintainer-owned cleanup with no actionable correctness findings. The remaining simplification is not already on main, and the related merged repairs do not supersede it.

Priority: P3
Reviewed head: 39dcad2aaa7baefe9ecde55373350f9c36f325cc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A sound, bounded cleanup with retained behavioral coverage and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored refactor is exempt from the external-contributor proof gate and introduces no authority change. Earlier dialog screenshots and published-updater qualification remain supporting context; the current body reports focused regression and browser coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored refactor is exempt from the external-contributor proof gate and introduces no authority change. Earlier dialog screenshots and published-updater qualification remain supporting context; the current body reports focused regression and browser coverage.
Evidence reviewed 9 items Pinned production change: The introduced production delta consolidates presentation state without changing request APIs, persisted state, update execution, or authorization. The progress watcher updates its snapshot before invoking the dialog listener.
Request ownership remains intact: The existing refresh controller checks request generation, connection epoch, and revision before applying responses; the dialog still consumes its boolean result.
Meaningful disk-warning assertion retained: The retained assertion checks console output and the recorded warning at target lookup, proving earlier delivery more precisely than the removed end-of-test assertion.
Findings None None.
Security None None.

How this fits together

The Control UI update dialog receives operator actions and Gateway progress snapshots, then displays confirmation, progress, and recovery feedback. The update controller continues to own requests and reject stale responses.

flowchart LR
  A[Operator update action] --> B[Update dialog]
  B --> C[Update controller]
  C --> D[Gateway update requests]
  D --> E[Progress snapshot]
  E --> B
  B --> F[Progress and recovery feedback]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -12, Tests -47. Total -59 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 1 32 44 -12
Tests 4 29 76 -47
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 61 120 -59

Review metrics

Metric Value Why it matters
Production versus test simplification production −12 net lines; tests −47 net lines The cleanup reduces both state bookkeeping and duplicated test setup without adding a production seam.

Technical review

Best possible solution:

Keep one dialog request state and derive connection and read-error feedback from the existing progress snapshot, preserving the controller’s request ownership.

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

Not applicable: this PR proposes behavior-preserving cleanup rather than a new bug fix. Source and retained assertions were inspected; no tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes: reusing the progress snapshot and shared browser fixture removes duplicate ownership while preserving the existing observable contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a bounded internal cleanup with no intended product behavior change.
  • 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: The maintainer-authored refactor is exempt from the external-contributor proof gate and introduces no authority change. Earlier dialog screenshots and published-updater qualification remain supporting context; the current body reports focused regression and browser coverage.

Evidence

What I checked:

  • Pinned production change: The introduced production delta consolidates presentation state without changing request APIs, persisted state, update execution, or authorization. The progress watcher updates its snapshot before invoking the dialog listener. (ui/src/app/update-confirmation.runtime.ts:102, 39dcad2aaa7b)
  • Request ownership remains intact: The existing refresh controller checks request generation, connection epoch, and revision before applying responses; the dialog still consumes its boolean result. (ui/src/app/update-overlay-helpers.ts:207, 39dcad2aaa7b)
  • Meaningful disk-warning assertion retained: The retained assertion checks console output and the recorded warning at target lookup, proving earlier delivery more precisely than the removed end-of-test assertion. (src/cli/update-cli.test.ts:7777, 39dcad2aaa7b)
  • Dialog coverage preserved: The full test module retains saved and newly started runs, pending-request deduplication, refresh success and failure, disconnect recovery, scoped-row retirement, and native fallback coverage. Removed waits follow the awaited controller operation. (ui/src/app/update-confirmation.runtime.test.ts:477, 39dcad2aaa7b)
  • Shared browser fixture contract: The appearance test uses the existing bundled-server and mock-Gateway owners, retaining visible selection, computed accent, reset, and local-storage assertions. Cloud history and live events now share reply sequence and producer run identity. (ui/src/e2e/appearance-accent-selection.e2e.test.ts:24, 39dcad2aaa7b)
  • Review continuity: The five remaining files are unchanged from the previous reviewed revision. Its completed projection contains no findings; the separately merged wizard and Custodian repairs are absent from the current introduced delta. (39dcad2aaa7b)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

History

Review history (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-14T12:21:17.547Z sha 69a1a70 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T13:40:26.828Z sha 8c949de :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T16:00:46.555Z sha 4e2a8c9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T16:48:45.147Z sha 4e2a8c9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T17:19:24.068Z sha d608869 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T18:04:40.161Z sha ffa85af :: blocked before merge. :: none
  • reviewed 2026-09-14T18:19:05.299Z sha a5b7e4d :: needs maintainer review before merge. :: none
  • reviewed 2026-09-14T18:43:51.035Z sha 8ca157d :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/deslop-update-status-feedback branch from b1035cc to 9ce92d5 Compare September 14, 2026 08:09
@steipete steipete changed the title refactor(update): consolidate status check state refactor(ui): remove duplicate update state and test setup Sep 14, 2026
@steipete
steipete force-pushed the codex/deslop-update-status-feedback branch from efca502 to e2e9a07 Compare September 14, 2026 11:05
Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in #147883.
Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway.
@steipete
steipete force-pushed the codex/deslop-update-status-feedback branch from 69a1a70 to 8c949de Compare September 14, 2026 13:20
@steipete steipete closed this Sep 14, 2026
@steipete steipete reopened this Sep 14, 2026
Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply.
Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration.
@steipete steipete changed the title refactor(ui): remove duplicate update state and test setup refactor: simplify update state and test setup Sep 14, 2026
@steipete steipete closed this Sep 14, 2026
@steipete steipete reopened this Sep 14, 2026
@steipete steipete closed this Sep 14, 2026
@steipete steipete reopened this Sep 14, 2026
Main now routes wizard recovery through the database forks and excludes it
from the wizard thread pool (#148337). Remove this PR's duplicate changes
so the final merged list contains the test exactly once.
Resolve the shared cloud reply fixture overlap with #147684. Keep main's
history fixture and the producer run ID and sequence in the live event.
Main continues to own the wizard routing fix from #148337.
The independent routing additions in #148337 and #147684 registered the
same test twice and stopped CI shard planning. Retain the canonical entry
after setup.test.ts and remove the duplicate before it.
Preserve main's separate check warnings, recorded update failure, and
successful-recovery assertions while retaining the simpler dialog state
and awaited-request test cleanup. Keep one wizard recovery registration.
Choose Twitch through the current two-option button instead of the retired
radio and Continue controls. Preserve the typed answer, single session
rotation, and no-replay assertions after the UI change in #148300.
@steipete
steipete merged commit 70219e2 into main Sep 14, 2026
165 of 166 checks passed
@steipete
steipete deleted the codex/deslop-update-status-feedback branch September 14, 2026 19:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
* refactor(update): consolidate status check state

Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in openclaw#147883.

* test(ui): reuse shared server for accent selection

Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway.

* test(ui): keep cloud recovery history consistent

Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply.

* test(wizard): run recovery integration in the broker host

Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration.

* chore(test): drop routing changes already landed on main

Main now routes wizard recovery through the database forks and excludes it
from the wizard thread pool (openclaw#148337). Remove this PR's duplicate changes
so the final merged list contains the test exactly once.

* fix(test): remove duplicate wizard recovery registration

The independent routing additions in openclaw#148337 and openclaw#147684 registered the
same test twice and stopped CI shard planning. Retain the canonical entry
after setup.test.ts and remove the duplicate before it.

* test(custodian): follow immediate wizard choices

Choose Twitch through the current two-option button instead of the retired
radio and Continue controls. Preserve the typed answer, single session
rotation, and no-replay assertions after the UI change in openclaw#148300.
steipete added a commit that referenced this pull request Sep 15, 2026
Release CLI progress resources even when the final run-history read fails.
Use the report owner's identity classification for version badges, so missing
evidence is unverified while observed version/build mismatches still fail.
Keep updater execution and recorded outcomes unchanged.

Remove copied test translations, redundant coverage and guards, unnecessary
type assertions, and comment repetition. Preserve real localization,
connection ownership, recovery, and receipt contracts.

Validation: both regressions fail before and pass after; 202 selected tests
pass with current pinned dependencies; independent P2 review is clean.
Synthetic before/after UI proof makes no update requests.

Related: #147993, #147553.
steipete added a commit that referenced this pull request Sep 15, 2026
* fix(update): stop stuck spinners and show unverified identity

Release CLI progress resources even when the final run-history read fails.
Use the report owner's identity classification for version badges, so missing
evidence is unverified while observed version/build mismatches still fail.
Keep updater execution and recorded outcomes unchanged.

Remove copied test translations, redundant coverage and guards, unnecessary
type assertions, and comment repetition. Preserve real localization,
connection ownership, recovery, and receipt contracts.

Validation: both regressions fail before and pass after; 202 selected tests
pass with current pinned dependencies; independent P2 review is clean.
Synthetic before/after UI proof makes no update requests.

Related: #147993, #147553.

* test(update): record installed version in coalesced restart fixture

* fix(models): await saved API key configuration

Wait for the existing Gateway configuration application receipt before refreshing saved credentials. Preserve reload policy, concurrent credential guards, and saved-but-unconfirmed warnings in the CLI and Models RPC.

* ci: keep combined test partitions within capacity

Return heartbeat test roots to infrastructure after independent main-branch rebalances jointly overfilled services. Preserve all 10,601 canonical roots, graph limits and runtime routing.

* test(qa): align automation management ownership proof

Adopt the configured-owner fixture repair from #148769 (508ad6e). Preserve the actual non-owner denial boundary, unchanged job and run state, creator policy, and Control UI management lifecycle. Keep session_status available in the fixture so a non-owner reaches the provider after owner-only automations are removed.

Co-authored-by: Vincent Koc <[email protected]>

---------

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
* fix(update): stop stuck spinners and show unverified identity

Release CLI progress resources even when the final run-history read fails.
Use the report owner's identity classification for version badges, so missing
evidence is unverified while observed version/build mismatches still fail.
Keep updater execution and recorded outcomes unchanged.

Remove copied test translations, redundant coverage and guards, unnecessary
type assertions, and comment repetition. Preserve real localization,
connection ownership, recovery, and receipt contracts.

Validation: both regressions fail before and pass after; 202 selected tests
pass with current pinned dependencies; independent P2 review is clean.
Synthetic before/after UI proof makes no update requests.

Related: openclaw#147993, openclaw#147553.

* test(update): record installed version in coalesced restart fixture

* fix(models): await saved API key configuration

Wait for the existing Gateway configuration application receipt before refreshing saved credentials. Preserve reload policy, concurrent credential guards, and saved-but-unconfirmed warnings in the CLI and Models RPC.

* ci: keep combined test partitions within capacity

Return heartbeat test roots to infrastructure after independent main-branch rebalances jointly overfilled services. Preserve all 10,601 canonical roots, graph limits and runtime routing.

* test(qa): align automation management ownership proof

Adopt the configured-owner fixture repair from openclaw#148769 (508ad6e). Preserve the actual non-owner denial boundary, unchanged job and run state, creator policy, and Control UI management lifecycle. Keep session_status available in the fixture so a non-owner reaches the provider after owner-only automations are removed.

Co-authored-by: Vincent Koc <[email protected]>

---------

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui cli CLI command changes maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant