Skip to content

[2026.10.9] retry guarded package rollback and report recovery - #187277

Merged
RomneyDa merged 2 commits into
release/2026.10.9from
backport/rollback-stable-20261029
Oct 29, 2026
Merged

RomneyDa merged 2 commits into
release/2026.10.9from
backport/rollback-stable-20261029

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Source and scope

  • Upstream fix(update): keep failed npm rollback from stranding the installed package root #185160, exact source commit: d091621; original author: weiqinl.
  • Target: release/2026.10.8. Source is on main; actual release code was inspected and the fix is absent (not merely an ancestry check).
  • Independently backported the cohesive source fix, not the aggregate scope-reduction proof commit.
  • Only package-update filesystem rollback: share bounded Windows rename retries with authority/identity guards; report exact retained-package recovery paths. No native plugin changes.
  • No lockfile, dependency manifest, toolchain, release workflow, or release-validation source changes.

Validation

PASS: node scripts/test-projects.mts src/infra/package-update-filesystem.test.ts --testNamePattern "names the retained backup|stops Windows rollback rename retries" (3/3).
PASS: scoped formatting check and git diff --check.
Full filesystem suite is not green (one launcher-sync test failure); full swap/subprocess integration also remains a gate after local worker-build/dependency failures. No unrelated source workaround was applied.
Validation used own local node_modules link directories, release-pinned TypeScript (and fs-safe for rollback), and borrowed installed tools (Vitest 5.0.5); no dependency or toolchain source was changed.

Remaining gates — draft only

  • Real Windows acceptance (Linux injected-denial tests do not replace it).
  • Full independent/context-aware review: unresolved reviewer capacity is not bypassed.
  • Hosted checks and normal release-owner approval.

Not ready for review, merge, or release. No release shipped.

shakkernerd and others added 2 commits October 27, 2026 13:12
Passive macOS Gateway stops now preserve an absent current-profile service definition without invoking uninstall, while explicit low-level ghost recovery remains available.

Release adaptation: the 2026.10.8 backport of #180390 removed the absent-plist
guard from GatewayLaunchAgentManager's disable path without main's follow-up,
so every passive stop with no LaunchAgent plist ran `openclaw gateway uninstall`
(mac validation: GatewayProcessManagerTests "pause preserves unretainable
services" [absent]). Stable has no migration-pending custody or `.authority`
wrapper, so the guard checks `custody.definition.plist` directly. Mac-only
post-tag fix; npm, Docker and Linux bytes are unaffected.

(cherry picked from commit cb10ec4)
…ckage root (#185160)

A denied rollback publication or compensation rename could leave the installed package root missing, so the CLI and managed Gateway could not start and recovery required manually renaming retained backup directories. Rollback renames now retry transient Windows denials with authority and identity checks, and a stranded live root reports the exact move that restores a bootable installation.

Fixes #184889

Backport only package-update rollback filesystem and regression coverage; exclude unrelated native plugin work and all dependency/toolchain/release validation changes.

Upstream-source: d091621
(cherry picked from commit d091621)

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 29, 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.

@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR backports guarded Windows package rollback retries and exact recovery-path diagnostics to release/2026.10.8.

Example: Windows temporarily denies restoring package 1.0.0 after rejecting an update to 2.0.0.

  • Before: Publication and compensation each fail immediately, potentially leaving node_modules/openclaw missing.
  • After: Transient denials receive bounded retries; exhausted restoration identifies the retained packages and their recovery destination.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-consistent backport with useful upstream native evidence, but release-specific acceptance and validation remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
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 failed npm update can leave the CLI unavailable and prevent the Gateway from restarting.
Reason: The maintainer-authored backport carries an accepted upstream repair into an affected release line without expanding its product scope.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored backport repairs a verified release-line rollback defect, and no introduced code defect was found.

Priority: P0
Reviewed head: a4a89e842547cfd8f02a7b8a91259902268e6fbc

Before merge

  • Complete next step - The PR owner should classify the launcher-sync failure against the pinned base and complete the declared filesystem and swap/subprocess validation with the release-pinned environment.

Findings

None.

Tests

  • Missing end-to-end proof: Release-branch native Windows acceptance and a published-driver × candidate upgrade with actual settings and data intact remain unshown; this backport also supplies no base-failing regression run.
Agent review details

How this fits together

The installed updater delegates package restoration to the swap transaction and filesystem owner, which return rollback status, retained artifacts, and recovery instructions.

flowchart TD
  A[Installed updater] --> B[Package swap transaction]
  B --> C[Package filesystem owner]
  C --> D[Guarded Windows rename retries]
  D --> E[Live and retained package directories]
  C --> F[Rollback status and recovery instructions]
Loading

Technical review

Best possible solution:

Use this focused backport, with visible Doctor recovery for already-stranded installations considered separately.

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

The released source establishes the missing-root failure when publication and compensation both reject; upstream native Windows traces corroborate that path, and this review executed no target code.

Is this the best way to solve the issue?

Sharing the established bounded retry owner is the smallest complete repair for transient locks and preserves the intentional exact-object restoration contract under permanent failure.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Windows package-root rename retries keeps the original intent (b5555b0: Retry transient Windows locks with bounded backoff, authority and identity revalidation, and no live-tree copy/delete fallback.)
  • Exact-object rollback publication and compensation keeps the original intent (000af98: Restore verified retained package objects and preserve the candidate when publication fails.)
  • Original-owner refusal during rollback keeps the original intent (654eb84: Stop protected filesystem compensation after the original executor loses authority rather than adopting a successor owner.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced patch: The patch extracts the existing retry policy into one shared owner and applies it to rollback displacement, publication, and compensation while retaining authority and identity checks. (src/infra/package-update-filesystem.ts:161, a4a89e842547)
  • Released failure path: The v2026.10.8 source still attempts backup publication and candidate compensation once each, without the backported retries or missing-root recovery instructions. (src/infra/package-update-filesystem.ts, dc2523e5a5c7)
  • Current-main implementation: Current main contains the upstream rollback repair; its later cross-parent activation enhancement does not make this release-line backport redundant. (src/infra/package-update-filesystem.ts:534, 2e94b0988ea1)
  • Upstream native Windows evidence: The successful Windows evidence run and decoded workflow exercise the real swap transaction with OS-denied renames, supporting transient recovery and persistent-failure diagnostics; synthetic package fixtures and a separately hashed settings directory do not establish an installed stable-release upgrade. (.github/workflows/pr-185160-win-evidence.yml, 9992380391b3)
  • Author-declared release gates: The current body explicitly retains native Windows acceptance, full swap/subprocess validation, and draft status; it reports a launcher-sync test failure without a base comparison establishing its cause. (a4a89e842547)
  • Policy and provenance: Root policy was applied; no additional ancestor AGENTS.md, maintainer-notes directory, or pr-simplify skill governs these paths. Path history, current-main blame, and original merged PR descriptions establish the retained recovery intent; some deeper history operations encountered unavailable objects. (AGENTS.md, 2e94b0988ea1)

PR surface

Source +48, Tests +218. Total +266 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 56 8 +48
Tests 2 219 1 +218
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 275 9 +266

Root-cause cluster

Relationship: same_root_cause
Canonical: #185160
Summary: This is the release-line backport of the merged main-branch repair for the same missing-package-root rollback failure.

Members:

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

Labels

Label changes:

  • add P0: The release-line failure can leave the canonical package root missing, preventing both CLI startup and managed Gateway restart until manual filesystem recovery.
  • 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:

  • P0: The release-line failure can leave the canonical package root missing, preventing both CLI startup and managed Gateway restart until manual filesystem recovery.
  • 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.

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 29, 2026, 12:30 AM ET / 04:30 UTC.

@RomneyDa
RomneyDa marked this pull request as ready for review October 29, 2026 04:33
@RomneyDa
RomneyDa changed the base branch from release/2026.10.8 to release/2026.10.9 October 29, 2026 05:08
@openclaw-barnacle openclaw-barnacle Bot added the app: macos App: macos label Oct 29, 2026
@RomneyDa
RomneyDa merged commit dfef3a7 into release/2026.10.9 Oct 29, 2026
197 checks passed
@RomneyDa
RomneyDa deleted the backport/rollback-stable-20261029 branch October 29, 2026 05:10
@RomneyDa RomneyDa changed the title [backport release/2026.10.8] retry guarded package rollback and report recovery [2026.10.9] retry guarded package rollback and report recovery Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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