Repository navigation
fix(update): complete deferred model repair when plugins are unchanged - #165148
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. Reviewed October 4, 2026, 6:56 PM ET / 22:56 UTC (Revision 3). ClawSweeper reviewWhat this changesThe updater checks its own recorded run for deferred model repairs, completes them even when plugins are unchanged, and documents recovery for older updaters. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main. The package evidence resolves the earlier upgrade-proof blocker, and no actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s updater installs the target version, synchronizes plugins, and asks Doctor to finish pending repairs before restarting the Gateway. The update-run ledger records which repairs belong to that update. flowchart TD
A[Installed updater] --> B[Target version and plugins]
B --> C[Update completion]
D[Selected update history] --> C
C --> E{Pending repair or changed plugins?}
E -->|Yes| F[Fresh Doctor repair]
E -->|No| G[Readiness and Gateway restart]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +9, Tests +61, Docs +2. Total +72 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Finish the selected update’s pending repairs through the existing Doctor owner while preserving shipped recovery paths and lifecycle fences. Do we have a high-confidence way to reproduce the issue? Yes, from source: a running admitted update with deferred retirement, unchanged plugins, and no ambient selector is missed by current main’s completion queries. This review did not execute that failing path. Is this the best way to solve the issue? Yes. Passing the existing run context into the canonical query fixes both gates without adding another repair owner or changing Doctor’s authority contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 989bd3f055fa. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
What Problem This Solves
Fixes updates silently skipping deferred model-retirement repair when plugin payloads are unchanged and the parent updater has no ambient update-run selector.
User Impact
Updates finish their own deferred Doctor work before reporting completion. Another update's pending marker no longer triggers unnecessary repair. Package updates that delegate convergence to the new candidate benefit immediately. If an older updater retains convergence and leaves a deferred receipt, run the newly installed
openclaw doctor --fixonce.Why This Change Was Made
The admitted parent already carries its exact run ID and state environment, but both completion gates looked only at process environment variables. Both now pass the existing run context to the canonical query, including the standalone finalizer's run-ID hint. Doctor's published environment/result-channel contract and lifecycle authority checks remain intact. No configuration or schema changes.
The current head integrates main's removal of the redundant
freshDoctorRequiredargument. All three production callers suppliedpluginUpdate.changed; the existing owner now reads that field directly. The selected-run repair is unchanged, and the newly added test no longer supplies the retired argument.Evidence
2026.9.8→ candidateBoth native runs finished/succeeded, replaced the Gateway, passed readiness, preserved the durable session ID/content, and discarded incognito content after restart. The same authenticated endpoint, port, and synthetic credential worked before and after. Native config-change receipts contain only
meta,wizard, and the supported webhook-listener migration in the published cell, and no config changes in the fixed-caller cell. A full config-byte comparison was not captured.Package identity and integration qualification
The package cells tested reviewed head
caa717474ed2188670bb24635ca9261a89f1c6f1, tree5116bb50115c909c6a7b789ed6523db94c5887a9. The native source capsule used carrier commit958974952d331e25d213b60b316c7babe933496ewith that exact tree.1453913d4d8430dd0c2210e69c30a6e7323d4c29646001b523b4b88ae3de8db6.bb4b2edba84ebc3f3c0f4f9f555213f9fe830ae38134bb2e6b6e303e0a361891. The canonical fixture changes onlypackage.json,dist/build-info.json, and the content inventory; schemas and compiled code remain unchanged.47a0c27d-f3a2-4cb1-8a91-c26d2c695061.3cb476f0-04b8-4255-87f1-e844e7f5ed52.finalize:doctor:model-retirementascompletedandplugins.changed=false; the fixture injected neither a retirement receipt nor an ambient update correlation.The package proof is retained as evidence for that original head, not relabeled as a new run. Integration head
4bb8a00b699cf29e269106f61c64c9cc3d62e038preserves the query repair while absorbing main's equivalent inline.changedcondition and removing the obsolete test argument. The run-history helper, Doctor process launcher, and durable retirement producer are unchanged by that main adjustment; package/workspace manifests and lockfile are identical. Current affected tests and review passed, with current type/CI gates required before merge.