Skip to content

fix(browser): report crashed tabs as tab-scoped failures - #194682

Merged
daniel-lxs merged 19 commits into
openclaw:mainfrom
ccclucky:fix/browser-crashed-tab
Nov 27, 2026
Merged

daniel-lxs merged 19 commits into
openclaw:mainfrom
ccclucky:fix/browser-crashed-tab

Conversation

@ccclucky

@ccclucky ccclucky commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #194667

What Problem This Solves

Fixes: the browser tool reports a crashed tab as a generic 20 s timeout and tells the agent the whole browser is unavailable, even though the browser and its other tabs keep working. navigate on a crashed target waits the full request budget, and the tab list gives no hint that the target is dead.

User Impact

User impact: a crashed tab now fails fast with tab-scoped guidance to open the page in a new tab (or retry once a busy page settles), instead of steering the agent into browser-wide troubleshooting. snapshot, screenshot, and navigate all take that path; tabs marks targets observed as crashed in both the JSON payload and the CLI text output, and implicit tab selection prefers a healthy tab. Existing-session and extension-relay drivers keep their current behavior.

Why This Change Was Made

A crashed renderer leaves its Chrome target listed while every page-level CDP command stalls. Snapshots waited out the full action budget and then attached the browser-wide unavailability hint, and navigate timed out the same way. The fix adds one bounded Page.getFrameTree liveness probe before snapshot and navigate work, maps Playwright Target crashed errors to a 409 with tab-scoped recovery text, and keeps the observed crash on the tab record for listing, the CLI handle list, and implicit selection. A dead renderer and a long-blocked main thread look the same to that probe, so the wording names both and suggests a retry once the page settles. Snapshot media helpers moved to a sibling module to stay under the file line cap.

Evidence

  • Targeted suite: pnpm test extensions/browser/src/browser/cdp-liveness.test.ts extensions/browser/src/browser/target-crash.test.ts extensions/browser/src/browser/routes/tabs.test.ts extensions/browser/src/browser/routes/agent.snapshot.local-managed.test.ts extensions/browser/src/browser/client-fetch.loopback-auth.test.ts extensions/browser/src/browser/server-context.selection.crash.test.ts — 6 files, 93 tests passed.
  • Real renderer crash (gated Chromium test, system Chrome): OPENCLAW_BROWSER_CRASH_E2E=1 PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=... pnpm test extensions/browser/src/browser/cdp-liveness.chromium.test.ts — Page.crash then probe rejects with BrowserTargetCrashedError inside the bounded probe window.
  • Real crash-frame shape on 79e875aabfa: the same gated test crashes a renderer and asserts the message Playwright itself produces for a screenshot on the dead tab. Measured locally, the first line is page.screenshot: Target crashed (trailing space) followed by a Call log: block; the matcher accepts the headline, the typed error is returned, and reverting only target-crash.ts makes 2/7 target-crash.test.ts cases and 1/23 client-fetch.loopback-auth.test.ts cases fail.
  • Shipped Gateway + CLI proof on 4b9f8291e0d (isolated state dir, local loopback only, no real credentials; headless system Chrome 157; local HTTP fixture; the target was crashed with CDP Page.crash, then observed through the normal CLI entry point):
    • openclaw browser navigate http://127.0.0.1:18080/crashme.html --target-id crashme — fails fast (~2 s) with The tab crashed or stopped responding. The browser and other tabs are still available: open the page again in a new tab, or retry this target once the page settles. instead of waiting out the request budget.
    • openclaw browser tabs — 2. crashme [crashed use: crashme tab: t1 label:crashme]; the healthy tab stays listed unchanged (1. healthy [use: healthy tab: t2 label:healthy]).
    • openclaw browser screenshot crashme — same tab-scoped crash error before Playwright reports its own Target crashed frame; openclaw browser screenshot healthy still writes $OPENCLAW_STATE_DIR/state/media/browser/<uuid>.png.
    • Recovery: openclaw browser open http://127.0.0.1:18080/crashme.html --label recovered then openclaw browser snapshot --target-id recovered returns the page's AX tree (RootWebArea "crashme" / heading "crash target").
  • Independent live check by @wr-web (Page.crash + CLI on Windows) confirmed snapshot/screenshot on 906d205; their navigate and tab-list findings are wired in 76b7e18520f and 905b07cae7b.
  • Base behavior reproduced locally: after Page.crash, the listed page's WebSocket accepts connections but Page.getFrameTree, Runtime.evaluate, and Accessibility.getFullAXTree never answer; a healthy page answers in milliseconds.
  • Ratchet and suite on the merged tree (52c81a6a2b1, merges origin/main bd9166435e9): the only conflict was the import block in agent.snapshot.ts, where upstream added resolveProfileHeadless while this branch moved the media helpers to agent.snapshot-media.ts; the resolution keeps upstream's headless wiring and this branch's helper extraction. pnpm check:test-lines-ratchet reports Test lines OK. Net test lines: +395; allowance: 400; allocation credit: 350. Full browser project suite (node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-browser.config.ts) passes 257 files / 3091 tests with 127 skipped; pnpm tsgo:extensions and pnpm tsgo:extensions:test pass, oxlint reports 0 problems on the 21 changed files, and pnpm format:check is clean.
  • Gap: the live check drives the shipped CLI routes but not a full agent model turn; request-boundary behavior stays covered by the route tests.

