Skip to content

fix: remove repeated details after an update rolls back - #204253

Merged
obviyus merged 2 commits into
mainfrom
fix/204091-rollback-report
Nov 23, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/204091-rollback-report

Conversation

@obviyus

@obviyus obviyus commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #204091

What Problem This Solves

After an update rolls back, Settings → Updates and openclaw update status repeat the failure as Failed: restarting and Failing check update (update-failed). The CLI also adds an unavailable-health notice above saved facts that say the Gateway started, which makes the outcome hard to read.

User Impact

The rollback summary keeps the cause and the version still running, then gives one next step: Retry, followed by Report update failure if it fails again. Recorded verification and useful supplemental failures remain visible. Startup output stays in collapsed diagnostics.

Stored rows, JSON diagnostics, support-report content, update execution, and nonrollback reports stay unchanged. No schema, protocol, or configuration change.

Why This Change Was Made

The shared report owner now omits the failed phase only when a recorded rollback reason already gives the cause. It keeps failed-phase details for other failures and rollbacks with no recorded reason. An unavailable health probe adds no normal rollback notice; positive current-health observations and all nonrollback health wording remain intact.

On current main, upgrades defer plugin maintenance until the candidate is ready. A downgrade can still record a plugin failure before a later rollback. That supplemental failure remains below the cause and recovery action.

Producer and reader trace

Original producers on main 3b64ff6c6289:

  • src/infra/update-run-report.ts:487: failed-phase label.
  • src/infra/update-run-report.ts:498–507, through src/infra/update-failure-facts-format.ts:46: the phase's internal check line.
  • src/infra/update-run-report.ts:392–402 and :562–569: normal-report current-health wording.
  • src/infra/update-run-report.ts:640–644: recovery advice followed the details.

The normal report is consumed by src/cli/update-cli/status.ts:667–684 and ui/src/app/update-run-projection.ts:77–83. src/infra/update-failure-report-prepare.ts:502–514 separately includes current-health context in Report update failure; that reader and its formatter are unchanged.

The existing repaired-update formatter moved to the existing failure-fact formatting owner, with identical output and its caller migrated. This keeps the report owner below its existing line cap without dropping the CLI's Phases/Total timeline or adding a new module.

Evidence

  • All three removed-line regressions fail on main for the intended unwanted text. The frozen base run reports 5 failed / 61 passed, including two recovery-order failures: AWS red-on-main run.
  • Local ClawSweeper reviewed final range 3b64ff6c6289..f1629feee395: patch is correct, zero findings, security cleared. That review used source-only context; real-path evidence is listed below. The three independent table cases are retained because this issue explicitly requests one test per removed line.
  • A real Settings → Updates request on a Linux systemd user service reproduced the duplicate phase/check lines on built main 3b64ff6c6289; CLI status also showed the unavailable-health sentence above recorded running facts. The unchanged hang fixture rolled back at the normal 20-minute trial ceiling and restored v2026.11.7.
  • The restored reporter package was fully built and packed on AWS from head bd9a5d981431, shared-state schema 41. Its immutable tarball SHA-256 is 87b3ef2ff8f5a1ac1fe412945fc6223da8cfcf498af4c6299796c6eea0d9d41b.
  • On the built bd9a5d981431 reporter, a real Settings → Updates request to an unchanged, qualified crash candidate completed two genuine starts after migration and rolled back. The normal report showed headline → Retry/Report → facts, with startup diagnostics collapsed: AWS runtime evidence. The candidate was 2026.11.8-beta.3, schema 42, SHA-256 a9875749592188cf9adbbba0140a9d1af0d2caf556269fd0e52256064a7eafa5; the reporter's starting schema was 41. The candidate was not rebuilt from this PR.
  • Replaying the original rollback row on an isolated state copy also produced the fixed CLI report; the persisted row remained byte-identical. The copied row's UI selected its intended historical view, so it is not used as the normal-report UI proof.
  • All 68 owner tests passed. Completed consumer shards passed 23 files / 479 tests. The combined 37-file run hit its 1,800-second command deadline during the CLI-process shard, with no observed assertion failures; remaining consumer coverage is deferred to PR CI, not claimed green: AWS consumer run.
  • Final targeted lint, format, and both service/update test typechecks passed: AWS checks.
  • Report update failure title/body bytes were identical between base and head, including its unavailable-health qualification: AWS comparison.
  • Final commit f1629feee395 differs from the runtime-tested bd9a5d981431 only by two callback-variable renames in the relocated repair-summary helper. The rollback renderer is byte-for-byte unchanged. Build/runtime evidence is reused for that unchanged path; targeted static checks cover the final rename.
  • All three task-owned AWS leases were released with --wait.

Settings → Updates

Before — built main:

Settings before: repeated failed phase and internal check

After — real crash rollback, built reporter:

Settings after: cause, one recovery step, and recorded facts

Captured openclaw update status output

These images show the command's unchanged captured stdout, not live Terminal windows.

CLI before: three redundant lines

CLI after: one next step and recorded verification

- Keep duplicate phase receipts and unavailable-health prose out of the normal rollback summary.
- Preserve saved diagnostics, nonrollback phase facts, and support report content.
- Lead rollback details with one recovery action and retain downgrade plugin failures below the cause.
@clawsweeper

clawsweeper Bot commented Nov 23, 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 cli CLI command changes size: S labels Nov 23, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes redundant rollback details and places the recovery action before recorded facts in Settings and CLI reports.

Example: An update to 2026.11.8-beta.3 fails to start and restores 2026.11.7.

  • Before: The report repeats “Failed: restarting” and “Failing check update (update-failed)” before the recovery action.
  • After: The report shows the startup cause, Retry/Report guidance, and recorded verification without those duplicate lines.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported repair with relevant real-product captures and no findings; broad exact-head CI remains in progress.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Settings screenshots and captured openclaw update status output show a Linux systemd rollback restoring 2026.11.7, followed by the cause, Retry/Report action, and recorded facts with duplicate lines absent.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: After rollback, repeated internal failure details and unavailable-health wording obscure the startup cause and recovery action.
