Repository navigation
[2026.10.10-beta.5] retry guarded package rollback and report recovery - #187274
Conversation
…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]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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 optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete bypass was found, but delayed rollback effects need final-effect revocation proof. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +48, Tests +218. Total +266 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 29, 2026, 12:31 AM ET / 04:31 UTC. |
Source and scope
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
Not ready for review, merge, or release. No release shipped.