Repository navigation
fix(update): keep starting Gateways running after readiness timeouts - #149760
Conversation
Treat exhausted readiness observations as warnings while the Gateway is still running. Preserve unconfirmed health, recovery backups, and Windows autostart across current finalization and repair callers. Share package completion handling and leave candidates untouched when rollback is refused. Keep the published 2026.9.3/9.4 parent completion limitation as a documented follow-up without changing its response contract. Refs #146394 #149395
|
🦞👀 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 16, 2026, 4:20 AM ET / 08:20 UTC (Revision 3). ClawSweeper reviewWhat this changesThe updater preserves identified Gateways that are still starting after readiness expires, retains recovery backups, and reports an explicit unverified outcome through Doctor and update history. Merge readiness⛔ Blocked before merge - 4 items remain This remains useful work: current main still treats exhausted startup verification as failure. The latest revision addresses the earlier correctness concern; the remaining landing question is acceptance of the documented published-updater limitation. Priority: P1 Review scores
Verification
How this fits togetherUpdate verification checks the restarted Gateway’s process identity, health, and HTTP readiness. Its result controls service recovery, package-backup cleanup, Windows autostart completion, and the recorded update outcome. flowchart TD
A[Installed updater] --> B[Start candidate Gateway]
B --> C[Observe identity and readiness]
C --> D{Observed outcome}
D -->|Ready| E[Confirm update and retire backups]
D -->|Stable startup timeout| F[Preserve process and backups]
D -->|Concrete failure| G[Guarded recovery]
F --> H[Record readiness unverified]
Decision needed
Why: The body acknowledges the limitation as follow-up, but does not explicitly accept the resulting Windows autostart behavior for landing; candidate code cannot replace the parent already executing. Before merge
Agent review detailsSecurityNone. PR surfaceSource +99, Tests +526, Docs +31. Total +656 across 34 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one readiness owner and explicit unverified outcomes, with published-driver compatibility either demonstrated or explicitly accepted as a bounded landing limitation. Do we have a high-confidence way to reproduce the issue? Yes: delay listener startup beyond the update readiness allowance while preserving the process identity. Current-main source, the field report, and the supplied historical Gateway run support this path; this review did not execute it. Is this the best way to solve the issue? Yes for current drivers: the patch keeps readiness classification with the existing verifier and carries its result through existing finalizers. Published-parent completion remains a separate compatibility limitation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 967a8681d0d5. LabelsLabel 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
History |
Preserve observed PID and boot-generation changes as verification failures that reach recovery. Close stable readiness expiry as skipped with gateway-readiness-unverified, a finite outcome shared by finalization, status, sentinels, and public reports. Keep backups and suppress success continuations while readiness is unconfirmed, including already-current core updates that restart after plugin changes. Refs #146394 #149395
Require an identified startup phase before treating readiness expiry as a warning. Keep established-listener probe failures and HTTP-unready services as failed verification. Report Doctor's unverified completion explicitly, including migrated finalization. Reconcile the service fixtures against their finite observation window: the same running PID with no listener does not authorize a forced recovery restart or establish readiness. Preserve the terminal unverified outcome and backup-retention warning. Refs #146394 #149395
|
Merged via squash.
|
…penclaw#149760) * fix(update): keep starting Gateways running after readiness timeouts Treat exhausted readiness observations as warnings while the Gateway is still running. Preserve unconfirmed health, recovery backups, and Windows autostart across current finalization and repair callers. Share package completion handling and leave candidates untouched when rollback is refused. Keep the published 2026.9.3/9.4 parent completion limitation as a documented follow-up without changing its response contract. Refs openclaw#146394 openclaw#149395 * fix(update): distinguish unstable and unverified Gateway starts Preserve observed PID and boot-generation changes as verification failures that reach recovery. Close stable readiness expiry as skipped with gateway-readiness-unverified, a finite outcome shared by finalization, status, sentinels, and public reports. Keep backups and suppress success continuations while readiness is unconfirmed, including already-current core updates that restart after plugin changes. Refs openclaw#146394 openclaw#149395 * fix(update): distinguish startup from unhealthy service observations Require an identified startup phase before treating readiness expiry as a warning. Keep established-listener probe failures and HTTP-unready services as failed verification. Report Doctor's unverified completion explicitly, including migrated finalization. Reconcile the service fixtures against their finite observation window: the same running PID with no listener does not authorize a forced recovery restart or establish readiness. Preserve the terminal unverified outcome and backup-retention warning. Refs openclaw#146394 openclaw#149395
Refs #146394 #149395
What Problem This Solves
Fixes updates stopping a Gateway that is still starting, or reporting successful verification after a readiness timeout or repeated restarts.
User Impact
Current update drivers preserve an identified Gateway when the restart owner records waiting for a listener, startup migration, or healthy settling. Established-listener probe failures and HTTP-unready services remain failures. For qualifying startup expiry, recovery backups are retained. The run closes as
skippedwith reasongateway-readiness-unverified, a recorded finish time, and no readiness confirmation. The warning preserves the elapsed allowance and last observation. Observed PID or boot-generation changes remain failures that reach recovery. Doctor reports qualifying unverified readiness with an explicit handled reason and an unverified-readiness message, including after migrated finalization.Why This Change Was Made
The budget was already enlarged by #145219, but timeout still entered destructive failed-update recovery. The verifier and current service, repair, Doctor, and migrated finalization callers now preserve stable startup. Finalization records an explicit terminal unverified outcome because Gateway startup publishes boot facts but does not own CLI readiness completion.
update status, JSON, the restart sentinel, and public report identifiers share that outcome. A Gateway ready within the allowance records confirmed readiness; later health does not rewrite a closed historical run. No options, environment controls, or database schema changes were added.Follow-up: published-parent pending-readiness completion. Installed 2026.9.3/9.4 parents use
status === "ok"for both backup retirement and Windows autostart preservation. Candidate code cannot change that already-loaded decision. This PR repairs current callers without changing the parent-facing response shape; the first-hop limitation remains.Evidence
ca81bad94a976d06f2c821bae545118b93778255.72fe31bf6b7. Two added Doctor regressions also failed before this fix because direct and migrated unverified startup returned bare success.node scripts/check-changed.mjspassed for all changed PR paths;git diff --checkpassed.origin/main: scoped-clean.ebafd8ee44a, verification warned at 65.6s, preserved the PID, and observed/readyzHTTP 200 at 96.3s. Service-manager observations were adapted to the owned PID; Gateway and HTTP were real. No full Raspberry Pi or Windows guest upgrade proof.Consumer-test classifications
slowrefresh: intentional contract change. The fixture's listener appears at 20 seconds, after the explicit 6.5-second observation window. That window sees the same running PID and a free port, without errors or generation changes. The previousokresult depended on forcing a recovery restart. The test now requires no such restart, a recordedskipped / gateway-readiness-unverifiedoutcome, an unconfirmed readiness record, and the warning to retain recovery backups.unreadyrefresh: intentional terminal unverified outcome, not verified success. ItsInfinitylistener schedule is not observable during the finite window; the verifier sees the same pre-listener startup evidence as the slow case. The old fixture made it healthy by forcing recovery. The test now preserves the process, records the exact unverified outcome and backup-retention warning, and makes no claim that readiness will eventually arrive. Physical backup retention remains covered by the retained-package finalization regression.http-unready: product regression; keep rejection. RPC health is healthy while/readyzremains 503, with no identified startup generation or startup progress. The predicate no longer converts that into pending startup. Its original rejection, triage, and absence of a successful-restart note remain asserted. Separate startup regressions now require Doctor's explicit handledgateway-readiness-unverifiedreason and unverified-readiness outro, for both direct and migrated completion.status: errorand a failed verification step.