Reason: The maintainer-authored direction is established, and the narrow presentation repair makes an existing recovery flow easier to understand without changing update execution.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it completes a useful rollback-report repair that current main still needs, with no actionable correctness or security findings; exact-head CI remains pending.

Priority: P2
Reviewed head: 2fbd1957d392d4481e38c0b1ded9ca105fa304e8

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared report renderer turns recorded update outcomes and optional current-health observations into text consumed by Settings, CLI status, and update notices.

flowchart TD
  A[Release trial outcome] --> B[Update run ledger]
  B --> C[Shared report renderer]
  D[Current health observation] --> C
  C --> E[Settings Updates]
  C --> F[CLI status and notices]
  B --> G[Saved diagnostics and support report]
Loading

Technical review

Best possible solution:

Complete the existing CI gates and retain this focused shared-renderer repair with saved diagnostics and repair-history output preserved.

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

The supplied built-main Linux Settings and CLI captures reproduce the reported duplicate output, and fetched-main source retains that rendering path; no target code was executed during this review.

Is this the best way to solve the issue?

The patch fixes both consumers at their existing shared presentation owner, preserves supplemental failures and saved diagnostics, and introduces no competing renderer or state owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Rollback guidance and failed-phase presentation keeps the original intent (6837fd3: The predecessor preserved the launcher failure, restored running identity, and Retry guidance while keeping diagnostic history.)
  • Current versus recorded health changes intended behavior with a stated reason (14bb3c0: Historical verification and recovery advice must remain distinct from current Gateway observations; the PR explains its rollback-only omission and retains recorded labels and separate support-report qualification.)
  • Repaired-update summary formatter keeps the original intent (34720a5: A standalone repair must retain a bounded description of the failed update it repaired; relocation preserves the formatter’s output and migrates its caller.)
  • Recovery action ordering keeps the original intent (2558513: Shared reports distinguish recorded facts and prioritize actionable recovery guidance; the rollback-specific layout advances that same intent.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned patch and current main: The introduced diff changes rollback presentation in the existing shared renderer; fetched main retains the original rendering behavior in the affected production files. (src/infra/update-run-report.ts:473, 2fbd1957d392)
  • Shared consumer boundary: CLI status prints the shared report lines, and the Control UI uses the same renderer for its normal report; the separate support-report formatter retains current-health qualification. (src/cli/update-cli/status.ts:667, 2fbd1957d392)
  • Inspected behavior proof: The four downloaded before/after images show the actual Settings rollback report and captured CLI stdout: duplicate phase/check and unavailable-health lines disappear, while Retry guidance, phase timing, and recorded serving facts remain. (2fbd1957d392)
  • Repair-history preservation: The moved repaired-run formatter preserves version selection, failed-phase selection, supplemental failure selection, text, and UTF-16-safe bounds; its sole production caller is migrated. (src/infra/update-failure-facts-format.ts:53, 2fbd1957d392)
  • Prior intent and owner history: The repair builds on obviyus’s merged rollback-report work at fix: show what happened after an update rolls back #204054 and preserves the repair-history behavior from fix: show update repairs as repairs and keep the failed update visible #202558; steipete’s history also establishes ownership of shared reports and historical-health qualification. (src/infra/update-run-report.ts:209, 6837fd38ed42)
  • Review limits: The historical runtime-tested commit bd9a5d981431 was unavailable locally and GitHub comparison returned 404, so its equivalence to the submitted source remains author-reported; an older historical-object read also failed because the partial clone lacked the object. The pinned patch, current source, relevant history, and prepared screenshots were readable.

Likely related people:

  • Ayaan Zaidi: Raw commit 6837fd3 adds src/infra/update-run-report.ts:222 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6837fd38ed42; files: src/infra/update-run-report.ts)

PR surface

Source +34, Tests +74, Docs +3. Total +111 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 50 16 +34
Tests 1 76 2 +74
Docs 1 7 4 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 133 22 +111

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: same_root_cause
Canonical: #204091
Summary: This PR addresses the canonical follow-up report about redundant rollback details.

Members:

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

Labels

Label changes:

  • add P2: Confusing rollback details affect recovery comprehension, while the user retains an available Retry action.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Confusing rollback details affect recovery comprehension, while the user retains an available Retry action.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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.

Reviewed November 23, 2026, 5:21 PM ET / 22:21 UTC.

@obviyus
obviyus merged commit 2e90b76 into main Nov 23, 2026
149 checks passed
@obviyus
obviyus deleted the fix/204091-rollback-report branch November 23, 2026 22:31
@obviyus

obviyus commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 2e90b76.

  • Problem: after a rollback, Settings → Updates and openclaw update status repeated the headline as "Failed: restarting", showed an internal check name, and printed "Current health unavailable" directly above the recorded facts that the old version is running.
  • Fix: after a recorded rollback, the report shows the headline (cause and the version still running), one next step (Retry, then Report update failure), the target, the phase timeline and the recorded verification. Other failures keep their failed-phase line. The Report update failure content is unchanged.
  • Proof: a real Linux rollback on the fixed head, with before and after screenshots of Settings and captured update status output above.

tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
Closes #204085

Every release-path update that changes the state schema fails on Windows today: the startup swap renames over the live SQLite files while retained handles are still open. This also affects a successful migration chain, not only its generic-copy fallback (`state-upgrade.ts:566–584,660–663`). The launcher restores the previous release, but the update cannot complete. Shipped first hops use their existing in-place update route and are not affected by this release-path defect.

The candidate releases its closed databases' retained file descriptors before the startup swap. The Windows task supervisor now skips Gateway state and config bootstrap entirely, so it holds no database connection while its child runs. The child still loads its own dotenv files and selects its database and environment. Migration and rollback keep their existing owners and preserved files. There is no schema change or new user action.

An interrupted Windows swap that already created `.pre-*` hard links can still retain admission custody and roll back; this existing, visible recovery edge is unchanged.

