Skip to content

feat(update): keep progress and reports across restarts - #138737

Merged
steipete merged 13 commits into
mainfrom
steipete/update-run-surfaces
Sep 5, 2026
Merged

steipete merged 13 commits into
mainfrom
steipete/update-run-surfaces

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Update progress and completion reports can disappear when the Gateway restarts, leaving Control UI, chat, and CLI users with different accounts of the same update. Internal sessions also need a durable final report without an unnecessary model turn.

Related: #124396 (transactional update flow), #137580 (extended update outage). Parent #138690 is now merged as 2bf30bac7b5cc815b3d628fd90d6d5f951fd78fe; C is rebased onto main without replaying A. PR A owns durable run history and the shared report; transactional activation and inference repair remain separate campaign work.

Why This Change Was Made

The Gateway ledger owns update identity, phases, and outcomes. Control UI resumes that record after reconnect, shares one phase/details/verification view between the dialog and Settings, and retains terminal reports. Browser storage holds acknowledgment and triage receipts only. The browser verifier, inferred-success flow, success toast, and obsolete reload helper are removed; native Mac controls are preserved.

Chat uses stable per-run delivery identities for acknowledgment, activation, verification, and the final report, with a shared destination resolver for external delivery custody and idempotent internal transcript appends. CLI progress follows recorded phases and flushes before the shared final report; JSON includes the durable row. Unused Repairing stays hidden until entered.

This continuation replaces the main merge with a linear stack, first on rewritten A and then on main after A landed. The unrelated iOS history-request test commit is dropped: neither of the two reported failing jobs executes Swift, and there was no exact-head evidence requiring it. The CLI expectDefined context fix is retained after reproducing TS2554. The gallery timeout was reproduced as missing route-level sessions.resolve metadata after chat.startup; its diagnostics-only edit was discarded. Main's #138793 independently fixed that fixture before the final rebase, so C keeps main's typed resolution/shared page-lifecycle implementation and cold-route reload coverage rather than carrying a duplicate patch.

Two additional ordering repairs are included. The pre-park callback records activation before awaiting its notice; waiting for a phase recorded only after park skipped the notice. A retained terminal UI row now releases only its own campaign's stale applying metadata, never a newer campaign's install interlock. New campaign admission retires queued old diagnostics without discarding a manual terminal failure waiting for its request lock to release.

The refreshed ClawSweeper review also found that retrying a retained failed or skipped sidebar report bypassed native Mac ownership. That entry point now reads the same live native bridge as the normal sidebar action. The existing browser ownership scenario covers fresh updates and both retained outcomes, including exactly one native start message, no premature Gateway mutation, and exactly one Gateway handoff if the native owner declines.

User Impact

Operators can follow an update across a restart, inspect its result after reopening Control UI, and receive a durable final report in its originating session. Failed updates keep recovery actions visible. C adds no dependency, configuration option, database schema, or protocol version beyond its parent.

Evidence

Final-head local proof at 0847f56ccf74b3aa9edfb63699df1632705e63f8: 702 targeted tests passed—535 Gateway/CLI/helper tests across seven files, 134 overlay/triage tests across seven files, 31 mocked browser scenarios across seven files, and two built-CLI process previews. The process previews preserve malformed/migration-pending config and state while checking matching durable run identities and terminal dry-run reports. The full pnpm check:changed passed, including every core-test typecheck shard. pnpm build passed with UI included (346,300 B startup JavaScript gzip against the unchanged 350,953 B limit), with no ineffective dynamic-import warning. Independent Codex autoreview of the complete staged candidate against pinned main a44ab9a58fe5113a72c2e4d0344d1a03c8ba59bf is P0/P1 scoped-clean. All proof was rerun after A's squash merge and C's final rebase, then rerun for the native-retry repair. Prior head 838309172d83dc9ac3513341920ef2bb64aca79f passed exact-head CI in run 33942741164, including both originally failing checks and without the unrelated iOS commit. Final exact-head CI also passed in run 33946418237: the required watcher exited 0 with SUCCESS, zero pending checks, and GREEN. No CI job rerun was needed for the final head; intermittent GitHub metadata-read failures only delayed observation.

