Skip to content

fix(update): backport safe recovery completion - #181503

Merged
RomneyDa merged 30 commits into
extended-stable/2026.9.33from
tideclaw/extended-stable-181166-181307
Oct 23, 2026
Merged

RomneyDa merged 30 commits into
extended-stable/2026.9.33from
tideclaw/extended-stable-181166-181307

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

Extended-stable adaptation

This targets the older extended-stable/2026.9.33 update architecture. It preserves that branch's stale-evidence retention path, layers intact-lease safe settlement onto its existing explicit repair implementation, and keeps unsafe/live-owned publication states blocked.

Validation

  • pnpm tsgo --noEmit
  • 95 focused update, package activation, and pending-recovery tests
  • 44 sealed managed-service handoff triage and terminal-result tests

Backports #181166 and #181307.

@clawsweeper

clawsweeper Bot commented Oct 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 cli CLI command changes size: M commands Command implementations agents Agent runtime and tooling size: L and removed size: M labels Oct 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR backports safe interrupted-publication settlement, preserves verified activation after recognized maintenance failures, and records managed-service recovery observations.

Example: A Git-to-package update verifies the Gateway but cannot remove /home/alice/.local/bin/openclaw.

  • Before: Wrapper retirement marks the update failed and enters failure finalization.
  • After: The verified update succeeds with a maintenance warning.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful backport with appropriate owner reuse and focused regression coverage, limited by actionable warning copy and unproven upgrade compatibility for retained recovery state.
Proof confidence 🦐 gold shrimp (3/6) Maintainer authorship exempts the ordinary contributor proof gate; the supplied backport validation exercises finalization and sealed-helper tests, while the linked upstream CLI run exercises a different branch and publication phase.
Patch quality 🐚 platinum hermit (4/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An interrupted package update can block subsequent updates, and optional maintenance can report failure after the Gateway was verified successfully.
Reason: The maintainer-authored backport restores useful recovery behavior without adding configuration, a public API, or a competing lifecycle owner.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: it is a useful, maintainer-directed extended-stable backport with one actionable warning-guidance defect.

Priority: P2
Reviewed head: e73a0bd74e605eac01f8061c773ee9efd66f3a4c

Before merge

  • Give the successful maintenance warning a concrete next action (P3) - After verified activation, a failed wrapper inspection or unlink now produces a successful update with only “maintenance needs attention” and the filesystem error. For example, if /home/alice/.local/bin/openclaw cannot be removed, subsequent CLI invocations can still select the old checkout. Preserve successful Gateway activation, but tell the operator how to inspect and reconcile the named launcher and confirm which installation the CLI resolves to; the changed message currently provides no next action.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P3] Give the successful maintenance warning a concrete next action — src/cli/update-cli/update-command-terminal-publication.ts:119

Tests

  • Missing end-to-end proof: No backport-specific published-driver upgrade demonstrates interrupted-publication recovery and post-verification maintenance failure with existing settings and data intact, and the added backport regressions are not shown failing on their base.
Agent review details

How this fits together

The updater admits package recovery, coordinates installation and Gateway activation, and publishes terminal results and recovery diagnostics through the existing update ledger.

flowchart TD
A[CLI or Control UI update] --> B[Package recovery admission]
B --> C[Existing executor lease]
C --> D[Publication repair owner]
D --> E[Installation and Gateway verification]
E --> F[Maintenance classification]
F --> G[Terminal ledger and recovery diagnostics]
Loading

Technical review

Best possible solution:

Retain the existing recovery owners and verified-success behavior, with an actionable warning for an obsolete launcher that could not be removed.

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

The pinned base routes late maintenance failures into failure finalization and requires explicit settlement for intact interrupted preparations; source and supplied regressions establish these paths, but this read-only review executed no target code.

Is this the best way to solve the issue?

Reusing the existing publication repair owner and invocation-local verification fact is a focused solution that preserves the older branch’s stale-evidence retention contract.

Full review comments:

  • [P3] Give the successful maintenance warning a concrete next action — src/cli/update-cli/update-command-terminal-publication.ts:119
    After verified activation, a failed wrapper inspection or unlink now produces a successful update with only “maintenance needs attention” and the filesystem error. For example, if /home/alice/.local/bin/openclaw cannot be removed, subsequent CLI invocations can still select the old checkout. Preserve successful Gateway activation, but tell the operator how to inspect and reconcile the named launcher and confirm which installation the CLI resolves to; the changed message currently provides no next action.
    Confidence: 0.96