Closing SQLite leaves the admission owner's identity descriptor open. A native Windows control reproduces the failure with both SQLite connections closed, then permits the same rename immediately after the existing admission-retirement operation runs. The durable swap now performs that retirement for both database paths before it preserves or replaces either file.

The next open must admit the replacement's physical identity again. The launcher, trial budget, attempts, rollback policy, and SQLite file-sharing mode are unchanged. This requires the candidate fix, not a new installed launcher.

The real Windows replay exposed a second holder: the waiting task supervisor had opened the shared database during Gateway pre-bootstrap. Its only job is to launch and wait for the real Gateway. Supervisor dispatch now happens before SQLite runtime, dotenv, database-engine selection, and Gateway environment selection. The late dispatch is removed.

- Original real Control UI failure: run `4adf1716-1734-4ed5-9eee-38083120fdfc`, two starts, schema 41→42 attempt, both blocked at the canonical WAL; the previous release served after rollback.
- Native Windows reproduction on Azure: a candidate with isolated state holds its own live and prepared file descriptors when replacement fails. No supervisor targets that isolated state.
- Product-API causal control on that lease:
  ```json
  {"file":"live.sqlite","nativeClosed":true}
  {"file":"next.sqlite","nativeClosed":true}
  {"beforeRetirement":"refused","code":"EPERM","syscall":"rename"}
  {"afterRetirement":"renamed"}
  ```