The reproduced regressions cover the original missing TypeScript argument and gallery timeout, pre-park notice ordering/deduplication, newer campaign interlock and stale diagnostic admission, manual terminal-failure presentation, and native-owned sidebar retries. With the native repair removed, the fresh-update case passes while failed/skipped retries show “Update Gateway” instead of “Update Mac app + Gateway”; all three pass after the one-line owner-routing repair. The final overlay/confirmation suites pass 117 tests and triage runtime passes 17. The seven-file mocked Control UI matrix passes all 31 scenarios with exact assertions retained. Native proof reaches the browser-to-Mac message boundary and decline handoff; it is not an actual Sparkle installation.

C-only LOC versus pinned main: production/tooling +1,727/−1,513 (+214); tests/support +2,468/−3,316 (−848); docs +70/−16. The continuation repairs themselves are net-neutral production (+10/−10), including the native retry's +1/−1. Feature growth supplies the shared report/phase view and durable notice routing while removing browser execution-state inference and duplicate output/destination paths. Schema extraction is a move, not an added database schema. The behavior-neutral deslop audit found no further cleanup worth changing; the same-campaign fixture correction belongs to the interlock repair.

The two-tab dashboard request-count flake recurred during native-fix validation: dashboard demand stayed at two requests, but one additional non-dashboard sessions.list appeared. The counter calls all non-dashboard requests “canonical,” so this alone does not establish duplicate roster demand. An isolated diagnostic run, a diagnostic matrix, and the final exact-source seven-file matrix subsequently passed. Its precise request owner remains unproven; no speculative production fix, relaxed assertion, or diagnostics-only patch is included. Named follow-up: capture the extra request's parameters and tab, then attribute it to canonical refresh or an independent session query before repairing ownership or startup synchronization.

Review Follow-through and Remaining Blockers

The four-message documentation qualifies standalone managed systemd/launchd updates, where intermediate notices depend on restart timing. Before-park notice delivery is covered at the actual callback ordering boundary, without claiming universal timing for watchdog/EOF paths.

The ClawSweeper interruption-recovery finding remains a pre-landing blocker: a killed CLI updater can leave a running row that keeps update/config controls busy after reconnect. Safe recovery needs an accepted run-owned claim and helper-to-updater transfer/reconciliation design in the ledger/orchestrator owners. A helper may die while its updater survives; an age cutoff or helper-PID-only workaround would be unsafe. No unapproved persistent-store design is added here.

The standalone CLI-to-idle-Gateway watcher discovery finding also remains open. Current local watcher tests do not prove cross-process admission/completion notifications without a Gateway restart. Both corresponding Rank-up moves are explicitly deferred to their owners, not claimed resolved. The third Rank-up move, native routing for retained sidebar retries, is addressed with red/green browser proof. A has landed, but the two pre-landing owner tasks remain; green CI and P1-scoped autoreview do not supersede these broader review blockers. This PR is not being merged by this continuation.

Earlier Campaign Proof

Campaign proof, not rerun on this recut branch: AWS proof run 9 at 8a4db45aff48f6fc7b44add16e5756505450e26f recorded all seven scenarios on September 4, 2026: healthy preflight/dry-run; successful update (32.626 s downtime); internal webchat with exactly one transcript report (32.074 s); already-current skip; poisoned-package staging failure; candidate-canary verification failure; rollback to the previous running version (32.369 s).

This is integrated campaign evidence, not proof that standalone C already provides the complete live managed-install four-message timing flow.

Inspected synthetic Control UI screenshots

These existing captures show the update-flow states; the continuation retains their view and adds ordering/interlock coverage.

Before confirmation After successful update
Before confirmation After successful update

Staging, with unused Repairing hidden
Retained dialog through restart
Repairing after entry
Reopened Settings report