Overall correctness: patch is correct
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Post-update exception classification changes intended behavior with a stated reason (0335033: Separate terminal publication from operational completion while preserving completed facts during concurrent SQLite writes.)
  • Existing explicit publication settlement changes intended behavior with a stated reason (d53dbcf: Carry compatible recovery and state-preservation behavior into extended-stable; this PR deliberately enables eligible automatic callers of that existing repair owner.)
  • Stale recovery evidence retention keeps the original intent (cb4cd5d: Retain verified recovery evidence when its executor database disappears or changes identity, while refusing corrupted custody.)
  • Managed-service recovery outcome reporting keeps the original intent (6169ba0: Preserve the original update outcome and record unavailable or failed recovery without claiming an unverified Gateway is down.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/cli/update-cli/update-command-post-update.test.ts --maxWorkers=1
  • git diff --check

What I checked:

  • Backport remains distinct from main: The live PR targets extended-stable/2026.9.33, retains the reviewed head, and is mergeable; its MEMBER author independently prevents automatic closure. (e73a0bd74e60)
  • Existing repair and authority owners reused: Settlement verifies the selected generation, acquires a fresh executor against the recorded physical lease database, rechecks the journal, and carries current-owner assertions into publication and retirement. (src/infra/package-update-activation.ts:289, e73a0bd74e60)
  • Preview verifies retained evidence: Unlike the preview defect discussed on the upstream settlement PR, this adaptation always runs the existing publication preflight before returning its dry-run settlement. (src/infra/package-update-activation.ts:273, e73a0bd74e60)
  • Actionable warning defect: The new successful-result warning adds a maintenance-needs-attention prefix, while the wrapper owner supplies only the failed inspection or removal and its path; neither supplies a recovery action. (src/cli/update-cli/update-command-terminal-publication.ts:119, e73a0bd74e60)
  • Recovery observations remain diagnostic: The added observation probes the original generation without restarting it, and terminal publication still checks the managed lease before invoking the installed-runtime writer. (src/infra/update-managed-service-handoff.ts:300, e73a0bd74e60)
  • Supplied validation scope: The complete backport body reports typechecking and focused tests; its discussion contains status comments rather than a published-driver upgrade result. (e73a0bd74e60)

Likely related people:

  • Peter Steinberger: Raw commit d780fdc adds src/cli/update-cli/update-command-post-update.ts:74 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d780fdc672d3; files: src/cli/update-cli/update-command-post-update.ts)
  • Vincent Koc: Raw commit c9418b8 adds src/infra/update-managed-service-handoff.ts:30 relative to its recorded parents. This identifies committer metadata, not feature responsibility or a PR merger. (role: source-line committer; confidence: medium; commits: c9418b8afd3e; files: src/infra/update-managed-service-handoff.ts)

PR surface

Source +192, Tests +243. Total +435 across 24 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 216 24 +192
Tests 18 305 62 +243
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 521 86 +435

Labels

Label changes:

  • add P2: This backport improves interrupted-update recovery and prevents false failure after verified activation on the extended-stable line.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This backport improves interrupted-update recovery and prevents false failure after verified activation on the extended-stable line.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Show a published-driver upgrade into the backport candidate with retained recovery records, settings, and user data preserved.

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 October 23, 2026, 6:24 AM ET / 10:24 UTC.

roboclaw-bot and others added 14 commits October 23, 2026 11:02
Backport the relevant extended-stable behavior from #181166 and #181307.

Co-authored-by: RomneyDa <[email protected]>
@RomneyDa
RomneyDa force-pushed the tideclaw/extended-stable-181166-181307 branch from dc73070 to 82a1b4e Compare October 23, 2026 11:03
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Oct 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Oct 23, 2026
roboclaw-bot and others added 5 commits October 23, 2026 12:46
Use provider-qualified picker values and disable unrelated plugin discovery in the synthetic catalog Gateway. Preserve publication, failure recovery, and draft-retention assertions. The real Gateway case, four lifecycle siblings, changed checks, and independent review pass.

(cherry picked from commit 70fc940)
(cherry picked from commit e66cb64ac2b67a5e836d9673bda62c296d5bcac1)
Co-authored-by: RomneyDa <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling labels Oct 23, 2026
@RomneyDa
RomneyDa merged commit ccf7b23 into extended-stable/2026.9.33 Oct 23, 2026
7 checks passed
@RomneyDa
RomneyDa deleted the tideclaw/extended-stable-181166-181307 branch October 23, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui cli CLI command changes commands Command implementations docker Docker and sandbox tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants