Repository navigation
fix(update): retain authority through fallback publication - #188034
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR carries executor authority through fallback package and launcher publication and records completed moves before later cleanup failures. Example: An update from package version 1.0.0 to 2.0.0 loses forward authority while preserving local edits.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current update-authority gap, preserves existing recovery behavior, and has no concrete introduced defect identified in this review. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe package swap owner receives a staged installation and executor assertion, delegates filesystem publication to existing helpers, and returns installation status plus retained rollback operations. flowchart TD
A[Update executor] --> B[Package swap owner]
B --> C[Filesystem publication owner]
C --> D[fs-safe guarded moves]
D --> E[Package and launchers]
D --> F[Publication callbacks]
F --> B
B --> G[Independent rollback executor]
Technical reviewBest possible solution: Retain the existing swap and filesystem owners, carrying live authority to publication and recording committed effects before fallible cleanup. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the missing authority propagation, and the PR supplies focused real-filesystem regressions with reported base-red/head-green results; this review did not execute them. Is this the best way to solve the issue? The patch fixes the owning boundary by reusing existing guarded operations and commit callbacks, while preserving independent rollback authority and Windows exact-rename behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d968c83dba6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +44, Tests +210, Other +2. Total +256 across 5 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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, 10:10 PM ET / October 30, 2026, 02:10 UTC. |
|
Merged via squash auto-merge.
|
Backport #188034 and its regression coverage. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Unjournaled package updates could publish packages or launchers after their forward executor was revoked. Copy-fallback moves could publish a backup or candidate and then fail before the swap owner recorded that fact.
User Impact
Forward admission now reaches POSIX rename/copy fallback, canonical symlink activation, native backup cleanup, and launcher publication. Published backups register compensation before later errors; published candidates report the correct active root. Rollback keeps its independent executor authority.
Why This Change Was Made
Reuse fs-safe's existing guarded publication callbacks and record ownership facts at commit time. Launcher restoration moves into the existing filesystem owner without changing its behavior. Windows bounded exact-rename retries and npm backup EXDEV refusal remain unchanged. No dependency, configuration, or persistence surface is added.
Evidence
Production delta: +44 lines to carry authority and record publication at the owning boundary. Tests: +210 lines with a dedicated allocation.