@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: android App: android app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations plugin: workboard size: XL maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete marked this pull request as ready for review September 5, 2026 00:48
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 5, 2026, 1:48 AM ET / 05:48 UTC.

ClawSweeper review

What this changes

The PR gives chat, CLI, and Control UI a shared update progress view and retained reports that survive Gateway restarts.

Merge readiness

⛔ Blocked before merge - 8 items remain

Keep open: the native retry finding is resolved, but both acknowledged lifecycle blockers remain. Current main contains the ledger foundation, not this PR’s complete UI and notification behavior.

Priority: P2
Reviewed head: 0847f56ccf74b3aa9edfb63699df1632705e63f8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Coherent shared-owner implementation and a resolved native retry defect, with two acknowledged lifecycle blockers still open.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored exemption applies. Supplied CLI previews cover durable JSON reports, and browser tests cover retained views and native handoff; earlier AWS campaign evidence does not establish final-head interruption recovery or idle-Gateway discovery.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored exemption applies. Supplied CLI previews cover durable JSON reports, and browser tests cover retained views and native handoff; earlier AWS campaign evidence does not establish final-head interruption recovery or idle-Gateway discovery.
Evidence reviewed 12 items Introduced scope: Inspected the pinned merge-base-to-head delta. The supplied test merge is stale, so no claim here attributes current-main drift to this PR.
Persistent UI interlock: The new projection treats every running ledger row as busy. The existing bootstrap consumer suspends configuration writes from these flags at ui/src/app/bootstrap.ts:295.
Interrupted-writer ownership gap: CLI admission creates a running row; terminalization requires a subsequent explicit write. The ledger has no writer-liveness reconciliation, and restart recovery returns immediately when no sentinel exists.
Findings 2 actionable findings [P2] Reconcile interrupted runs before using them as a persistent UI lock
[P2] Wake the Gateway watcher for standalone CLI admissions
Security None None.

How this fits together

Update requests enter through chat, the CLI, or Control UI and write progress to a shared SQLite ledger. The Gateway observes those records to notify conversations and refresh browser controls after restart.

flowchart LR
  A[Chat or Control UI request] --> C[Update orchestrator]
  B[Standalone CLI update] --> C
  C --> D[Durable run ledger]
  C --> E[Gateway restart]
  E --> F[Gateway watcher and recovery]
  D --> F
  F --> G[Chat notices and retained UI reports]
Loading

Decision needed

Question Recommendation
Should the run-owned writer-transfer and interruption-recovery prerequisite be implemented here, or should this PR wait for the update campaign to provide it? Approve owner-level recovery here: Accept a ledger/orchestrator claim-transfer design, then complete interruption recovery and cross-process discovery before landing these surfaces.

Why: The remaining repair changes persistent lifecycle ownership; the discussion explicitly leaves that design unaccepted, and a surviving detached updater makes heuristic cleanup unsafe.

Before merge

  • Reconcile interrupted runs before using them as a persistent UI lock (P2) - If a standalone CLI updater dies after admission but before publishing a restart sentinel, its ledger row remains running. These new flags restore that row as a permanent interlock, and bootstrap.ts:295 suspends configuration writes after reconnect or reload. Neither the watcher deadline nor sentinel recovery terminalizes that case. The previously reported blocker remains: reconcile through the ledger/orchestrator owner while preserving any surviving detached updater’s claim.
  • Wake the Gateway watcher for standalone CLI admissions (P2) - The new live run view depends on update.run.changed, but this watcher stops scheduling reads when no run exists. A subsequently launched CLI writes SQLite without waking the Gateway’s process-local callback. With no campaign or Gateway restart, the connected UI misses admission and completion; a manually loaded running row also receives no terminal event. The earlier discovery blocker remains: connect standalone admission to a Gateway-owned cross-process discovery path and cover the idle-to-running-to-finished sequence.
  • Resolve merge risk (P1) - An existing orphaned running row can become a persistent configuration/update interlock when the new UI loads; upgrade recovery remains unresolved.
  • Resolve merge risk (P1) - Safe reconciliation must distinguish a dead initiating process from a surviving detached updater, so helper-PID or elapsed-time inference could permit overlapping updates.
  • Complete next step (P2) - Accept the lifecycle recovery contract, resolve both retained findings, and establish interruption and idle-Gateway discovery evidence before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Reconcile interrupted runs before using them as a persistent UI lock — ui/src/app/overlays-updates.ts:161-163
  • [P2] Wake the Gateway watcher for standalone CLI admissions — src/gateway/update-run-watcher.ts:34-37
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth Production +214 net; tests/support −848 net; schema extraction is a move Feature growth adds the shared view and notice routing while removing browser inference and duplicate paths.
Public update output 1 additive JSON field: run; 0 new configuration options CLI consumers gain the durable record without another operator policy knob.

