Repository navigation
fix(update): enter maintenance before repairing source artifacts - #180356
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 acquires Doctor maintenance before source-artifact publication and preserves later native autostart changes during restoration. Example: A running launchd-managed source installation needs refreshed runtime artifacts during openclaw update repair.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This maintainer-authored PR fixes a current-main repair failure; no actionable introduced code defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherUpdate finalization coordinates source-artifact preparation, Doctor, plugin convergence, and managed Gateway restoration through existing maintenance and native-service owners. flowchart TD
A[Update repair CLI] --> B[Source preparation]
B --> C[Doctor maintenance owner]
C --> D[Guarded artifact publication]
D --> E[Doctor and plugin convergence]
E --> F[Native authority revalidation]
F --> G[Restore or refuse activation]
Technical reviewBest possible solution: Keep the existing Doctor owner responsible for publication custody, convergence, and restoration under current native authority. Do we have a high-confidence way to reproduce the issue? Current-main ordering and the publication guard establish the reported failure; supplied native receipts exercise the repaired path, and this read-only review ran no target code. Is this the best way to solve the issue? The smallest complete repair uses the existing beforePublication hook and Doctor maintenance owner; the native-policy follow-up addresses an observed restoration failure without introducing another lifecycle owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f25249704a8b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +58, Tests +124. Total +182 across 12 files. Added test files: 0. 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 HistoryReviewed October 26, 2026, 7:35 PM ET / 23:35 UTC (Revision 3). |
f9f19a5 to
4073567
Compare
|
@clawsweeper re-review Please review current head This is ready-for-review preparation only; do not merge. |
|
🦞👀 Re-review progress:
|
|
Published-driver × candidate proof: exact fcb14b3 One invocation, no retry/version stamp/guard override: Docker29.7.2; canonical bare Node24.22.1 image; disposable Linux systemctl shim, synthetic state, no model inference/host Gateway changes. Registry latest resolved2026.10.7, same as candidate. Clean exact-head package build192.6s, integrity check42s. Published updater exit0,314.664s, processTreeState terminated. Durable run9381ad5d-28a4-447d-b536-d7c6e115237c finished/succeeded; update.status ok. Installed build-info exactly candidate. Serving PID10853 version/build exact; serviceRunning/versionMatch/channelsReady/readyz/coreReady/settled true; pluginErrors empty. Postcommands recorded-run, after-ready, running-version, durable-after, incognito-after all exit0. Assertions prove durable session ID/messages retained, incognito history removed, synthetic retained credential sidecar bytes unchanged, managed PID replaced. Summary readyz200; harness printed PASS. Wrapper exit1 ONLY later fixture teardown: stop-service exit1,0.372s; stderr "Survivor supervisor has not settled; retaining process custody." Full-command pass NOT claimed. Unchanged owner scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh:105-133(stop_gateway); supervisor polling returned before final settlement. Final gateway.log.exit.json: exit0 at2026-10-26T23:54:18.426Z. Final gateway.log.runtime.json: pid/supervisorPid/groupPid0, stopFailed false. No updater failure facts. No root cause beyond observed settlement race claimed. Docker container93e8fa430ca7 removed by lane cleanup; no owned-image containers remain. Lane EXIT trap removes its unique runtime volume. No code edits/reruns. Evidence /private/tmp/pr180356-published-driver: inputs.json,summary.json,update-exit.json,update.stdout,recorded-run.stdout,running-version.stdout,durable-after.stdout,incognito-after.stdout,stop-service-exit.json,stop-service.stderr,gateway.log.exit.json,gateway.log.runtime.json. Wrapper log /private/tmp/pr180356-published-driver-cell.log. Native Docker cleanup receipt: docker inspect93e8fa430ca7 reports no such object; docker ps -a --filter ancestor=openclaw-pr180356-published-driver empty. Docker volume events: d99ffca56ff7c686931d0faad0a988fdd871b420986fb3306066da5a5b76ca53 created1793058481,mounted1793058482,unmounted1793058858,destroyed1793058859. No retained writer/process uncertainty. |
…nclaw#180356) * fix(update): repair source artifacts under managed maintenance * fix(doctor): preserve later native autostart changes during repair
…0356) * fix(update): repair source artifacts under managed maintenance * fix(doctor): preserve later native autostart changes during repair (cherry picked from commit 8346eba) Co-authored-by: RomneyDa <[email protected]>
The openclaw#180356 backport (7065121) refuses Gateway restoration when native autostart policy changes during Doctor repair. The managed doctor-health fixture reported isEnabled as the current running state, so stopping the Gateway looked like a policy change. Main fixed the fixture in openclaw#185277; the release's legacy-update fixture already carried the equivalent adaptation. Release adaptation: applied the managed test-support hunk by hand; the file's structure diverged from main. (cherry picked from commit 217817b, src/flows/doctor-health.managed.test-support.ts hunk only)
Fixes #180349
Problem and result
openclaw update repairreaches changed source-artifact publication before maintenance, so a running managed Gateway correctly refuses publication and repair cannot complete. Enter the existing Doctor maintenance owner atbeforePublication, retain its custody through convergence, and restore only with current authority. Package installations and unchanged-artifact paths keep their existing behavior.Preserve the existing service-inspection deadline; elapsed preparation consumes its allowance. Keep admission/deadline checks separate from a delegated updater continuation, so a bounded managed repair reaches its own stop instead of waiting for that Gateway to exit first.
Native macOS proof also exposed an inherited Doctor restoration defect: a later explicit native disable was overridden by restoration. Doctor now captures native enable policy immediately before its stop and checks it before installation and final activation under the service operation lock. Missing policy inspection refuses before stop. Restoration preserves initially disabled autostart policy. Windows retains its existing task-recovery owner; two unchanged settlement functions move into that existing module to satisfy the source-size gate. No new config, schema, retention, or permission contract.
Verification
40735674(3 fail / 26 skipped; 37.76s), including later disable, final activation, and preservation of initially disabled policy.fcb14b3799c73930424519ddc51fde0f2cf746e9. The CI workflow completed successfully in 22m58s elapsed across its parallel jobs.Native macOS evidence and limits
Sanitized native proof, commands, build identity, hashes, failures, and cleanup.
Exact
fcb14b3799c73930424519ddc51fde0f2cf746e9runtime build passed (75.9s), with matching build metadata. All native work used uniquely named synthetic profiles and task-owned LaunchAgents; the operator's installation was untouched.health --jsonandgateway status --deep --require-rpcpassed, plugin errors/unavailable empty. Synthetic config/history/SQLite SHA256 values and logical configuration stayed identical.gateway stop --force --disablechanged the owned native label from enabled to disabled. Finalization returned exit 1 (86.31s),doctor-gateway-restoration-failed, explicitly refusing automatic restoration because native policy changed. The service remained absent/disabled and its port free. This reverses the native failure observed at40735674.40735674: explicit ancestry refusal before stop/publication, unchanged native PID/artifact hash, deep RPC passed. The ancestry owner/branch is unchanged; current policy capture is strictly after that refusal. This is not represented as a current-head child run.The timing fixture is disclosed integration proof with real native service/authority code, not an unmodified full end-to-end scenario. A boolean policy comparison covers the observed enabled-to-disabled change; it does not detect a repeated disable when policy was already disabled. No production-data migration, broad release matrix, or live channel readiness is claimed. No live installation update or release was performed.
Published-driver cell
Sanitized exact-head upgrade receipt: one canonical local Docker cell, published 2026.10.7 → exact candidate 2026.10.7, Node 24.22.1, no version override or retries. Published updater exit 0 (314.664s); completion ledger, exact build identity, Gateway PID replacement/readiness, settings and durable history preservation, incognito removal, and retained synthetic credential-sidecar bytes all passed.
The wrapper exited 1 afterward in fixture-supervisor teardown, so a full-command pass is not claimed. Final supervisor exit 0 and zero remaining process IDs, removed container, and destroyed unique volume prove settled cleanup. This unchanged harness defect is tracked separately in #185208; no updater failure facts were observed.
Commands
Fresh ClawSweeper review of the final head: ready for maintainer review, no code findings and no before-merge items; patch quality platinum, overall gold.