Repository navigation
fix(plugins): avoid repeating failed update rollbacks - #191182
Conversation
|
🦞👀 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 maintainer review before merge. What this changesThis PR removes duplicate plugin-update rollback handling and leaves settlement with the transaction’s admitting owner. Example: Updating demo to 1.2.4 encounters a peer-link repair error followed by a backup restoration error.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a confirmed rollback ownership defect still present on main; no actionable introduced code defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe plugin updater consumes install records and installer transactions, repairs host links, and returns updated records and outcomes to the caller that publishes and settles the update. flowchart TD
A[CLI or Doctor caller] --> B[Plugin updater]
B --> C[Installer transaction]
C --> D[Admitting owner transaction sink]
B --> E[Host link repair]
E --> F[Summary or original failure]
F --> D
D --> G[Commit or rollback]
Technical reviewBest possible solution: Retain install transactions only in the admitting owner’s sink and let that owner settle each failed operation once. Do we have a high-confidence way to reproduce the issue? Source tracing establishes the duplicate direct rollback and premature deferred settlement paths; no runtime reproduction was performed during this read-only review. Is this the best way to solve the issue? The patch is the smallest complete ownership repair: it reuses transaction retention, removes the competing rollback path, and preserves migration metadata and error aggregation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dc97a18463c3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -45, Tests +54, Other +1. Total +10 across 6 files. Added test files: 0. View PR surface stats
Review metrics
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 November 2, 2026, 10:57 AM ET / 15:57 UTC. |
|
Merged via squash.
|
* fix(plugins): avoid repeating failed update rollbacks * chore(plugins): retire removed updater assertion allowance
What Problem This Solves
Plugin updates can attempt a failed rollback twice after peer-link repair fails, or roll back a deferred install before its caller owns settlement.
User Impact
The admitting transaction owner now settles the failure. The original peer-link error and rollback errors remain visible. No config migration or operator action is required.
Why This Change Was Made
Remove the summary's parallel transaction list and rollback catch. Reuse the existing transaction-retention helper and keep install-owner migrations in their existing map.
Production: −45 lines. Tests: +54 lines, replacing helper-only peer-link cases with direct and deferred updater regressions; the allocation covers exactly that growth. Existing ordering, refusal, retry, migration, and alias coverage remains.
This repair must be present in the running plugin updater. It does not change core activation or recovery protocols.
Evidence
git diff --checkpassed.8aeaebdf1838b7a35dc52c99f7132e76d7bb60b2, merge checkout380eeaf1: Bun authority suite 16/16, including both new direct/deferred rollback regressions; transaction suite 18/18; caller and Doctor persistence suites 14/14. All planned test, production/test type, lint and baseline-ratchet jobs passed. The removed helper's obsolete two-assertion allowance is also deleted.