Stored data model

Persistent data-model change detected: database schema: src/infra/update-run-schema.ts, migration/backfill/repair: src/cli/update-cli/progress.ts, migration/backfill/repair: ui/src/test-helpers/update-run.ts, serialized state: src/gateway/update-run-summary.ts, serialized state: ui/src/app/update-run-receipts.ts, serialized state: ui/src/components/sidebar-attention-store.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete recovery at the ledger owner (recommended)
    Approve and implement writer reconciliation, then verify fresh and pre-existing interrupted rows without invalidating a surviving updater.
  2. Pause behind lifecycle prerequisites
    Retain the contribution while the campaign supplies interruption recovery and idle-Gateway discovery.

Technical review

Best possible solution:

Keep the ledger as the single outcome owner, with accepted writer-transfer reconciliation, cross-process discovery, and visible recovery that safely releases stranded controls.

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

Yes for the remaining findings: source establishes a stranded interlock after CLI death before sentinel publication, and missed updates when standalone CLI admission occurs after the Gateway watcher becomes idle. These scenarios were not executed during this read-only review.

Is this the best way to solve the issue?

The shared-ledger direction is sound, but incomplete: reconciliation and discovery belong in the updater/Gateway owners, rather than browser timeouts or another client-side outcome model.

Full review comments:

  • [P2] Reconcile interrupted runs before using them as a persistent UI lock — ui/src/app/overlays-updates.ts:161-163
    If a standalone CLI updater dies after admission but before publishing a restart sentinel, its ledger row remains running. These new flags restore that row as a permanent interlock, and bootstrap.ts:295 suspends configuration writes after reconnect or reload. Neither the watcher deadline nor sentinel recovery terminalizes that case. The previously reported blocker remains: reconcile through the ledger/orchestrator owner while preserving any surviving detached updater’s claim.
    Confidence: 0.99
  • [P2] Wake the Gateway watcher for standalone CLI admissions — src/gateway/update-run-watcher.ts:34-37
    The new live run view depends on update.run.changed, but this watcher stops scheduling reads when no run exists. A subsequently launched CLI writes SQLite without waking the Gateway’s process-local callback. With no campaign or Gateway restart, the connected UI misses admission and completion; a manually loaded running row also receives no terminal event. The earlier discovery blocker remains: connect standalone admission to a Gateway-owned cross-process discovery path and cover the idle-to-running-to-finished sequence.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7b1217e2e79e.

Labels

Label justifications:

  • P2: This useful update-observability feature has bounded lifecycle defects requiring completion before merge.
  • merge-risk: 🚨 compatibility: Loading an orphaned ledger row can newly disable existing update and configuration controls across reconnects.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The maintainer-authored exemption applies. Supplied CLI previews cover durable JSON reports, and browser tests cover retained views and native handoff; earlier AWS campaign evidence does not establish final-head interruption recovery or idle-Gateway discovery.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Acknowledgement, restart, verification, and final-report messages change observable Telegram chat behavior.

Evidence

