fix(infra): include update timeout in managed-service handoff parent exit wait#99695
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 3:06 AM ET / 07:06 UTC. Summary PR surface: Source +108, Tests +304, Docs +1. Total +413 across 13 files. Reproducibility: yes. by source inspection. Current main and v2026.6.11 can drain restart work for the default 300s while the managed-service helper times out after restart delay plus 60s; this review did not run a live Windows npm-global update. Review metrics: 3 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Land after current-head managed-service update proof, explicit maintainer acceptance or tuning of the wait and Do we have a high-confidence way to reproduce the issue? Yes by source inspection. Current main and v2026.6.11 can drain restart work for the default 300s while the managed-service helper times out after restart delay plus 60s; this review did not run a live Windows npm-global update. Is this the best way to solve the issue? Yes for the owner boundary: the shared managed-service handoff helper and Gateway restart loop are the right places to align parent-exit wait with restart-drain behavior. The current branch still needs current-head proof, maintainer acceptance for the compatibility tradeoff, and removal of the release-owned changelog edit. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 86d53890943a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +108, Tests +304, Docs +1. Total +413 across 13 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
f584667 to
4a03bb7
Compare
|
Addressed P2: default parent-exit grace raised from 60s to 300s to match typical restart drain budget. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Proof refreshed for the current head after the shutdown-reserve fix. Changes since last review:
@clawsweeper re-review |
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
51dd58e to
df47c3a
Compare
df47c3a to
5640a59
Compare
…exit wait The handoff parent exit grace was hard-coded to 60s regardless of the overall update timeout. When the gateway is draining active tasks, 60s is often not enough, causing managed-service-handoff-parent-timeout. Use the existing timeoutMs parameter as a floor for the parent exit wait so callers can extend it for long-running drains. Refs openclaw#99666
Co-authored-by: 徐闻涵0668001344 <xu.wenhan1@xydigit.com>
|
Merged via squash.
|
What Problem This Solves
Fixes #99666. Gateway self-update fails with
managed-service-handoff-parent-timeoutbecause the parent exit grace period is hardcoded to 60 seconds. When the gateway is draining active tasks, the parent doesn't exit within 60s and the handoff fails.Root Cause / Fix
startManagedServiceUpdateHandoffcomputedparentExitTimeoutMsasrestartDelayMs + 60_000regardless of the update timeout. The caller already passestimeoutMsbut it was not used.Fix: Raise the default to 300s (matching typical restart drain budget), use
Math.max(300_000, timeoutMs ?? 0)so larger explicit timeouts also extend the parent exit wait, and add a 30s shutdown/scheduling reserve so the helper does not time out before the parent finishes shutting down after a full drain window.Changes (2 files, +18/-2):
src/infra/update-managed-service-handoff.ts: 2 lines changed + 30s reserve constantsrc/infra/update-managed-service-handoff.test.ts: 2 tests updated for new reserveEvidence
Production Function Proof
Test Runner
Autoreview + Formatting
Change Type
fix— bug fix for gateway self-updateSecurity Impact