A crashed renderer leaves its target listed while every page-level CDP
command stalls, so a snapshot waited out the full budget and then told the
agent the whole browser was unavailable. Probe target liveness with a
bounded Page.getFrameTree, return tab-scoped recovery guidance, mark the
tab in listings, and prefer healthy tabs for implicit selection.
@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 7, 2026
Only a probe timeout is crash evidence; a failed handshake lets the action
report its own error. Expire crash observations, clear them when a target
answers again, and let a crash-observed sticky target fall back to a healthy
tab instead of wedging implicit selection.
@ccclucky

ccclucky commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Updated in c35bffce60e.

  • Fixed the checks-node-changed-extensions-bundle-1 regression: only a probe timeout is treated as crash evidence; a failed handshake now lets the action report its own error, and the shared control-server harness mocks the probe like every other CDP boundary (still resolves a live tab alias passes again).
  • Crash observations now expire after 5 minutes and clear when a target answers again, so a transiently blocked page is not permanently demoted.
  • A crash-observed sticky target falls back to a healthy page tab instead of throwing tab not found and wedging implicit selection.
  • Re-verified: 7 test files / 104 tests pass (including the historical-target regression and the new sticky/TTL/clear cases); gated real-Chromium Page.crash proof passes; pnpm check:changed green except the pre-existing repo-wide changelog attributions baseline failure (no changelog changes here).

@wr-web

wr-web commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Independent live Page.crash run for #194667, comparing both open PRs against main. I am not opening a competing PR.

Setup:

  • Windows 11, Node v26.12.1, Google Chrome (managed openclaw profile, headless).
  • Source Gateway on loopback with isolated state.
  • browser open http://127.0.0.1:28798/ gives target T; then CDP Page.crash is sent to ws://127.0.0.1:<cdpPort>/devtools/page/T; then each CLI action below.
  • Times are whole CLI invocations. About 17.5 s of each is CLI startup on this host, so a fast failure shows as roughly 17.5 s.
Action on crashed T main c3b92c2 #194690 56ae7ba #194682 906d205
snapshot 27.7 s, page.ariaSnapshot: Target crashed 22.4 s, tab crashed (renderer exited); open the URL in a new tab 19.9 s, The tab crashed or stopped responding…open the page again in a new tab…
screenshot 17.7 s, page.screenshot: Target crashed 17.6 s, tab crashed (renderer exited)… 17.9 s, The tab crashed or stopped responding…
navigate ❌ 47.5 s, browser request timed out ✅ 17.5 s, tab crashed (renderer exited)… ❌ 47.6 s, browser request timed out
tabs (text output) T listed as a normal page T listed as a normal page T listed as a normal page
open new tab works works works