What I checked:

  • Introduced scope: Inspected the pinned merge-base-to-head delta. The supplied test merge is stale, so no claim here attributes current-main drift to this PR. (0847f56ccf74)
  • Persistent UI interlock: The new projection treats every running ledger row as busy. The existing bootstrap consumer suspends configuration writes from these flags at ui/src/app/bootstrap.ts:295. (ui/src/app/overlays-updates.ts:161, 0847f56ccf74)
  • Interrupted-writer ownership gap: CLI admission creates a running row; terminalization requires a subsequent explicit write. The ledger has no writer-liveness reconciliation, and restart recovery returns immediately when no sentinel exists. (src/infra/update-run-ledger.ts:486, 0847f56ccf74)
  • Standalone CLI discovery gap: An idle watcher returns without scheduling another read. Its wake callback is process-local; callers are Gateway admission and automatic campaigns, while standalone CLI admission only writes the ledger. The watcher test explicitly invokes the local wake function. (src/gateway/update-run-watcher.ts:34, 0847f56ccf74)
  • Native retry repair: Retained-report retries now call hasNativeUpdateBridge(), matching fresh updates. The browser ownership test covers available, failed, and skipped states, one native start message, and one Gateway handoff after native decline. (ui/src/components/sidebar-update-card.ts:124, 0847f56ccf74)
  • Review continuity and proof boundaries: The supplied body and feat(update): keep progress and reports across restarts #138737 (comment) explicitly defer interrupted-run recovery and idle-Gateway discovery before landing. They report 702 targeted checks and final-head CI success, while identifying browser proof as mocked and AWS evidence as an earlier integrated campaign. (0847f56ccf74)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Accept and implement run-owned interruption recovery covering a killed CLI writer and a surviving detached updater.
  • Verify standalone CLI admission and completion reach an idle Gateway without restarting it.

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 (3 earlier review cycles)
  • reviewed 2026-09-05T01:09:39.970Z sha f0d016b :: blocked before merge. :: [P2] Reconcile interrupted runs before using them as a persistent UI lock | [P3] Qualify the four-message promise until managed staging supports it
  • reviewed 2026-09-05T01:50:49.644Z sha ceaa2a4 :: blocked before merge. :: [P2] Reconcile interrupted runs before using them as a persistent UI lock | [P2] Wake the update watcher for standalone CLI admissions
  • reviewed 2026-09-05T03:54:12.105Z sha 8383091 :: blocked before merge. :: [P2] Reconcile interrupted runs before using them as a persistent UI lock | [P2] Wake the Gateway watcher for standalone CLI admissions | [P2] Preserve native update ownership when retrying a sidebar report

@openclaw-barnacle openclaw-barnacle Bot added the app: ios App: ios label Sep 5, 2026
Keep phase history and notice custody through bounded diagnostic eviction, close interrupted steps at terminalization, and move unchanged validation out of browser imports. No schema or stored-shape change.

(cherry picked from commit 03b41549c8db17757ac0a0ef4e9c57f4a7c9d1f1)
Use the shared renderer for acknowledgement, activation, boot verification, and terminal reports. Deduplicate durable outbound intent ownership and internal transcript appends, and return the gateway acknowledgement from chat commands. Await the activation notice before parking the exact managed helper owner.

(cherry picked from commit 522cd3be2e2016f87c9e3338f5cfe16eced6a3ef)
Observe the command-owned ledger timeline through restart verification, replay fast recorded transitions once, and print the shared terminal report. Include the durable run row in JSON and remove divergent step labels and the unused step-info re-export.

(cherry picked from commit 87179747ba0a686f60b4d77fa3bab58f3145fe0e)
Drive the body-mounted dialog, Settings update view, and sidebar from the server run row across reconnects. Show canonical phases, bounded details, oracle marks, and success or failure reports; scope browser acknowledgements and retire reports on permission changes. Delete browser verification, sessionStorage execution reconciliation, the success toast, and its obsolete reload helper. Document and prove the flow with mocked gateway browser coverage.

