Skip to content

fix: prevent external gateway restart timeouts - #109273

Merged
shakkernerd merged 1 commit into
mainfrom
fix/external-restart-health
Jul 16, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/external-restart-health

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where externally supervised gateway restarts could wait until the full health timeout after the supervisor had already launched the replacement gateway, when that gateway required device identity.

Why This Change Was Made

The restart path now accepts the exact device-identity policy close only after the replacement gateway lock and observed listener ownership agree. Generic gateway health checks remain strict and continue rejecting that close without verified process ownership.

User Impact

OCM-managed gateway restarts now complete after a successful handoff instead of reporting a timeout while the replacement gateway is already running.

Evidence

  • Blacksmith Testbox tbx_01kxp332tz6q443t69tv6fjs65: 65 focused restart tests passed.
  • Blacksmith Testbox tbx_01kxp2q9xaw3a4tzkmw7vp1d1x: full OpenClaw build passed.
  • Release-shaped local package exercised through an isolated OCM environment: the gateway PID changed, restart count advanced to 1, and openclaw gateway restart exited successfully.
  • Repository auto-review completed with no accepted or actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Jul 16, 2026
@shakkernerd shakkernerd self-assigned this Jul 16, 2026
@shakkernerd
shakkernerd force-pushed the fix/external-restart-health branch from fba93f0 to a846053 Compare July 16, 2026 18:35
@shakkernerd
shakkernerd force-pushed the fix/external-restart-health branch from a846053 to d8f038e Compare July 16, 2026 18:36
@shakkernerd
shakkernerd merged commit f084ab2 into main Jul 16, 2026
51 checks passed
@shakkernerd
shakkernerd deleted the fix/external-restart-health branch July 16, 2026 18:37
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Merged using rebase.

What changed after review:

  • Restricted device-identity policy-close acceptance to the verified replacement gateway listener.
  • Kept generic gateway health checks strict for missing or mismatched process ownership.
  • Added focused replacement-identity and listener-ownership regression coverage.

Verification:

  • Rebased/refreshed onto current origin/main before pushing; the final live-base drift was verified unrelated before merge.
  • Blacksmith Testbox tbx_01kxp332tz6q443t69tv6fjs65: 65 focused restart tests passed.
  • Blacksmith Testbox tbx_01kxp2q9xaw3a4tzkmw7vp1d1x: full OpenClaw build passed.
  • Release-shaped local package through isolated OCM: replacement PID changed and restart count advanced to 1.
  • Auto-review: clean with no accepted or actionable findings.
  • GitHub checks: no required checks configured and no completed failures at merge.

Landed on main:

Thanks @shakkernerd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant