Repository navigation
fix(update): preserve plugin convergence through package restart - #131062
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 2:46 PM ET / 18:46 UTC. ClawSweeper reviewWhat this changesThe PR separates plugin convergence from the later fresh-doctor phase during package updates, skips repair of disabled plugins, and expands packaged restart qualification coverage. Merge readinessThis maintainer-authored PR remains necessary: current main retains the plugin lifecycle lease while launching the fresh doctor that must reacquire it. The proposed ordering matches the lease and updated-migration ownership boundaries; no introduced blocking defect was found, but upgrade compatibility warrants explicit owner review before landing. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherPackage updates pass from the current CLI process to an updated process that repairs plugin installations and validates configuration before restarting the Gateway. The lifecycle lease protects plugin changes, while the fresh doctor process owns updated migration contracts and final validation. flowchart LR
A[Package update] --> B[Pre-plugin doctor]
B --> C[Plugin convergence lease]
C --> D[Fresh post-plugin doctor]
D --> E[Configuration validation]
E --> F[Gateway restart]
Decision needed
Why: This intentionally changes upgrade-time coordination and configuration recovery for existing installations, and the PR has maintainer protection. Before merge
Agent review detailsSecurityNone. PR surfaceSource +9, Tests +1143, Other +263. Total +1415 across 26 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one lease-scoped convergence phase followed by updated-process doctor validation, then land after exact-head CI and package-upgrade qualification demonstrate both fresh-install and upgrade behavior. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main retains the lifecycle lease across the fresh-doctor path, while the PR’s regression tests exercise the corresponding release ordering. The PR body also records a packaged Testbox run on the behavior-equivalent pre-final head. Is this the best way to solve the issue? Yes: limiting the lease to convergence aligns with the fresh process owning updated migrations, while final validation still gates gateway restart. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa09ec4c49b9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper rank-up move:
|
|
Merged via squash.
|
…nclaw#131062) * fix(update): preserve plugin convergence during package upgrades * fix(e2e): isolate upgrade restart auth setup * fix(e2e): isolate candidate restart config * fix(doctor): skip repairs for disabled plugins * fix(e2e): use canonical identity for restart install * fix(update): release plugin lease before doctor * fix(e2e): seed upgrade companion installs * fix(e2e): validate companion install versions * fix(ci): register upgrade config parking script * test(plugins): type npm install config fixture
Closes #131061
What Problem This Solves
Fixes an issue where package-managed upgrades with configured external plugins could fail plugin convergence, post-update repair, or automatic gateway restart when the update crossed a fresh-process handoff.
Why This Change Was Made
The update lifecycle now carries canonical plugin convergence state through the handoff, releases plugin lifecycle ownership before doctor repair, and excludes disabled plugins from missing-plugin repair. The packaged restart qualification flow now uses canonical service identity/configuration and real version-matched companion installs with artifact-bound capability consent.
User Impact
Package upgrades can complete plugin migration and automatic gateway restart without leaving invalid channel configuration or blocking on stale lifecycle ownership. This also strengthens FRV so it exercises the same installed-plugin contracts users rely on.
Evidence
tbx_01m11ytmjqxszhtr7fqn00zgpz.tbx_01m120z0qze825ywkgbne27smn.96660cd2d2b3b78e379e3f2190461015878fce2din Testbox leasetbx_01m125wkx0refjbgvhna8mzt8s(Actions run33101019755)./healthz,/readyz, and gateway RPC status in11m11s.6f3f318bf10e501a1a55b135b022e84b9aeb1952only registers the existing config-parking executable for Knip and types a test fixture asOpenClawConfig; packaged runtime and E2E behavior are unchanged from the passing proof.mainSHA8966ba6abfa79c1e2ad3f3ce438d113a153e6734found no merge-tree conflicts;git diff --checkpassed.bash -n, formatting, script lint, andgit diff --checkpassed.Production LOC:
+178/-169(net+9) | Harness scripts:+447/-185| Tests:+1236/-93The production growth records the missing lifecycle handoff/ownership facts; the larger harness and test delta captures the successive packaged upgrade regressions and realistic installed-plugin proof.