proof-194667

For this PR (#194682): snapshot and screenshot are fixed. navigate on the crashed target still waits out the full request budget and returns the generic browser request timed out, the same as main. That is the step-5 path in the issue (page.route: Target crashed on the reporter build). In this run the navigate path apparently does not reach the new crash classification. The human-readable tabs text output also did not show a crash marker; I only checked the text output, not --json.

Playwright navigation waits out the request budget on a dead renderer.
Run the same bounded liveness probe at the navigate boundary so the tab
gets the crash guidance and is marked for listings and selection.
@ccclucky

ccclucky commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — that live comparison lines up with the step-5 gap. Both points are addressed on the current head (1cdaf2c1d21):

  • navigate: 76b7e18520f runs the same bounded liveness probe at the navigate boundary before the action completes, so a crashed target fails fast with the tab-scoped 409 instead of waiting out the request budget. The head you tested (906d205) only probed snapshot/screenshot.
  • tabs text output: 905b07cae7b adds the crashed marker to the CLI tab list. The HTTP/tool tab payload already carried crashed: true; that is what implicit selection and the tab listing route read.
  • 1cdaf2c1d21 resizes the test-line allocation to the final diff after the ratchet caught the two follow-up commits.

Re-running your matrix on 1cdaf2c1d21 should show navigate failing fast and the text tab list marked. Appreciate the independent live proof.

@clawsweeper clawsweeper Bot removed the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Nov 7, 2026
@ccclucky

ccclucky commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Three review attempts on head 1cdaf2c1d21 (18:02, 18:05, 18:11 UTC) were aborted and their status comments cleaned up without posting a verdict. No commits changed since that head. Re-requesting once; if the worker fails again, this is ready for a maintainer look.

@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@ccclucky

ccclucky commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Retrying the exact review once on unchanged head 1cdaf2c1d21: the four earlier attempts aborted during source preparation ("Review blob metadata was unavailable") and posted no verdict or findings. CI on this head is green.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Detects crashed Chromium tabs before snapshots, screenshots, and navigation, returns tab-specific recovery guidance, and marks observed crashes in tab listings.

Example: Crash tab t1 with CDP Page.crash while tab t2 remains healthy, then request a screenshot of t1.

  • Before: The uncached screenshot can time out with browser-wide troubleshooting guidance.
  • After: The request returns HTTP 409 with “This tab crashed. Open the page again in a new tab.” while t2 remains usable.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, worthwhile repair with fresh production-path evidence, a reported base-failing Chromium regression, and passing exact-head CI.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The fresh Gateway report exercises the current Inspector owner with a real Chromium crash, uncached screenshot, snapshot, navigation, target-specific listing, healthy sibling controls, and replacement-tab recovery; production code is unchanged between that Gateway build and the reviewed head, which also has direct checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A dead renderer can make the agent diagnose a browser-wide outage even though healthy tabs and new-tab recovery still work.
Reason: The reported failure occurs on an owned browser surface, and this narrow repair improves diagnosis and recovery without adding configuration, persistent storage, or another state owner.

Merge readiness

✅ Ready for maintainer review

This PR fixes a confirmed browser defect that remains on main; no introduced correctness or security blocker was found.

Reviewed head: 53f99c2f503e516be8e4bc1daf0460e735a95ba6

Before merge

None.

Findings

None.

Agent review details

How this fits together

The browser plugin resolves CLI and agent requests to a profile and tab, performs CDP or Playwright operations, and returns browser results or mapped errors; crash observations remain in the existing profile runtime.

flowchart TD
  A[CLI or browser tool] --> B[Browser routes]
  B --> C[Profile and tab selection]
  C --> D[CDP Inspector crash check]
  D --> E[Snapshot screenshot or navigation]
  D --> F[Tab conflict response]
  D --> G[Profile tab observations]
  G --> H[JSON and CLI tab listings]
Loading

Technical review

Best possible solution:

Use Chrome’s explicit crash signal through the existing CDP owner, preserve tab identity, and report recovery through the existing error and tab-list paths.

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

The linked issue supplies an official-release Page.crash reproduction, current source lacks crash detection, and daniel-lxs independently reports the same main failure; this review ran no target code.

Is this the best way to solve the issue?

The focused fix uses an explicit browser signal instead of equating a slow page with a crash, shares the check across the affected routes, and reuses existing runtime state and error handling.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Guarded CDP transport keeps the original intent (92f5f07: Keep guarded WebSocket connections on the endpoint resolution that passed validation.)
  • Stable tab handles and selection identity keeps the original intent (45e2a15: Give browser automation stable tab IDs and labels across operations.)
  • Post-action target continuity keeps the original intent (91888cf: Prove target continuity before adopting a replacement after an operation.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +78, Tests +38, Other -1. Total +115 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 10 87 9 +78
Tests 4 38 0 +38
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 15 125 10 +115

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #194667
Summary: The linked issue owns the crashed-renderer diagnosis problem; overlapping open PRs use different detection approaches and do not establish safe supersession of this PR.

Members:

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-11-10T04:47:22.405Z sha 79e875a :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-10T08:52:42.205Z sha 4b9f829 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-25T17:00:00.471Z sha bb15c6a :: blocked before merge. :: [P3] [P3] Clear crash observations only after a successful probe
  • reviewed 2026-11-25T17:17:08.128Z sha 69abd86 :: blocked before merge. :: none
  • reviewed 2026-11-27T15:09:35.546Z sha 69abd86 :: needs changes before merge. :: [P2] Apply crash handling to uncached direct-CDP screenshots
  • reviewed 2026-11-27T16:15:02.070Z sha 5ee1573 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-27T20:04:56.936Z sha e9ed39d :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-27T20:50:25.665Z sha 53f99c2 :: needs real behavior proof before merge. :: none

Reviewed November 27, 2026, 4:14 PM ET / 21:14 UTC (Revision 13).

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 27, 2026
A plain screenshot on a tab with a per-tab WebSocket and no cached
Playwright connection captured without the route liveness probe, so a
crashed renderer left Page.enable unanswered for the whole screenshot
budget and reported generic timeout guidance without recording the
crash for the tab. Reuse assertRouteTabResponsive before the direct-CDP
capture, as navigation and snapshots already do.
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 27, 2026
Ask Inspector for the selected page’s crash state before snapshot, screenshot, and navigation. Keep the observation on the existing profile tab record and let the browser error mapper carry recovery guidance.

Co-authored-by: daniel-lxs <[email protected]>
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 27, 2026
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@daniel-lxs

Copy link
Copy Markdown
Member

On main (27f32c8), I crashed one of two Chromium tabs. Its snapshot and uncached direct-CDP screenshot timed out, navigation returned tab not found, and the tab list showed no crash marker.

On a fresh Gateway at e9ed39d, I ran the uncached screenshot first. Screenshot, snapshot, and navigation each returned HTTP 409 with “This tab crashed. Open the page again in a new tab.” Only the crashed tab was marked. The healthy tab returned a snapshot and a valid PNG, then navigated and showed the expected heading. A separate Gateway run also opened a replacement tab and read its heading.

Only tests and fixtures changed between that Gateway build and 53f99c2. On the exact source tree for 53f99c2, the uncached screenshot returned 409 in 73 ms and navigation returned 409 in 20 ms. The current Chromium regression received 404 instead of 409 on PR base 4300f41 and passed in 398 ms on the head tree.

@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 27, 2026
@daniel-lxs
daniel-lxs merged commit 4849bb7 into openclaw:main Nov 27, 2026
113 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
…4682)

fix(browser): report crashed tabs as tab-scoped failures (openclaw#194682)

Detect crashed Chromium tabs before snapshots, screenshots, and navigation.
Return tab-specific recovery guidance and mark observed crashes in tab
listings so other tabs remain usable.

Fixes openclaw#194667.

Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…205987)

## Class: completion is published before required maintenance finishes

Fleet run `4de610c8-e63d-4336-8e85-a76379cfd934` committed and served the new core, but its completion notice preceded the failed plugin result. The bug is ordering, not the core's status.

The modern Gateway-ready owner now settles once **after** required plugin work and sends one final notice afterward. A failed plugin remains a failed step, not a failed core update or a rollback trigger. Existing CLI following and capability-consent behavior remain; the failed-status/early-exit/backoff experiment is removed.

CLI completion, status, Doctor history and the Control UI reuse the existing `renderUpdateRunSummary` over recorded facts. Running results keep their phase; succeeded results name the installed after-version; skipped results keep their existing reason headline, never a guessed serving state. Failed work names its step and exact recovery command. Startup refusal diagnostics, structured failure facts, rollback compensation reasons, recorded signal output and profile-specific recovery commands remain visible. Existing discriminators distinguish repair and reconciled-history records from core updates. Background completion never rewrites the shared trial, preserving a newer pending trial and restart resumption.

## What this deletes

- `renderUpdateRunReport`, its private recovery hints and cause module.
- Routine Markdown completion publication/refresh, automatic `reportPath` output, and artifact-only admission/options plumbing.
- Obsolete completion-export tests and renderer-only assertions. Ledger, recovery, authority, privacy and step-detail assertions remain on their retained data owners.
- The abandoned failed-status classifier, campaign/retry exceptions, early-return CLI path and associated UI/test allocation.

**Kept deliberately:** explicit consent-gated **Report update failure** GitHub preview/submission, its reservation/receipt authority and sanitized issue artifacts. The remaining `update-failure-report*` code serves that user feature and triage, not routine completion. Identity/recovery and legacy result/sentinel projections remain because those manual-report and sentinel consumers still use them.

No new status, state store, flag, stored-record shape or launcher format.

## Size

`tokei` on this PR's **20 production files**, excluding tests/support/harnesses, against integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284`:

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 7,758 | 7,148 | **−610** |
| Test/support lines | | | **−1,257** |

## Verification

- The earlier base Gateway-owner regression exposed the premature terminal write before plugin settlement. Final owner tests pin delayed settlement, unchanged successful core status, exact plugin recovery, one acknowledged final notice, newer-trial preservation and restart resumption.
- **Earlier focused AWS replay GREEN:** nine observed prepare/status/progress regression cases passed in99s; core and CLI-update types, scoped lint (zero warnings/errors) and format passed. https://crabbox.openclaw.ai/portal/runs/run_e5a8682ccf98bb7765b9d075be801705 . Exact qualified source was `5c6686ad20f50377f6affdec0d948f362dc37851`, tree `5ed1cb6e544fbd93604eea566b550f0c722842c8`, normal carrier `d2821086c00e55c8de35d00d7a4418168ca25a2d`; lease released with `--wait`. This is not claimed as an exact-head run after the later shared-summary/UI refinements.
- **Final pushed head:** `79182af301a6166914840dab9a705f4fa5c72fbd`. Restores the existing installed-runtime admission receipt before stop-and-repair advice, keeps historical summaries informational, and types the captured handoff notice without weakening assertions. Three requested files passed once: guidance32/32, handoff19/19, UI view15/15 (**66/66**). https://crabbox.openclaw.ai/portal/runs/run_ea4006e0b21e09bfbd763abe6e25929a . Qualified source was `985dd796d1` plus those two frozen restores, tree `45fe9f49c964b39806b431cde018432ed6e472fc`, normal carrier `81d874a77bb7de2f72307cca91f827db71ec7850`. Exact AWS lease released with `--wait`, exit0. Final-head CI remains the landing gate.
- **Repair candidate:** `1f223e15a20a04a27a4f745af81fb11b106d9d40`. Plain integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284` passed all39 CLI tests on hydrated AWS4CPU/7730MiB, including the #205898 restart-wire case in31ms: https://crabbox.openclaw.ai/portal/runs/run_97637e77b460fbb7176bd261693cabd1 . B's timeout came from its local ledger fixture using a remote run ID; the fixture is corrected without changing main's captured connection contract.
- **Node regression batch:** nineteen files on repair predecessor `eede`, 481passed/4failed/1skipped; core types, scoped lint and format passed. https://crabbox.openclaw.ai/portal/runs/run_fbcf26ce68d5a5a539f63f6ee793237a . The four residuals were an early-return saved-notice recognition bug, two assertions pinning retired reconciled wording, and a native-refusal assertion reading a clipped excerpt instead of its retained structured cause. All are corrected without changing generic ledger storage.
- **Final-head residual proof:** summary18/18, abandoned-repair rows2/2 and native-start refusal1/1 passed; core and CLI-update types plus scoped format passed. https://crabbox.openclaw.ai/portal/runs/run_f4e633ac557bce484d1939c03cf88b3f . Source tree `9112e46c2b3081aab02b3dc9a0dfc1e0c06da55f`, normal carrier `82470c4669b7cc502049fa978dc5ed37defb6c6a`, AWS4CPU/7730MiB. Scoped lint did **not** run: its normal SDK declaration preparation failed first with TypeScript/vscode-jsonrpc `ERR_STREAM_DESTROYED`. No retry or bypass; current-head CI remains the lint gate.
- Historical failed-status screenshots, broad partial qualification and prior reviews describe the superseded design, **not** this head.
- No new upgrade source, death proof, harness test or Linux product campaign is added. Superseded remote proof jobs were cancelled and all their leases released with `--wait`.
- The ready-time settlement owner tests passed on integrated `9aba`: `gateway-trial.test.ts`18/18. Later output refinements do not change that settlement policy. Frozen `01b` UI reproduction observed unit14pass/1fail and E2E8pass/2fail. On repair predecessor `eede`, unit15/15, UI/pages/E2E types and scoped lint/format passed. Final `f087` passed both changed E2E cases (standalone repair history; warning advice and keyboard-accessible output), UI/pages/E2E types, scoped lint and format: https://crabbox.openclaw.ai/portal/runs/run_13701071e15057d5ac5c4ac5e927c65d . Source tree `3c734ef709a186303996517ecad54c5e5d4a0e9c`; exact lease released with `--wait`. The other8 E2E cases passed on `eede` and were intentionally not repeated.
- **Accepted budget cost:** exact `1f223` CI measures chat boot gzip **1,336,500→1,337,028 (+528 B)**, requests21→21; startup+1 B. Base already exceeds its cap, so normal tolerance is64 B (464 B excess). https://github.com/openclaw/openclaw/actions/runs/45885636780/job/140136424955 . Cause: `update-run-projection.ts` synchronously imports the shared summary for the existing card/view projection; the existing async result boundary already imports it dynamically. Ayaan accepted this cost for this PR through Main; no new async plumbing or budget config. Main applies the performance-only override at merge; every other gate remains required.
- **Final-head budget receipt (`79182`):** chat boot gzip **1,336,744→1,337,247 (+503 B)**, requests21→21; startup+1 B, normal tolerance64 B. https://github.com/openclaw/openclaw/actions/runs/45895112042/job/140167696819 . This is below the accepted predecessor's +528 B cost; same synchronous-summary cause, no new plumbing/config. Remaining CI gates are still pending.
- **Latest pushed head: `be86da0464892c10cbe7207ff98228eb1e81758a` (test-only delta).** The shared notice mock uses its production signature; no cast or weakened notice assertion remains. Healthy final recovery without an installed-runtime admission receipt explicitly expects update-again/no-stop advice. Two affected files passed once (**81/81**: handoff19, post-update62), focused Gateway/CLI-update types and lint passed: https://crabbox.openclaw.ai/portal/runs/run_c8784e2fe001772ae88bae53af8d9747 . Qualified source was `79182` plus the frozen test edits; only generic-type wrapping changed mechanically afterward, normal commit hooks passed. No production/budget change.
- The prior ratchet failure is infrastructure: its GitHub annotation says the hosted runner lost communication, leaving the baseline-ratchet step without a verdict. Its log fetch returned BlobNotFound/404. No old-head rerun was accepted or needed; this head's normal CI runs the ratchet again.
- **Latest pushed head: `bf3ab61efbb9dba856bfc4d651c7fc77f44549f2` (one exact-copy test assertion).** Requested same-guest owner-file comparison: plain main `993d0b77`13/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_4983803c6c82c64295d7d513ac8b52cd)); `be86`12/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_51b38ba2049d66bdf6437b89731bf787)), failing only the expected generic details tail. The actual last notice correctly preserves `commands.restart=false` and its app/operator remedy. This commit changes only the exact expected string, retaining acknowledgement, no-update and last-call/context assertions; no mock runtime or production change. No extra local rerun: new-head CI verifies the migrated expectation.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit ed8b883)

Release adaptation: Port Gateway run/notice timing and the existing maintenance result contract only; retain beta.2 CLI, Doctor and UI summary surfaces and explicit failure reports. Fold in #208074 abort/grace follow-up where applicable.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): 974d792 fix: keep update status quiet and app-managed updates honest (#208359); 186e941 fix: restore the dependency check on main (#207741); dae01a9 fix: keep other agents running when one store is refused (#208364); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); bb37856 fix: keep Windows WebChat connected during config reloads (#208109); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); 90ff668 fix: stop treating limited access as an Inbox alert (#207737); ec39a90 fix(whatsapp): retain sender for explicit current-message reactions (#190121); 86ca412 fix: show the saved quota reset when chat skips its only model (#207210); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 54b5989 test(update): move startup diagnostics to the live CLI (#207589); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); 0cbe433 test(gateway): move update admission tests to the current handler (#207545); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); c72bd9a fix(anthropic): show Claude CLI quota usage from the native login (#207543); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); 9fa8d14 refactor: trim redundant gateway test journeys (#207311); 2cf1cb6 test(cli): remove unused private fixture state (#207431); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); e94f799 refactor(subagents): centralize requester turn matching (#206584); 819935f refactor(test): trim unused plugin fixture setup (#206982); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); 4849bb7 fix(browser): report crashed tabs as tab-scoped failures (#194682); ea77ca3 refactor: report update failures from recorded runs (#206700); b19387e fix(test): cover SIGBREAK during pending update recovery (#206860); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); 8bd1863 chore(test): remove unused plugin contract fixture setup (#206812); f1841bc fix: stop repeating unchanged session state in every chat turn (#206766); f9a8f18 fix: clear the update warning after a retired model is repaired (#204778); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); 35cd392 improve: use less memory when waiting for an agent reply (#206733); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); 3ce0582 refactor(subagents): centralize collector replay decisions (#206471); c2cfab0 chore: consolidate repeated test fixtures and guards (#198739); 219b6b0 perf(agents): render the system prompt from one manifest and halve it (#206537); 360e306 refactor(test): remove mocked outbound staging fixtures (#184863); cbdd907 fix: finish release updates after a slow launcher response (#206503); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 6feeb50 fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341); be3c73e fix(subagents): finish claimed stops after session rotation (#206405); 5e5bb6e fix(update): round status inspection timeouts (#206250); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372); 6d86389 fix: finish healthy Git updates after an older verifier exits; da6ec1a fix(update): bound release CLI Gateway waits (#206252); d9a36b3 improve: skip unrelated harness discovery for isolated model calls (#206323); bcdb2ef improve(cli): skip channel and web discovery for model credentials (#206240).
Later PR-number mentions: none Later commit-SHA mentions: none
Pinned PR grep: ed8b883 fix(update): settle after plugins and share one completion summary (#205987)

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

Labels

extensions: browser P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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.

[Bug]: Browser tool reports a crashed tab as a generic 20 s timeout and tells the agent the browser is unavailable

4 participants