Skip to content

fix(onboard): retry empty readiness probes - #12758

Merged
prekshivyas merged 4 commits into
mainfrom
fix/sandbox-exec-readiness-race
Oct 7, 2026
Merged

prekshivyas merged 4 commits into
mainfrom
fix/sandbox-exec-readiness-race

Conversation

@rsliter

@rsliter rsliter commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Managed sandbox startup now treats an empty nonzero executable-readiness response as transient within the existing bounded wait. Explicit execution failures and nonempty terminal diagnostics still stop startup immediately.

Reason

Exact-commit Images run 37564161755 reached a running, healthy Hermes sandbox, then received one empty nonzero response from its first executable probe. The existing classifier ended startup instead of allowing the bounded readiness loop to observe the next healthy probe.

Related issues

Refs #12698

Changes

  • Classify an empty nonzero executable probe as not ready, using the existing bounded polling loop.
  • Preserve immediate failure for explicit execution failures and nonempty terminal diagnostics.
  • Add focused regressions for both newly created and recreated sandbox readiness paths.
  • Document both retryable signatures and the terminal failure boundary.

Verification

  • npx vitest run --project cli src/lib/onboard/sandbox-fresh-readiness.test.ts src/lib/onboard/sandbox-gpu-create-flow.test.ts — 60 tests passed.
  • npm run docs — passed.
  • npm run checks:repository — all 18 repository checks passed.
  • npm run test:changed — growth guardrails passed.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli — passed.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr — commit hooks, builds, publication validation, and CLI TypeScript checks passed.
  • Normal pre-push validation — publication validation and CLI TypeScript checks passed.
  • Exact-commit CI, Images, CodeQL, Code Quality, rootless Podman qualification, self-hosted PR qualification, CodeRabbit, and Advisor blocker gate: passed at b281fa70da45e816f690e33289e1ed965f31db3d.
  • GitHub commit verification — candidate commit d5d2e2fd5b352f46730f4d51a9c583b5fbd6a3de, merge commit 1e5587933d734fbf96ca16c41cd24ab91b8f2125, and repair commits 05f78be023321b646b6da03afa51e90683a0c5e7 and b281fa70da45e816f690e33289e1ed965f31db3d are Verified.
  • Diff review — no secrets, API keys, or credentials were added.

Review notes

The initial growth-guardrail failure was base drift, not a candidate defect: current main added a conditional to unrelated src/lib/tunnel/services.test.ts after the implementation base. Merge commit 1e5587933d734fbf96ca16c41cd24ab91b8f2125 integrates canonical base c51ba38a830b6b85201cc632bdc8fc148380a0ff; the replacement growth check passes.

The first exact-commit Advisor run found two P1 findings in documentation and recreated-path regression coverage. Both are repaired in 05f78be023321b646b6da03afa51e90683a0c5e7; the replacement Advisor run 37638023278 and its blocker gate pass.

This changes the managed-sandbox readiness boundary. The repair is limited to completed nonzero probes with empty normalized output. The existing bounded loop still owns retry limits, and explicit failures plus all nonempty terminal diagnostics remain failures.


Signed-off-by: Rebecca Sliter [email protected]

Summary by CodeRabbit

  • Bug Fixes
    • Readiness checks for newly created sandboxes now retry when a completed check fails without diagnostic output, allowing setup to continue if a subsequent check succeeds.
    • During sandbox recreation, checks with no output are retried alongside the existing “not ready” response.
    • Checks that return diagnostic output or encounter other failures continue to follow existing failure and recovery behavior. A check terminated by a signal fails without deleting the sandbox.

@rsliter rsliter self-assigned this Oct 7, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 06e7387c-4f4f-41fb-84e8-25db577196be
📥 Commits

Reviewing files that changed from the base of the PR and between 05f78be and b281fa7.

📒 Files selected for processing (3)
  • src/lib/onboard/sandbox-fresh-readiness.test.ts
  • src/lib/onboard/sandbox-gpu-create-flow.test.ts
  • src/lib/onboard/sandbox-gpu-create-run-attempt.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Completed executable probes with nonzero exit status and empty output are retried during sandbox readiness checks. Signaled probes remain failures. Tests and troubleshooting guidance cover these cases.

Changes

Sandbox readiness polling

Layer / File(s) Summary
Retry empty-output readiness probes
src/lib/onboard/sandbox-gpu-create-run-attempt.ts, src/lib/onboard/sandbox-fresh-readiness.test.ts, src/lib/onboard/sandbox-gpu-create-flow.test.ts, docs/reference/troubleshooting.mdx
The readiness check returns not_ready for non-signaled, nonzero probes with empty normalized output. It returns probe_failed when a command is signaled. Tests cover retrying an empty-output probe, later success, and failure after a signaled probe. Troubleshooting guidance describes retry conditions for new sandboxes and Docker runtime recreation.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: apurvvkumaria, senthilr-nv

Merge Risk: ⚪ Minimal · up to b281f

Empty readiness responses can be retried while signal-terminated probes still stop startup. No merge-blocking issue is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: retrying empty readiness probes during sandbox startup.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit b281fa7 in the fix/sandbox-exec-rea... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/sandbox-exec-rea... b281fa7 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit b281fa7 in the fix/sandbox-exec-rea... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/sandbox-exec-rea... b281fa7 +/-
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/state/sandbox.ts 92% 83% -9%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/policy/index.ts 71% 80% +9%
src/lib/state/p...l-retirement.ts 79% 92% +13%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/inferen...nvidia/index.ts 0% 85% +85%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 91% +91%
src/lib/securit...ig-structure.ts 0% 98% +98%

Updated October 07, 2026 20:21 UTC

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@rsliter
rsliter marked this pull request as ready for review October 7, 2026 14:58
@rsliter
rsliter requested a review from deepujain October 7, 2026 19:45
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit b281fa7. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@prekshivyas
prekshivyas merged commit dd02bc0 into main Oct 7, 2026
108 checks passed
@prekshivyas
prekshivyas deleted the fix/sandbox-exec-readiness-race branch October 7, 2026 21:16
@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants