Skip to content

[2026.10.10-beta.5] retry guarded package rollback and report recovery - #187274

Merged
RomneyDa merged 1 commit into
release/2026.10.10from
backport/rollback-beta-20261029
Oct 29, 2026
Merged

RomneyDa merged 1 commit into
release/2026.10.10from
backport/rollback-beta-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.10. 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.

…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 P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR backports guarded Windows rollback rename retries and diagnostics naming retained package recovery paths.

Example: Restoring package 1.0.0 after rejecting 2.0.0 encounters two transient Windows EPERM rename failures.

  • Before: Rollback fails immediately and may leave the installed package root missing.
  • After: The third attempt restores 1.0.0; exhausted publication and compensation retries identify the retained directories and destination.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused source backport appears sound, but release-branch acceptance and final-effect authority evidence remain incomplete.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed update rollback can remove the installed package entrypoint and leave recovery paths unclear.
Reason: The maintainer-authored backport restores a concrete recovery invariant using an established retry policy without adding user settings or changing the persisted format.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this maintainer-authored draft backports a useful mainline fix that remains absent from its release target; no definite introduced code defect was identified.

Priority: P1
Reviewed head: dedb1dba6cfade56c4ce810181dfd9352c817ab3

Before merge

  • Add real behavior proof - Authority-chain proof required: exercise this release backport through the actual update executor owner, showing allowed Windows rollback recovery and rejection of a revoked executor before any subsequent publication or compensation rename. Upstream real OS-denial traces support the shared implementation, but supplied revocation coverage uses injected assertions and mocked rename failures; this draft also explicitly leaves native Windows acceptance and full integration validation open. Its synthetic 1.0.0-to-2.0.0 trace does not establish an actual latest-stable upgrade. Provide redacted logs or terminal output without credentials, IPs, or non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - No concrete bypass was found, but delayed rollback effects need final-effect revocation proof.
  • Resolve merge risk - Before merge, the PR owner must establish that an executor revoked during Windows rollback backoff cannot perform a later publication or compensation rename through the release updater's actual authority owner.

Findings

None.

Tests

  • Missing end-to-end proof: Release-backport evidence still needs native Windows rollback acceptance, real-owner revocation rejection before final rename effects, an actual latest-stable upgrade preserving settings and data, and completion or attribution of the reported filesystem and swap/subprocess validation failures.
Agent review details

How this fits together

The installed updater delegates package restoration to the filesystem owner, which receives retained package paths and an executor assertion and returns either restored package availability or a recovery error.

flowchart TD
  A[Installed updater] --> B[Package swap transaction]
  B --> C[Rollback filesystem owner]
  C --> D[Authority and identity checks]
  D --> E[Bounded Windows rename retries]
  E --> F[Restored package or recovery diagnostic]
Loading

Technical review

Best possible solution:

Retain this focused backport and complete release-branch acceptance while preserving exact-object restoration, existing authority ownership, and retained recovery material.

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

The pinned release source shows that failed publication followed by failed compensation leaves liveRoot absent; upstream real Windows traces substantiate the denial mechanism, while current main already contains the repair.

Is this the best way to solve the issue?

Sharing the existing bounded rename owner is a focused repair that preserves exact-object rollback and avoids an unsafe copy fallback.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Prove revocation at the filesystem boundary (recommended)
    The PR owner should exercise the release updater's actual authority owner, revoke its executor during rename backoff, and show that neither publication nor compensation performs subsequent filesystem I/O.
  2. Keep the backport draft
    The release owner can defer inclusion while the backport's declared acceptance gates remain unresolved.

Provenance checked

  • Windows package-root retries keeps the original intent (b5555b0: Recover from transient Windows backup locks while retaining authority checks, exact identities, bounded retries, and POSIX single-attempt behavior.)
  • Compatible exact-object package rollback keeps the original intent (000af98: Restore only verified compatible package generations and preserve uncertain state rather than claim database migration reversal.)
  • Rollback authority retention keeps the original intent (654eb84: Carry the original executor through rollback and stop compensation after ownership refusal.)
  • Native-platform test isolation keeps the original intent (d7b0293: Select rename policy independently without spoofing process.platform and breaking fs-safe's native filesystem staging.)

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete bypass was found, but delayed rollback effects need final-effect revocation proof.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b5555b0 adds src/infra/package-update-filesystem.ts:118 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b5555b0bd9ed; files: src/infra/package-update-filesystem.ts)

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

Labels

Label changes:

  • add P1: Failed package rollback can leave both the CLI and managed Gateway unable to start, and the release target still lacks the repair.
  • add merge-risk: 🚨 security-boundary: Rollback retries extend filesystem effects across awaited delays; release-owner authority must reject a revoked executor before subsequent renames.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P1: Failed package rollback can leave both the CLI and managed Gateway unable to start, and the release target still lacks the repair.
  • merge-risk: 🚨 security-boundary: Rollback retries extend filesystem effects across awaited delays; release-owner authority must reject a revoked executor before subsequent renames.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Show allowed rollback and revoked-executor rejection through the release updater's actual authority owner before final filesystem effects.
  • Complete native Windows backport acceptance and a latest-stable upgrade with settings and data intact.
  • Resolve or attribute the reported launcher-sync failure and complete the swap/subprocess validation.

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:31 AM ET / 04:31 UTC.

@RomneyDa
RomneyDa marked this pull request as ready for review October 29, 2026 04:32
@RomneyDa RomneyDa changed the title [backport release/2026.10.10] retry guarded package rollback and report recovery [2026.10.10-beta.5] retry guarded package rollback and report recovery Oct 29, 2026
@RomneyDa
RomneyDa merged commit e7ecead into release/2026.10.10 Oct 29, 2026
197 of 202 checks passed
@RomneyDa
RomneyDa deleted the backport/rollback-beta-20261029 branch October 29, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants