Repository navigation
refactor(plugins): consolidate host-link repair orchestration - #188215
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 consolidates Doctor and update host-link repair orchestration in the existing peer-link owner and removes two update-config wrappers. Example: Doctor repairs two managed npm packages and one registered plugin.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a useful consolidation, preserves the existing repair contracts, and has no actionable introduced findings. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor and plugin updates supply selected package roots, install records, and mutation callbacks to the peer-link owner, which validates package ownership and repairs links to the running OpenClaw host. flowchart TD
A[Doctor] --> C[Peer-link repair orchestration]
B[Plugin update phases] --> C
C --> D[Managed npm repairs]
D --> E[Registered install repairs]
E --> F[Host links and repair counts]
Technical reviewBest possible solution: Keep the shared orchestration in the existing peer-link owner while preserving caller-owned selection, diagnostics, authority checks, and rollback settlement. Do we have a high-confidence way to reproduce the issue? This behavior-preserving refactor addresses duplicated orchestration rather than a reported runtime failure; inspection confirms the duplicate caller paths. Is this the best way to solve the issue? The change uses the existing repair owner, removes superseded wrappers, and keeps the distinct update phases and error policies intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 68fbe4ac429c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -25, Tests +103, Other -1. Total +77 across 10 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 5:48 AM ET / 09:48 UTC (Revision 2). |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…aw#188215) * refactor(plugins): consolidate host-link repair orchestration * test(plugins): preserve real peer-link exports * test(plugins): prune retired repair mock baseline
What Problem This Solves
Update and Doctor paths separately compose host-link repairs, duplicating ordering and error policy around the same repair owner.
User Impact
No intended behavior change. Managed repairs still settle before registered repairs; update rollback and Doctor diagnostics keep their existing behavior.
Why This Change Was Made
Move the shared orchestration into the existing peer-link owner and remove two update-config wrappers. Keep pre-target and post-installer repair phases separate, along with selected-generation traversal, effect admission, fresh install records, and rollback settlement.
Production is reduced by 25 lines. Tests grow by 103 lines to cover actual filesystem ordering, sibling settlement on rejection, effect gates, and callback-versus-throw behavior.
Evidence
51b480b7a615870c8cc3fb9315b8dcba24877c2eobserved 355 passing cases across 17 files, including all three changed suites: peer links (43), post-core convergence (13) and transactions (17), plus update (86), install npm specs (50), uninstall (76), convergence persistence (8), source checkout (6) and other authority/consent/deadline/load-path siblings. Owner/convergence/transaction/uninstall job, update/install job.91ca13cb3604a15bbfdb37341c166f91a8e19386.install.test.ts, shipped CLI invocation and latest-stable upgrade are not claimed.Based on the landed #188196; this PR contains only host-link orchestration.