(cherry picked from commit 180d3a61b11d329a58fd06d06e74ed8578a3ebd0)
(cherry picked from commit 58eacd94b85b9ec753844bd2dbac685f1dc2d1e5)
Keep simulated run snapshots independent, expand fixture control-flow braces, distinguish the retained run failure from sentinel failure, and mark the acknowledgement callback as this-free. Runtime behavior and test assertions are unchanged.

(cherry picked from commit 628f69103caeeaae742766080124ac98c69c3e5f)
… plugin

(cherry picked from commit 54c28e839d67e40861d9c298ec9b2b2fcc3361e7)
Resolve update notice destinations through one owner shared by admission,
phase notifications, and restart recovery. Existing internal sessions need
only sessionKey: record their internal delivery channel without changing API
trigger classification, append durable notices to their transcripts, and
avoid a model wake after completed updates without a continuation.

Remove the duplicate notifier and sentinel routing logic. Preserve external
notice custody and sessionless system-route/thread behavior, with boundary
coverage using the real session store, update ledger, and transcript writer.
Document the sessionKey-only contract for Control UI and webchat callers.

(cherry picked from commit 8a90fc8ea00a73e70a35ea5d70d88cd2725fd93f)
Port the repair-visibility projection from d37a9418d94: hide Repairing until the run records or enters it, with component and browser proof. Preserve canonical phase and record ownership after the ledger-parent refresh.

Keep the polling test independent of host load, retire the deleted browser-verifier reload test, and remove a redundant nested sidebar condition. Native Mac update controls and terminal reload protection remain intact.
Align history RPC metadata with the September release train, preserve Git revision identity in shared reports, and migrate sibling UI fixtures to durable run records and explicit dismissal. Project CLI triage assertions away from inherited environment data.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
)

* refactor(update): preserve run facts and separate runtime validation

Keep phase history and notice custody through bounded diagnostic eviction, close interrupted steps at terminalization, and move unchanged validation out of browser imports. No schema or stored-shape change.

(cherry picked from commit 03b41549c8db17757ac0a0ef4e9c57f4a7c9d1f1)

* feat(update): deliver durable run phase notices

Use the shared renderer for acknowledgement, activation, boot verification, and terminal reports. Deduplicate durable outbound intent ownership and internal transcript appends, and return the gateway acknowledgement from chat commands. Await the activation notice before parking the exact managed helper owner.

(cherry picked from commit 522cd3be2e2016f87c9e3338f5cfe16eced6a3ef)

* feat(update): render CLI progress from canonical run phases

Observe the command-owned ledger timeline through restart verification, replay fast recorded transitions once, and print the shared terminal report. Include the durable run row in JSON and remove divergent step labels and the unused step-info re-export.

(cherry picked from commit 87179747ba0a686f60b4d77fa3bab58f3145fe0e)

* feat(ui): resume update runs and retain terminal reports

Drive the body-mounted dialog, Settings update view, and sidebar from the server run row across reconnects. Show canonical phases, bounded details, oracle marks, and success or failure reports; scope browser acknowledgements and retire reports on permission changes. Delete browser verification, sessionStorage execution reconciliation, the success toast, and its obsolete reload helper. Document and prove the flow with mocked gateway browser coverage.

(cherry picked from commit 180d3a61b11d329a58fd06d06e74ed8578a3ebd0)

* style(update): make empty progress reads explicit

(cherry picked from commit 58eacd94b85b9ec753844bd2dbac685f1dc2d1e5)

* style(ui): align update fixtures and callbacks with lint rules

Keep simulated run snapshots independent, expand fixture control-flow braces, distinguish the retained run failure from sentinel failure, and mark the acknowledgement callback as this-free. Runtime behavior and test assertions are unchanged.

(cherry picked from commit 628f69103caeeaae742766080124ac98c69c3e5f)

* test(gateway): give the update notice fixture a send-capable outbound plugin

(cherry picked from commit 54c28e839d67e40861d9c298ec9b2b2fcc3361e7)

* fix(update): deliver reports to internal origin sessions

