Repository navigation
fix(update): report when repair leaves an already stopped Gateway offline - #157134
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: blocked before merge. Reviewed September 24, 2026, 4:04 AM ET / 08:04 UTC. ClawSweeper reviewWhat this changesThe branch adds profile-aware guidance when repair leaves a managed Gateway stopped, forwards Doctor maintenance warnings to the final JSON result, and documents those outcomes. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. Current main still omits the stopped-Gateway warning and its final JSON reporting. This branch is a viable path for that focused fix; the earlier related PR remains open and unmerged. No actionable patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherUpdate repair runs Doctor maintenance after an interrupted update. Doctor decides whether the managed Gateway should remain stopped or be restored; finalization turns its warnings into terminal output and update history. flowchart TD
A[Update repair command] --> B[Doctor maintenance]
B --> C{Gateway service state}
C --> D[Leave previously stopped service offline]
C --> E[Restore service stopped by repair]
D --> F[Maintenance warnings]
E --> F
F --> G[Final JSON and update history]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +36, Docs +7. Total +56 across 5 files. View PR surface stats
Review metricsNone. 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. Technical reviewBest possible solution: Use one repair path that preserves operator-controlled service activation and gives a profile-specific recovery instruction in both human and JSON outcomes. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main can finish repair with an owned Gateway already offline without producing the ordinary warning or carrying maintenance warnings into final JSON. I did not execute that path in this read-only review. Is this the best way to solve the issue? Yes. The branch reports the decision through Doctor's existing maintenance owner and finalization warning collector while retaining installation-drift precedence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2e00063a06c4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…ine (openclaw#157134) Co-authored-by: Dallin Romney <[email protected]>
Supersedes #153409 (merged onto current main; author @RomneyDa)
Refs #153401
What Problem This Solves
Fixes
update repaircompleting without explaining that an already stopped managed Gateway remains offline, while omitting maintenance warnings from its final JSON outcome.User Impact
Standalone repair reports the intentional non-start and names
openclaw gateway start, including the selected profile. Maintenance warnings appear inpostUpdate.doctor.warnings, withstatus: "warning"and a successful exit when other work succeeds. Installation-drift remediation retains precedence over ordinary start guidance.Why This Change Was Made
Doctor maintenance already owns the service decision and its warning list. Finalization now collects those warnings after maintenance finishes. The Gateway stays stopped unless repair itself owns restoration; parent-owned activation remains with the updater.
RomneyDa's original commit is retained as a merge parent. This changes reporting only: no schema, persisted format, configuration option, or activation policy changes. It applies when the installed candidate runs repair/finalization; it cannot patch an older updater already running in memory. The original PR's published-2026.9.4 recovery-boundary trace remains historical compatibility evidence, not a new native smoke run.
Evidence
OPENCLAW_TESTBOX=1: 35 files, 1,231 tests passed, exit 0, 563.2 s. Blacksmith Testboxtbx_01m395vb6qjp1wa54b3trdc6zs(run); source SHA and file hashes were verified before execution. The lease completed and was stopped.doctor-maintenance.settlement.test.ts,update-command-lifecycle.test.ts, anddoctor-maintenance.installation.test.ts. Measured single-filepnpm test <file> --maxWorkers=1wall times were 13.06 s, 22.51 s, and 51.27 s, respectively. The two new tests took 2 ms and 102 ms in those runs. All three files also passed in the final importer batch.reports an already stopped Gateway without starting it after repairfails with an empty warning list when the offline-warning block is removed. The candidate asserts both recorded and logged guidance, with no restart or health call.includes service restoration warnings in the repair outcomefails when warning forwarding afterfinish()is removed: JSON incorrectly reportsokand omits Doctor warnings.Doctor handles two-prefix drift through maintenance finish (already-stopped)fails when the drift branch's early return is removed: ordinary start advice appears alongside the specific installation-repair warning.pnpm check:changed: exit 0 in 1,617.7 s, including core types, all 25 selected test-type graphs, and changed-file lint with zero warnings/errors. This run preceded the single merge-preserving rebase; all five changed files are byte-identical afterward.git diff --checkalso passes.autoreview --mode branch --base origin/main, P0–P2: scoped-clean on the rebased branch. Service operations in the regression proof use synthetic boundaries.update-cli.test.tspassed all 515 cases in 249.644 s in the final batch (234.146 s in the earlier run). Its split into 22 files is tracked by test(cli): split and speed up update-cli tests #157018; that split was not merged into this base. No timeouts, assertions, retries, or test tiers were changed.Diff size: production +13/−0, tests +36/−0, documentation +7/−0. Hosted PR CI timings are pending at author handoff.