- One swap-owner regression checks descriptor release, new database contents, and the preserved old contents.
- AWS Linux run [`run_604041d54425b8c7e03ba43362072ac2`](https://crabbox.openclaw.ai/portal/runs/run_604041d54425b8c7e03ba43362072ac2): all 46 focused tests passed; the new regression fails on the base because the two descriptors remain retained (not a setup failure).
- Final-head T, next and crash full distribution builds, repository packing, and archive identity/SHA-256 checks passed in AWS run [`run_60ba70a2d1888c2d832aef9a1c6c3665`](https://crabbox.openclaw.ai/portal/runs/run_60ba70a2d1888c2d832aef9a1c6c3665). The corrected fixture declares its predecessor/runtime catalog inputs before generation.
- AWS run [`run_1af4700e569a25502494c17898d4839d`](https://crabbox.openclaw.ai/portal/runs/run_1af4700e569a25502494c17898d4839d): all 37 run-main tests passed; both new supervisor cases fail on clean main base `38f4f8fe018c` because the supervisor enters SQLite startup. Final parser consumer replay [`run_e6e98aa9e306b3332caadeefe5a8615c`](https://crabbox.openclaw.ai/portal/runs/run_e6e98aa9e306b3332caadeefe5a8615c) passes `cli-root-options` and `run-main`. Final-head local review and CI are owned by the lead.
- Fixed candidate-only Windows click on `3c150b5bfa`, run `36fec6f8-d822-409f-9f00-dfb6633e0d70`, still rolled back after two canonical-WAL `EPERM` failures. Native samples every two seconds show the old task supervisor retaining that WAL across candidate starts. Final head `69f58bc4e8` includes the early, database-free supervisor dispatch, its owner regression, and the preserved ordinary parser result.
- **Windows migrating UI update passed:** run `47295f8d-1098-407b-ac2d-160cdca32158`, committed on its first start, T+1 build `0322afdd098e` serving, shared schema 42 and the new STRICT table present. The startup log explicitly reports `by migration chain`. Across 491 native `openclaw.sqlite` handle samples, task-supervisor PID 404 has zero matching lines; other processes have 12,165 matching lines, confirming the sampler was active.
- **Linux chain-mode UI update passed:** run `137ae66a-ab63-4c64-af4b-9c90ee345278`, committed on its first start, T+1 serving schema 42 with the STRICT table. The startup journal explicitly reports `by migration chain`, not generic copy.
- The retained Doctor log explains the old fixture's generic-copy fallback: its schema-41 predecessor catalog was undeclared. Earlier Linux and macOS proof used that fallback. Those runs are not counted as chain-mode proof; the corrected final-head passes above are.

Crash rollback plus healthy recovery, and reboot-before-candidate recovery, cover paths this PR does not change; they run as follow-up proof after merge. Optional plugin maintenance refused old-Gateway-owned schema mutation in the passing runs; those advisory/plugin/channel checks are not claimed as passed.

The swap repair reuses admission retirement. The supervisor repair removes its unnecessary Gateway bootstrap. There is no new user-facing API, flag, configuration, retry, timer, or stored state.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit e2973f9)
Release adaptation: Place the custody regression before the baseline-only legacy registry fixture and integrate the startup contract in the baseline update docs. Retain the in-place update flow. Fold in only the supervisor dead-export cleanup and its test consumers from #204246.
Release companions: #204246 supervisor-only cleanup included; #204224 IPC release launcher and #204127 prepared-release plugin maintenance not applicable (src/update absent). #204275 early-main Git release check and #204253 reporting-only changes are independent, not required. #204230 and #204299 SHA mentions unrelated.
Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…tate database (#203578)

* fix(update): refuse migrating updates while a node service keeps the state open

Refs #203457

* docs(update): explain the node-service migration refusal

Refs #203457

* fix(update): match the node service's own state directory by filesystem identity

A default node service omits the state selector and must not inherit the updater's; path aliases name one directory. Refs #203457

* fix(update): refuse every activation while a node service keeps the state open

Update Doctor takes native exclusion of openclaw.sqlite on every activation, including patch updates without a schema change (#203457 reported 2026.11.5 -> 2026.11.6, both schema 36). Refuse whenever a running, kind-marked node service resolves to the same state directory, not only for pending migrations. Refs #203457

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 19fcba1)

Release adaptation: retain stable captureUpdateActivationSchemas destructuring and check node ownership only before first mutation, so Git revalidation after mutation does not report a pre-mutation refusal. Keep stable preparatory staging and check before any Gateway stop or installed activation.

Release adaptation: keep only the node-service docs and regression in the conflict regions; the separate Gateway migration admission (#203170) is not a prerequisite and remains outside the lane.

Companion audit: no later PR or SHA mentions through 665c286. #203497 (future package preparation) is not needed; the existing stable package/Git activation hooks already share the pre-stop boundary. #203981 is selected elsewhere and already present at lane base (f6ad5b5). Later #204275, #204253, #204224, #204127, #204094, #204095, #204151, #204054, #203994, #203990, #203917, #203959, #203926, #203925, #203915, #203914, #202934 and #203735 are not applicable as companions: independent Git, rollback, Doctor/recovery, plugin, output, docs and host changes do not supply or consume node-service admission.

Validation: two same-state activation cases red on f6ad5b5 (wrongly reached mutation), three controls passed; all 73 tests in update-command-execution.test.ts passed with the fix.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
)

Closes openclaw#204091

## What Problem This Solves

After an update rolls back, Settings → Updates and `openclaw update status` repeat the failure as `Failed: restarting` and `Failing check update (update-failed)`. The CLI also adds an unavailable-health notice above saved facts that say the Gateway started, which makes the outcome hard to read.

## User Impact

The rollback summary keeps the cause and the version still running, then gives one next step: Retry, followed by Report update failure if it fails again. Recorded verification and useful supplemental failures remain visible. Startup output stays in collapsed diagnostics.

Stored rows, JSON diagnostics, support-report content, update execution, and nonrollback reports stay unchanged. No schema, protocol, or configuration change.

## Why This Change Was Made

The shared report owner now omits the failed phase only when a recorded rollback reason already gives the cause. It keeps failed-phase details for other failures and rollbacks with no recorded reason. An unavailable health probe adds no normal rollback notice; positive current-health observations and all nonrollback health wording remain intact.

On current main, upgrades defer plugin maintenance until the candidate is ready. A downgrade can still record a plugin failure before a later rollback. That supplemental failure remains below the cause and recovery action.

<details>
<summary>Producer and reader trace</summary>

Original producers on main `6cb7f511cff5`:

- `src/infra/update-run-report.ts:487`: failed-phase label.
- `src/infra/update-run-report.ts:498–507`, through `src/infra/update-failure-facts-format.ts:46`: the phase's internal check line.
- `src/infra/update-run-report.ts:392–402` and `:562–569`: normal-report current-health wording.
- `src/infra/update-run-report.ts:640–644`: recovery advice followed the details.

The normal report is consumed by `src/cli/update-cli/status.ts:667–684` and `ui/src/app/update-run-projection.ts:77–83`. `src/infra/update-failure-report-prepare.ts:502–514` separately includes current-health context in Report update failure; that reader and its formatter are unchanged.

The existing repaired-update formatter moved to the existing failure-fact formatting owner, with identical output and its caller migrated. This keeps the report owner below its existing line cap without dropping the CLI's Phases/Total timeline or adding a new module.

</details>

## Evidence

- All three removed-line regressions fail on main for the intended unwanted text. The frozen base run reports 5 failed / 61 passed, including two recovery-order failures: [AWS red-on-main run](https://crabbox.openclaw.ai/portal/runs/run_a06e6c79ce907706a21a1275ad886e59).
- Local ClawSweeper reviewed final range `6cb7f511cff5..f1629fe`: patch is correct, zero findings, security cleared. That review used source-only context; real-path evidence is listed below. The three independent table cases are retained because this issue explicitly requests one test per removed line.
- A real Settings → Updates request on a Linux systemd user service reproduced the duplicate phase/check lines on built main `6cb7f511cff5`; CLI status also showed the unavailable-health sentence above recorded running facts. The unchanged hang fixture rolled back at the normal 20-minute trial ceiling and restored v2026.11.7.
- The restored reporter package was fully built and packed on AWS from head `bd9a5d981431`, shared-state schema 41. Its immutable tarball SHA-256 is `87b3ef2ff8f5a1ac1fe412945fc6223da8cfcf498af4c6299796c6eea0d9d41b`.
- On the built `bd9a5d981431` reporter, a real Settings → Updates request to an unchanged, qualified crash candidate completed two genuine starts after migration and rolled back. The normal report showed headline → Retry/Report → facts, with startup diagnostics collapsed: [AWS runtime evidence](https://crabbox.openclaw.ai/portal/runs/run_4f9519dcefd70a05d8a95f979fb1df60). The candidate was `2026.11.8-beta.3`, schema 42, SHA-256 `a9875749592188cf9adbbba0140a9d1af0d2caf556269fd0e52256064a7eafa5`; the reporter's starting schema was 41. The candidate was not rebuilt from this PR.
- Replaying the original rollback row on an isolated state copy also produced the fixed CLI report; the persisted row remained byte-identical. The copied row's UI selected its intended historical view, so it is not used as the normal-report UI proof.
- All 68 owner tests passed. Completed consumer shards passed 23 files / 479 tests. The combined 37-file run hit its 1,800-second command deadline during the CLI-process shard, with no observed assertion failures; remaining consumer coverage is deferred to PR CI, not claimed green: [AWS consumer run](https://crabbox.openclaw.ai/portal/runs/run_61a5ac6e484c21fb463a0a9a5e206388).
- Final targeted lint, format, and both service/update test typechecks passed: [AWS checks](https://crabbox.openclaw.ai/portal/runs/run_f2f54b0d5391a8b4eb239beb86f05833).
- Report update failure title/body bytes were identical between base and head, including its unavailable-health qualification: [AWS comparison](https://crabbox.openclaw.ai/portal/runs/run_ba38435be12c0f8468da93c2a8001143).
- Final commit `f1629feee395` differs from the runtime-tested `bd9a5d981431` only by two callback-variable renames in the relocated repair-summary helper. The rollback renderer is byte-for-byte unchanged. Build/runtime evidence is reused for that unchanged path; targeted static checks cover the final rename.
- All three task-owned AWS leases were released with `--wait`.

### Settings → Updates

Before — built main:

![Settings before: repeated failed phase and internal check](https://github.com/user-attachments/assets/cee82519-10c2-443b-b326-ca52f6ccea77)

After — real crash rollback, built reporter:

![Settings after: cause, one recovery step, and recorded facts](https://github.com/user-attachments/assets/0d0d329f-ae35-45b2-ada1-c5ec8f27a4eb)

### Captured `openclaw update status` output

These images show the command's unchanged captured stdout, not live Terminal windows.

![CLI before: three redundant lines](https://github.com/user-attachments/assets/3d5f5d8e-8047-44a3-9591-4ffd023bfff3)

![CLI after: one next step and recorded verification](https://github.com/user-attachments/assets/d9b11625-6ba7-49e2-bb25-2b036b9050e5)

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 24, 2026
## What Problem This Solves

An update could start successfully or roll back safely, but its saved result could still say it was interrupted. The old Gateway and startup recovery could publish conflicting terminal results before the serving Gateway read the launcher's trial.

Related: #203925, #204215, #204054, #204253, #203994, #204063, #203981.

## User Impact

The Gateway that is ready records the activation result from the trial, without an expired preparation lock overriding the same run. Existing report headlines, cause, next step, serving-version details, and the visible restarting phase are preserved. No schema or configuration change.

A reused PID alone no longer makes an update fail: without a matching trial, the recorded lock deadline remains authoritative.

## Why This Change Was Made

Preparation owns refusals, already-current results, and failures before publication. It checks for an active trial while holding the preparation lock, so a concurrent request cannot prepare across another request's newly published trial. Gateway readiness settles trial outcomes first, preserves active trial phases, and then settles only a dead lock whose row remains running. This removes the old Gateway's second terminal writer and startup's PID/uptime guess without comparing update correlation IDs. Restart is armed before its nonterminal progress write, and pending trials publish only after preparation bookkeeping.

The notice and report paths share a pure serving-version projection, without importing backend ledger mutation code into Control UI. Status rendering is retained unchanged. A complete LSP audit found production readers for every remaining report export, so none was deleted only to meet a line target.

Production code on this PR's six touched runtime files against integrated main `38e8b1e330a162ca7435dda27ca43d268fbc8017` (tests/support/harness excluded): **2,562 → 2,557 (−5)**. `tokei` measured 2,553 before the final four explicit no-op switch-case lines. The database-worker registry and synthetic-module test harness each add one test infrastructure line separately.

### Retained compatibility repair: #204322

The contributor's recovery code is unchanged. This is not a modern launcher-trial settlement path:

- [Eligibility](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-candidate-check-early-release.ts#L132-L176) is only moving-`main` Git updaters from November 17–19, with `releases/<id>/build` and the old `lib/node_modules/openclaw` link, when schemas must change or recovery is already in progress. Automatic recovery additionally requires a matching running Linux systemd user service. Current Git and npm/pnpm installs do not take it.
- Both terminal-recording functions have one production caller: the [`cli-oneshot` worker mode](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-migrated-finalize.worker.ts#L93-L108), which returns without entering Gateway startup. Gateway processes are separate children, not these workers.
- The [first ready check precedes opening the repair run](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-early-release-recovery.ts#L385-L404). The [second precedes finishing and cleanup](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-early-release-recovery.ts#L442-L454). Its success means the checkout and PATH repair is complete, not merely that a Gateway booted. Failure can also be recorded when the migrated release never becomes ready. There is no current v2 trial handoff for that repair operation, so moving its record to either ready event would lose or prematurely finish it.

**Published versions: none.** Published Git tags `v2026.11.5`, `v2026.10.33`, `v2026.11.6`, `v2026.11.7`, `v2026.11.8`, and `v2026.11.10-beta.1`–`.3` contain neither the early Git release-path module nor its runner. Earlier releases predate its introducing commit `6747b1ec5ae`; no published `v` tag lies between that commit and layout replacement `2ef6f7bade7`. The snapshots report a release-like version but belong to the moving `main` dev channel, not a published release.

**Deletion trigger:** retire this main-only recovery family and its early-layout check at the first regular stable cut after published `v2026.11.8` (stable/dev are distinct in [release policy](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/docs/reference/RELEASING.md#release-channels)). Already-started recovery units retain their own code until they finish.

## Evidence

- Base owner regression: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_31f06e4e9eeb9c36b954bef19ed05bad), base `a6893b815789aa305070547ad28a032c7c87500e` plus the regression. Both committed and rolled-back trials incorrectly became interrupted; the live reused-PID case also incorrectly failed (three expected failures, three passes).
- Consumer proof for the earlier shape: 1,264 tests passed across 65 files, with one skipped file. The only two failures were the new preparation tests running without the host SQLite broker; [both passed after project registration](https://crabbox.openclaw.ai/portal/runs/run_5f8278182e180f2864a4103697ac117a). Existing report and UI tests are included.
- Runtime patch head `48594843ded928e56eaf849ce6d156ce94065d2a`: [AWS proof](https://crabbox.openclaw.ai/portal/runs/run_494f1acc71169d7dd0313d8740a2b91c) passed **21 tests in both owner files and the session-identity ratchet**, including all three active-trial phases and the concurrent-publication race. No full consumer suite was rerun.
- Integrated head `285de72e5bc3b2d617e2646d6124dacc997b822c` merges main `38e8b1e330a162ca7435dda27ca43d268fbc8017` and documents the verified bridge exception without changing its recovery code. Its 21 owner tests and ratchet passed. Its subsequent build failed before either matrix case started; no matrix pass is claimed.
- The auth regression now uses real `prepareUpdate` with an injected lock-link failure, keeping the same failed-outcome assertions. Its [affected CI gate passed](https://github.com/openclaw/openclaw/actions/runs/45443743806/job/138623113263) on test-only commit `e8e54bfec0a09ea5d48d09f4638e0493711f7336`.
- Qualification source `0fb086108808764c16e6f354cf1557478d9ff974`: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_d9922f2b7283a54e4c847e4f2b4e5799) passed **101 owner/report tests**, the session-identity ratchet, and full T/T+1 builds including Control UI. Canonical healthy schema **41→42** passed: committed trial, succeeded ledger row, two fixture rows retained, target build serving (165.095 s whole scenario, not a measured outage).
- **Separate rollback-restore class RED, not addressed by this settlement cut:** the crash trial rolled back and `/readyz` returned success on schema41, but the actual SQL ledger row remained `running/restarting`; the serving Gateway could not read its restored database (`database disk image is malformed`) and deferred settlement. The CLI reported a read-only-worker rollback error. Trial, crash marker, actual ledger rows, schema/readiness summary, and bounded launcher/Gateway journal were captured. The rollback/state owner is investigating this separately; no unchanged retry or weakened assertion.
- The UI import leak was ours, not inherited. It is fixed by the unchanged projection moving to the pure notice module; [UI E2E 1/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992698), [2/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992590), and [Control UI performance](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651991532) now pass. No override is requested for UI or other owned failures.
- Local ClawSweeper runtime review: **patch is correct, zero findings**, exact head `48594843ded928e56eaf849ce6d156ce94065d2a`. Subsequent changes are the current-main integration, compatibility documentation, auth fixture, and browser-safe projection ownership described above.
- Final head `4f4c6a7bb68acde5a46edb40ab5a4e1c3405ec5e` differs from that qualification source only by the no-op exhaustive cases below and one fixture allowlist entry loading the **real** notice module instead of an unexpected-call stub. Outcome assertions remain unchanged. These are owned CI fixes; their checks must pass. The qualification remains behavior-equivalent.

```diff
 case "restoring":
   return;
+case undefined:
+case "committed":
+case "rolled-back":
+  break;
```

- Remaining CI planner fixture red is **MAIN-ALSO**, superseding the earlier ci-triage OURS label: [one clean-main AWS run](https://crabbox.openclaw.ai/portal/runs/run_266010a78ce4d0e864cfa9f696fd7f68) at `269f88452ac261cec1d8e99e7b740cedfe341161` reproduced the same expected-four/actual-five assertion (**173 passed, one failed**). No planner or fixture change is included. The [scoped maintainer override](#204700 (comment)) covers only that main failure and its aggregate gate. Exhaustive lint and compact-small-6 both pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
…w#204700)

## What Problem This Solves

An update could start successfully or roll back safely, but its saved result could still say it was interrupted. The old Gateway and startup recovery could publish conflicting terminal results before the serving Gateway read the launcher's trial.

Related: openclaw#203925, openclaw#204215, openclaw#204054, openclaw#204253, openclaw#203994, openclaw#204063, openclaw#203981.

## User Impact

The Gateway that is ready records the activation result from the trial, without an expired preparation lock overriding the same run. Existing report headlines, cause, next step, serving-version details, and the visible restarting phase are preserved. No schema or configuration change.

A reused PID alone no longer makes an update fail: without a matching trial, the recorded lock deadline remains authoritative.

## Why This Change Was Made

Preparation owns refusals, already-current results, and failures before publication. It checks for an active trial while holding the preparation lock, so a concurrent request cannot prepare across another request's newly published trial. Gateway readiness settles trial outcomes first, preserves active trial phases, and then settles only a dead lock whose row remains running. This removes the old Gateway's second terminal writer and startup's PID/uptime guess without comparing update correlation IDs. Restart is armed before its nonterminal progress write, and pending trials publish only after preparation bookkeeping.

The notice and report paths share a pure serving-version projection, without importing backend ledger mutation code into Control UI. Status rendering is retained unchanged. A complete LSP audit found production readers for every remaining report export, so none was deleted only to meet a line target.

Production code on this PR's six touched runtime files against integrated main `d0782abed304605ff96699085776fa447e3f4d54` (tests/support/harness excluded): **2,562 → 2,557 (−5)**. `tokei` measured 2,553 before the final four explicit no-op switch-case lines. The database-worker registry and synthetic-module test harness each add one test infrastructure line separately.

### Retained compatibility repair: openclaw#204322

The contributor's recovery code is unchanged. This is not a modern launcher-trial settlement path:

- [Eligibility](https://github.com/openclaw/openclaw/blob/d0782abed304605ff96699085776fa447e3f4d54/src/infra/update-candidate-check-early-release.ts#L132-L176) is only moving-`main` Git updaters from November 17–19, with `releases/<id>/build` and the old `lib/node_modules/openclaw` link, when schemas must change or recovery is already in progress. Automatic recovery additionally requires a matching running Linux systemd user service. Current Git and npm/pnpm installs do not take it.
- Both terminal-recording functions have one production caller: the [`cli-oneshot` worker mode](https://github.com/openclaw/openclaw/blob/d0782abed304605ff96699085776fa447e3f4d54/src/infra/update-migrated-finalize.worker.ts#L93-L108), which returns without entering Gateway startup. Gateway processes are separate children, not these workers.
- The [first ready check precedes opening the repair run](https://github.com/openclaw/openclaw/blob/d0782abed304605ff96699085776fa447e3f4d54/src/infra/update-early-release-recovery.ts#L385-L404). The [second precedes finishing and cleanup](https://github.com/openclaw/openclaw/blob/d0782abed304605ff96699085776fa447e3f4d54/src/infra/update-early-release-recovery.ts#L442-L454). Its success means the checkout and PATH repair is complete, not merely that a Gateway booted. Failure can also be recorded when the migrated release never becomes ready. There is no current v2 trial handoff for that repair operation, so moving its record to either ready event would lose or prematurely finish it.

**Published versions: none.** Published Git tags `v2026.11.5`, `v2026.10.33`, `v2026.11.6`, `v2026.11.7`, `v2026.11.8`, and `v2026.11.10-beta.1`–`.3` contain neither the early Git release-path module nor its runner. Earlier releases predate its introducing commit `c303d979c41`; no published `v` tag lies between that commit and layout replacement `8d7301e6086`. The snapshots report a release-like version but belong to the moving `main` dev channel, not a published release.

**Deletion trigger:** retire this main-only recovery family and its early-layout check at the first regular stable cut after published `v2026.11.8` (stable/dev are distinct in [release policy](https://github.com/openclaw/openclaw/blob/d0782abed304605ff96699085776fa447e3f4d54/docs/reference/RELEASING.md#release-channels)). Already-started recovery units retain their own code until they finish.

## Evidence

- Base owner regression: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_31f06e4e9eeb9c36b954bef19ed05bad), base `e48368087277475b47996815403ad103cd416089` plus the regression. Both committed and rolled-back trials incorrectly became interrupted; the live reused-PID case also incorrectly failed (three expected failures, three passes).
- Consumer proof for the earlier shape: 1,264 tests passed across 65 files, with one skipped file. The only two failures were the new preparation tests running without the host SQLite broker; [both passed after project registration](https://crabbox.openclaw.ai/portal/runs/run_5f8278182e180f2864a4103697ac117a). Existing report and UI tests are included.
- Runtime patch head `48594843ded928e56eaf849ce6d156ce94065d2a`: [AWS proof](https://crabbox.openclaw.ai/portal/runs/run_494f1acc71169d7dd0313d8740a2b91c) passed **21 tests in both owner files and the session-identity ratchet**, including all three active-trial phases and the concurrent-publication race. No full consumer suite was rerun.
- Integrated head `285de72e5bc3b2d617e2646d6124dacc997b822c` merges main `d0782abed304605ff96699085776fa447e3f4d54` and documents the verified bridge exception without changing its recovery code. Its 21 owner tests and ratchet passed. Its subsequent build failed before either matrix case started; no matrix pass is claimed.
- The auth regression now uses real `prepareUpdate` with an injected lock-link failure, keeping the same failed-outcome assertions. Its [affected CI gate passed](https://github.com/openclaw/openclaw/actions/runs/45443743806/job/138623113263) on test-only commit `e8e54bfec0a09ea5d48d09f4638e0493711f7336`.
- Qualification source `0fb086108808764c16e6f354cf1557478d9ff974`: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_d9922f2b7283a54e4c847e4f2b4e5799) passed **101 owner/report tests**, the session-identity ratchet, and full T/T+1 builds including Control UI. Canonical healthy schema **41→42** passed: committed trial, succeeded ledger row, two fixture rows retained, target build serving (165.095 s whole scenario, not a measured outage).
- **Separate rollback-restore class RED, not addressed by this settlement cut:** the crash trial rolled back and `/readyz` returned success on schema41, but the actual SQL ledger row remained `running/restarting`; the serving Gateway could not read its restored database (`database disk image is malformed`) and deferred settlement. The CLI reported a read-only-worker rollback error. Trial, crash marker, actual ledger rows, schema/readiness summary, and bounded launcher/Gateway journal were captured. The rollback/state owner is investigating this separately; no unchanged retry or weakened assertion.
- The UI import leak was ours, not inherited. It is fixed by the unchanged projection moving to the pure notice module; [UI E2E 1/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992698), [2/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992590), and [Control UI performance](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651991532) now pass. No override is requested for UI or other owned failures.
- Local ClawSweeper runtime review: **patch is correct, zero findings**, exact head `48594843ded928e56eaf849ce6d156ce94065d2a`. Subsequent changes are the current-main integration, compatibility documentation, auth fixture, and browser-safe projection ownership described above.
- Final head `4f4c6a7bb68acde5a46edb40ab5a4e1c3405ec5e` differs from that qualification source only by the no-op exhaustive cases below and one fixture allowlist entry loading the **real** notice module instead of an unexpected-call stub. Outcome assertions remain unchanged. These are owned CI fixes; their checks must pass. The qualification remains behavior-equivalent.

```diff
 case "restoring":
   return;
+case undefined:
+case "committed":
+case "rolled-back":
+  break;
```

- Remaining CI planner fixture red is **MAIN-ALSO**, superseding the earlier ci-triage OURS label: [one clean-main AWS run](https://crabbox.openclaw.ai/portal/runs/run_266010a78ce4d0e864cfa9f696fd7f68) at `0ef684ebc6840c92d9ae493cfe64b390acd90e49` reproduced the same expected-four/actual-five assertion (**173 passed, one failed**). No planner or fixture change is included. The [scoped maintainer override](openclaw#204700 (comment)) covers only that main failure and its aggregate gate. Exhaustive lint and compact-small-6 both pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
An update could start successfully or roll back safely, but its saved result could still say it was interrupted. The old Gateway and startup recovery could publish conflicting terminal results before the serving Gateway read the launcher's trial.

Related: #203925, #204215, #204054, #204253, #203994, #204063, #203981.

The Gateway that is ready records the activation result from the trial, without an expired preparation lock overriding the same run. Existing report headlines, cause, next step, serving-version details, and the visible restarting phase are preserved. No schema or configuration change.

A reused PID alone no longer makes an update fail: without a matching trial, the recorded lock deadline remains authoritative.

Preparation owns refusals, already-current results, and failures before publication. It checks for an active trial while holding the preparation lock, so a concurrent request cannot prepare across another request's newly published trial. Gateway readiness settles trial outcomes first, preserves active trial phases, and then settles only a dead lock whose row remains running. This removes the old Gateway's second terminal writer and startup's PID/uptime guess without comparing update correlation IDs. Restart is armed before its nonterminal progress write, and pending trials publish only after preparation bookkeeping.

The notice and report paths share a pure serving-version projection, without importing backend ledger mutation code into Control UI. Status rendering is retained unchanged. A complete LSP audit found production readers for every remaining report export, so none was deleted only to meet a line target.

Production code on this PR's six touched runtime files against integrated main `38e8b1e330a162ca7435dda27ca43d268fbc8017` (tests/support/harness excluded): **2,562 → 2,557 (−5)**. `tokei` measured 2,553 before the final four explicit no-op switch-case lines. The database-worker registry and synthetic-module test harness each add one test infrastructure line separately.

The contributor's recovery code is unchanged. This is not a modern launcher-trial settlement path:

- [Eligibility](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-candidate-check-early-release.ts#L132-L176) is only moving-`main` Git updaters from November 17–19, with `releases/<id>/build` and the old `lib/node_modules/openclaw` link, when schemas must change or recovery is already in progress. Automatic recovery additionally requires a matching running Linux systemd user service. Current Git and npm/pnpm installs do not take it.
- Both terminal-recording functions have one production caller: the [`cli-oneshot` worker mode](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-migrated-finalize.worker.ts#L93-L108), which returns without entering Gateway startup. Gateway processes are separate children, not these workers.
- The [first ready check precedes opening the repair run](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-early-release-recovery.ts#L385-L404). The [second precedes finishing and cleanup](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/src/infra/update-early-release-recovery.ts#L442-L454). Its success means the checkout and PATH repair is complete, not merely that a Gateway booted. Failure can also be recorded when the migrated release never becomes ready. There is no current v2 trial handoff for that repair operation, so moving its record to either ready event would lose or prematurely finish it.

**Published versions: none.** Published Git tags `v2026.11.5`, `v2026.10.33`, `v2026.11.6`, `v2026.11.7`, `v2026.11.8`, and `v2026.11.10-beta.1`–`.3` contain neither the early Git release-path module nor its runner. Earlier releases predate its introducing commit `6747b1ec5ae`; no published `v` tag lies between that commit and layout replacement `2ef6f7bade7`. The snapshots report a release-like version but belong to the moving `main` dev channel, not a published release.

**Deletion trigger:** retire this main-only recovery family and its early-layout check at the first regular stable cut after published `v2026.11.8` (stable/dev are distinct in [release policy](https://github.com/openclaw/openclaw/blob/38e8b1e330a162ca7435dda27ca43d268fbc8017/docs/reference/RELEASING.md#release-channels)). Already-started recovery units retain their own code until they finish.

- Base owner regression: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_31f06e4e9eeb9c36b954bef19ed05bad), base `a6893b815789aa305070547ad28a032c7c87500e` plus the regression. Both committed and rolled-back trials incorrectly became interrupted; the live reused-PID case also incorrectly failed (three expected failures, three passes).
- Consumer proof for the earlier shape: 1,264 tests passed across 65 files, with one skipped file. The only two failures were the new preparation tests running without the host SQLite broker; [both passed after project registration](https://crabbox.openclaw.ai/portal/runs/run_5f8278182e180f2864a4103697ac117a). Existing report and UI tests are included.
- Runtime patch head `48594843ded928e56eaf849ce6d156ce94065d2a`: [AWS proof](https://crabbox.openclaw.ai/portal/runs/run_494f1acc71169d7dd0313d8740a2b91c) passed **21 tests in both owner files and the session-identity ratchet**, including all three active-trial phases and the concurrent-publication race. No full consumer suite was rerun.
- Integrated head `285de72e5bc3b2d617e2646d6124dacc997b822c` merges main `38e8b1e330a162ca7435dda27ca43d268fbc8017` and documents the verified bridge exception without changing its recovery code. Its 21 owner tests and ratchet passed. Its subsequent build failed before either matrix case started; no matrix pass is claimed.
- The auth regression now uses real `prepareUpdate` with an injected lock-link failure, keeping the same failed-outcome assertions. Its [affected CI gate passed](https://github.com/openclaw/openclaw/actions/runs/45443743806/job/138623113263) on test-only commit `e8e54bfec0a09ea5d48d09f4638e0493711f7336`.
- Qualification source `0fb086108808764c16e6f354cf1557478d9ff974`: [AWS run](https://crabbox.openclaw.ai/portal/runs/run_d9922f2b7283a54e4c847e4f2b4e5799) passed **101 owner/report tests**, the session-identity ratchet, and full T/T+1 builds including Control UI. Canonical healthy schema **41→42** passed: committed trial, succeeded ledger row, two fixture rows retained, target build serving (165.095 s whole scenario, not a measured outage).
- **Separate rollback-restore class RED, not addressed by this settlement cut:** the crash trial rolled back and `/readyz` returned success on schema41, but the actual SQL ledger row remained `running/restarting`; the serving Gateway could not read its restored database (`database disk image is malformed`) and deferred settlement. The CLI reported a read-only-worker rollback error. Trial, crash marker, actual ledger rows, schema/readiness summary, and bounded launcher/Gateway journal were captured. The rollback/state owner is investigating this separately; no unchanged retry or weakened assertion.
- The UI import leak was ours, not inherited. It is fixed by the unchanged projection moving to the pure notice module; [UI E2E 1/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992698), [2/2](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651992590), and [Control UI performance](https://github.com/openclaw/openclaw/actions/runs/45451818804/job/138651991532) now pass. No override is requested for UI or other owned failures.
- Local ClawSweeper runtime review: **patch is correct, zero findings**, exact head `48594843ded928e56eaf849ce6d156ce94065d2a`. Subsequent changes are the current-main integration, compatibility documentation, auth fixture, and browser-safe projection ownership described above.
- Final head `4f4c6a7bb68acde5a46edb40ab5a4e1c3405ec5e` differs from that qualification source only by the no-op exhaustive cases below and one fixture allowlist entry loading the **real** notice module instead of an unexpected-call stub. Outcome assertions remain unchanged. These are owned CI fixes; their checks must pass. The qualification remains behavior-equivalent.

```diff
 case "restoring":
   return;
+case undefined:
+case "committed":
+case "rolled-back":
+  break;
```

- Remaining CI planner fixture red is **MAIN-ALSO**, superseding the earlier ci-triage OURS label: [one clean-main AWS run](https://crabbox.openclaw.ai/portal/runs/run_266010a78ce4d0e864cfa9f696fd7f68) at `269f88452ac261cec1d8e99e7b740cedfe341161` reproduced the same expected-four/actual-five assertion (**173 passed, one failed**). No planner or fixture change is included. The [scoped maintainer override](#204700 (comment)) covers only that main failure and its aggregate gate. Exhaustive lint and compact-small-6 both pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit d000ca3)

Release adaptation: conflicts in docs/install/updating.md, src/update/run.ts resolved by applying the source change over release-only hunks; source hunks verified unchanged (whitespace-insensitive).

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

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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.

update: rollback report still lists lines that do not help the user

1 participant