Resolve update notice destinations through one owner shared by admission,
phase notifications, and restart recovery. Existing internal sessions need
only sessionKey: record their internal delivery channel without changing API
trigger classification, append durable notices to their transcripts, and
avoid a model wake after completed updates without a continuation.

Remove the duplicate notifier and sentinel routing logic. Preserve external
notice custody and sessionless system-route/thread behavior, with boundary
coverage using the real session store, update ledger, and transcript writer.
Document the sessionKey-only contract for Control UI and webchat callers.

(cherry picked from commit 8a90fc8ea00a73e70a35ea5d70d88cd2725fd93f)

* fix(update): align run surfaces with current owners

Port the repair-visibility projection from d37a9418d94: hide Repairing until the run records or enters it, with component and browser proof. Preserve canonical phase and record ownership after the ledger-parent refresh.

Keep the polling test independent of host load, retire the deleted browser-verifier reload test, and remove a redundant nested sidebar condition. Native Mac update controls and terminal reload protection remain intact.

* fix(update): preserve run reports across current surface contracts

Align history RPC metadata with the September release train, preserve Git revision identity in shared reports, and migrate sibling UI fixtures to durable run records and explicit dismissal. Project CLI triage assertions away from inherited environment data.

* docs(update): qualify managed update phase notices

* fix(update): preserve notice ordering and campaign interlocks

Record activation before the pre-park notice and preserve newer campaign installation interlocks without losing queued manual failure triage. Repair the reproduced CLI typecheck and gallery navigation fixture failures.

* fix(ui): preserve native ownership for update report retries

Reuse the live Mac update bridge when retrying retained failed or skipped sidebar reports. Extend browser ownership coverage across fresh updates and both retained outcomes, including the native-decline handoff.
steipete added a commit that referenced this pull request Oct 12, 2026
ui/src/e2e/logs-lifecycle.e2e.test.ts failed deterministically on main
(5/5 on Testbox) at line 214: after a real Gateway restart the sidebar
showed "Refresh required" instead of "Reconnecting…". Main-push CI skips
UI e2e, so only PRs selecting that shard inherited the red.

Culprit: 1c3468f (fix(updates): refresh target when opening updater,
#158053) added `connectedEpoch++` to the scope-change branch of
synchronizeGateway as an async-work fence. Since 9b1d9c2 (#138737)
the same counter also meant "this client lifetime connected before"
(`connectedEpoch > 1`), which gates the legacy version-only build
comparison to reconnects. The first authenticated hello changes the
profile scope, so the first connection now counted as a reconnect and a
version-only mismatch latched controlUiRefreshRequired; the status then
read "Refresh required" through the later transient reconnect, a state
reloading cannot clear.

Keep connectedEpoch as the fence and track the reconnect fact separately,
reset with the epoch on a fresh client lifetime. The overlay regression
test now gives the fresh lifetime's first hello a profile, which fails on
the pre-fix code.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
ui/src/e2e/logs-lifecycle.e2e.test.ts failed deterministically on main
(5/5 on Testbox) at line 214: after a real Gateway restart the sidebar
showed "Refresh required" instead of "Reconnecting…". Main-push CI skips
UI e2e, so only PRs selecting that shard inherited the red.

Culprit: d313ec2 (fix(updates): refresh target when opening updater,
openclaw#158053) added `connectedEpoch++` to the scope-change branch of
synchronizeGateway as an async-work fence. Since 8b46aba (openclaw#138737)
the same counter also meant "this client lifetime connected before"
(`connectedEpoch > 1`), which gates the legacy version-only build
comparison to reconnects. The first authenticated hello changes the
profile scope, so the first connection now counted as a reconnect and a
version-only mismatch latched controlUiRefreshRequired; the status then
read "Refresh required" through the later transient reconnect, a state
reloading cannot clear.

Keep connectedEpoch as the fence and track the reconnect fact separately,
reset with the epoch on a fresh client lifetime. The overlay regression
test now gives the fresh lifetime's first hello a profile, which fails on
the pre-fix code.
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 docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant