Skip to content

fix(sandbox): recover a gateway wedged in any not-serving state - #8092

Merged
prekshivyas merged 15 commits into
NVIDIA:mainfrom
TonyLuo-NV:fix-7377-gateway-serving-watchdog
Aug 4, 2026
Merged

fix(sandbox): recover a gateway wedged in any not-serving state#8092
prekshivyas merged 15 commits into
NVIDIA:mainfrom
TonyLuo-NV:fix-7377-gateway-serving-watchdog

Conversation

@TonyLuo-NV

@TonyLuo-NV TonyLuo-NV commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

The sandbox serving watchdog previously recovered an alive but unusable OpenClaw gateway only after an uninterrupted sequence of connection-refused health probes. A listener can also become unusable when a socket accepts and stalls, accepts and drops the connection, or answers /health with an error status. The watchdog treated each of those results as evidence that a listener existed. It rearmed without a log entry or recovery, so the gateway remained unable to serve. The watchdog now uses the same response requirement as the boot-time readiness check: /health must answer 200 or 401. It recovers each not-serving result. It still does not act before a gateway has served or when the probe cannot run.

Related Issue

Fixes #7377

Changes

  • scripts/nemoclaw-start.sh: added gateway_watchdog_probe_gateway, which classifies a health probe as serving (/health answered 200 or 401), not serving (refused, timed out, reset, empty reply, or an HTTP error status), or inconclusive (the probe itself could not run). The watchdog now counts every not-serving outcome toward one threshold instead of requiring consecutive curl exit 7 results.
  • scripts/nemoclaw-start.sh: inconclusive probes hold the watchdog's armed state and streak rather than rearming it, so a missing or failing curl can never escalate into a kill loop against a healthy gateway. The watchdog also exits early with a message when curl is absent.
  • scripts/nemoclaw-start.sh: each failed probe now logs the cause it observed, such as connection refused, probe timeout, connection reset, or HTTP 503. An operator can distinguish a refused port from a listener that accepts connections but cannot serve.
  • docs/reference/troubleshooting.mdx: documented the serving definition, the wedge symptoms users see (gateway_transport_error, 1006 abnormal closure, container running with no restarts, replies still arriving over the embedded fallback route), and what a health probe inconclusive line means.
  • test/gateway-serving-watchdog.test.ts (new) and test/nemoclaw-start-gateway.test-helpers.ts (new): the watchdog suite moved to its own file with the shared shell-harness helpers extracted, keeping both files inside ci/test-file-size-budget.json.
  • test/gateway-serving-watchdog.test.ts: the PID-swap regression now emits HTTP 200 on the predecessor's successful probe, so it proves that the replacement gateway does not inherit the predecessor's armed state.

The arming rule (never act until the gateway has served at least once), the PID-identity and cmdline checks before signalling, the respawn-marker handshake, and the NEMOCLAW_GATEWAY_WATCHDOG_* environment variable names are all unchanged.

Why the reported sandboxes never recovered

The old counter required four consecutive connection-refused probes. A wedge that alternated between refused and any other failure mode reset that counter on every other probe, which is why the reporter's manual curl showed (7) while the watchdog had still never escalated. That path is now covered by a regression test.

The non-refused outcomes were previously delegated to the Docker HEALTHCHECK. Nothing restarts an unhealthy OpenShell sandbox container, which matches the reported "container restart count: 0" with the gateway wedged indefinitely.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Codex Desktop exact-head security review PASS for head e0c4d7ef9efdadfd19ec494e19edfcad8947d76a against base e9fb170a2e3e4c4dcfa19e398232f71b8f2bace6; all nine categories pass with no findings. The serving prerequisite, strict 200/401 classifier, inconclusive fail-safe, PID start-identity check, gateway command-line check, and signal-time identity revalidation remain intact.
  • Non-success, skipped, or missing CI check accepted by maintainer — no check is accepted, skipped, or waived. The current sandbox-image and reviewed npm-audit failures are hard blockers from dependency advisories on the current base and are being remediated by fix(security): close managed runtime audit gaps #8156; this PR must rerun and pass those gates before merge.

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: docs/reference/troubleshooting.mdx; verified the watchdog behavior, user-visible impact, recovery instructions, and lifecycle limits against the exact implementation and focused tests. Documentation build passed with 0 errors and 2 baseline Fern warnings.
  • Agent: Codex Desktop

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable — npm run validate:pr passed at exact head e0c4d7ef9efdadfd19ec494e19edfcad8947d76a; the final maintainer commit also passed normal pre-commit and commit-msg hooks.
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result: npx vitest run --project integration test/gateway-serving-watchdog.test.ts → 18 passed. The combined watchdog and gateway-health run passed 41 of 42 tests; the sole failure is the neighboring lock-cleanup fixture invoking GNU timeout, which is absent on this macOS host. CI remains authoritative for the full Linux run.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — not claimed locally. Exact-head npm run validate:pr, CLI build, plugin build, focused tests, git diff --check, and npm run docs passed; required GitHub CI and E2E must pass before merge.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — completed with 0 errors and 2 pre-existing non-blocking Fern warnings (local Fern authentication and light-mode accent contrast).
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only) — no new doc pages.

How the fix was verified against the reported failure

Each wedge signature was driven through the real watchdog loop with a scripted probe sequence and a real background process standing in for the gateway. Before the change, only the pure-refused sequence produced any output at all; timeout, reset, empty-reply, HTTP-error, and alternating sequences produced complete silence and no recovery. After the change, each not-serving sequence reaches the recovery threshold. A gateway that has not served, a 401 response, a recovering gateway, and an unrunnable probe leave the gateway process running.


Signed-off-by: Tony Luo xialuo@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved gateway health monitoring to distinguish serving, failed, and inconclusive checks.
    • Recognizes successful and authentication responses, connection failures, timeouts, resets, empty replies, and HTTP errors.
    • Restarts unresponsive gateways after the configured consecutive-failure threshold while avoiding action on inconclusive checks.
    • Validates the gateway process before triggering a restart and applies safe defaults for invalid settings.
  • Documentation

    • Expanded troubleshooting guidance for health checks, transport errors, fallback behavior, and recovery limitations.
  • Tests

    • Added comprehensive coverage for monitoring, recovery thresholds, status handling, process validation, and restart races.

The in-sandbox serving watchdog only ever escalated on curl exit 7, so a
gateway whose process stayed alive while its listener became unusable was
recovered in exactly one shape: an unbroken streak of pure connection-refused
probes. Every other wedge signature read as "a listener exists" and silently
re-armed the watchdog:

  * curl 28 - the socket accepts but nothing answers within the timeout
  * curl 52/56 - accepted then dropped, which is the 1006 abnormal-closure
    transport error surfaced by 'openclaw health'
  * curl 0 with an HTTP error status - /health replies but no session serves

Those outcomes were delegated to the Docker HEALTHCHECK, but nothing restarts
an unhealthy OpenShell sandbox container, so the gateway stayed wedged. A
wedge that alternated between refused and any other failure also reset the
consecutive-refusal counter on every other probe and never reached the
threshold at all, leaving a live watchdog that logged nothing and recovered
nothing.

Classify each probe with the same definition the boot-time readiness gate
uses - /health must answer 200 or 401 - and count every not-serving outcome
toward one threshold. Probes that fail for local reasons (curl missing or
otherwise unable to run) stay inconclusive: they neither arm the watchdog nor
count toward the threshold, so a broken probe can never become a kill loop.
Each failed probe now logs the cause it observed.

Arming after the first serving probe, the PID-identity and cmdline checks
before signalling, and the respawn-marker handshake are unchanged. The
watchdog suite moves to its own file with the shared shell-harness helpers
extracted, keeping both inside the test-file size budget.

Fixes NVIDIA#7377

Signed-off-by: Tony Luo <xialuo@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 3, 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 Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The gateway watchdog now classifies health probes, tracks consecutive not-serving results, and triggers supervised gateway recovery. Tests cover probe outcomes, thresholds, PID identity, process replacement, and restart races. Troubleshooting guidance documents the updated behavior.

Changes

Gateway watchdog recovery

Layer / File(s) Summary
Watchdog probe and recovery behavior
scripts/nemoclaw-start.sh
The watchdog accepts HTTP 200 and 401 as serving, records classified failures, ignores inconclusive probes, and terminates an identity-validated gateway after the configured streak.
Shared shell-test support
test/nemoclaw-start-gateway.test-helpers.ts, test/nemoclaw-start-gateway-health.test.ts
Shared helpers now extract shell functions and create process fixtures. Gateway health tests use the shared helpers and focus on healthcheck markers and supervised lifecycle behavior.
Watchdog behavior validation
test/gateway-serving-watchdog.test.ts
End-to-end tests cover probe outcomes, recovery thresholds, streak resets, PID replacement, environment overrides, unavailable probes, and restart signal races.
Troubleshooting guidance
docs/reference/troubleshooting.mdx
The documentation describes serving responses, failed and inconclusive probes, fallback behavior, recovery timing, and supervisor relaunch.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Watchdog
  participant curl
  participant OpenClawGateway
  participant Supervisor
  Watchdog->>curl: Probe local health endpoint
  curl->>OpenClawGateway: Send health request
  OpenClawGateway-->>curl: Return HTTP status or transport result
  curl-->>Watchdog: Return classified probe result
  Watchdog->>Watchdog: Count consecutive not-serving probes
  Watchdog->>OpenClawGateway: Terminate identity-validated gateway
  Supervisor->>OpenClawGateway: Relaunch gateway
Loading

Suggested labels: area: sandbox, bug-fix

Suggested reviewers: cv, sandl99

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The watchdog now restarts alive gateways after consecutive not-serving probes, addressing issue #7377 and preventing silent fallback.
Out of Scope Changes check ✅ Passed The script, documentation, tests, and shared helpers directly support the watchdog recovery objective in issue #7377.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: recovering sandbox gateways that remain alive but are not serving.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 1 blocker · 2 warnings · 1 suggestion
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; Nemotron reported 1 more blocker, 2 more warnings, 1 more suggestion.
3 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • serving at scripts/nemoclaw-start.sh:4725: selected only by the second-opinion lane as justified.
  • not-serving at scripts/nemoclaw-start.sh:4776: selected only by the second-opinion lane as define.
  • inconclusive at scripts/nemoclaw-start.sh:4777: selected only by the second-opinion lane as conflict.
2 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • ubuntu-repo-cloud-openclaw: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • issue-2478-crash-loop-recovery: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • define — not-serving at docs/reference/troubleshooting.mdx:686: Keep the explicit serving-response contrast and the listed not-serving outcomes.
  • established — inconclusive probe at docs/reference/troubleshooting.mdx:699: Keep this established term and its explicit no-signal, counter-preservation behavior.
  • established — serving watchdog at docs/reference/troubleshooting.mdx:683: Keep the established component name and the response-qualified serving definition.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: gateway-guard-recovery

1 optional E2E recommendation
  • sandbox-survival

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Comment thread test/nemoclaw-start-gateway-health.test.ts Fixed
Address PR Review Advisor warnings on the gateway serving watchdog:

  * cover curl exit 55 (send error), which the probe classifier treats as
    not serving but the parameterized recovery table omitted
  * prove that an inconclusive probe carries an armed streak rather than
    clearing it, so an intermittent local probe failure cannot postpone
    recovery indefinitely
  * name the source boundary the watchdog compensates for and the condition
    that permits removing it, in both the script comment and the
    troubleshooting page
  * define the embedded fallback where the troubleshooting page first uses it

Signed-off-by: Tony Luo <xialuo@nvidia.com>
Address the remaining PR Review Advisor warnings:

  * add a harness case that starts the watchdog with an empty PATH, so the
    `command -v curl` guard sees no probe command at all. This is a distinct
    path from a probe that runs and fails, and removing the guard makes the
    new case fail.
  * correct the troubleshooting page: the watchdog and the startup wait share
    the 200-or-401 response requirement, but the startup path additionally
    verifies listener ownership, so they are not the same check.

Signed-off-by: Tony Luo <xialuo@nvidia.com>
@TonyLuo-NV

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/reference/troubleshooting.mdx`:
- Line 648: Update the troubleshooting sentence around the
gateway_transport_error description to remove both em dashes, replacing them
with guideline-compliant punctuation while preserving the existing meaning and
inline code formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5eb7388f-dc10-44bd-ace6-abd68060d04c

📥 Commits

Reviewing files that changed from the base of the PR and between 61856cb and c5f3264.

📒 Files selected for processing (5)
  • docs/reference/troubleshooting.mdx
  • scripts/nemoclaw-start.sh
  • test/gateway-serving-watchdog.test.ts
  • test/nemoclaw-start-gateway-health.test.ts
  • test/nemoclaw-start-gateway.test-helpers.ts

Comment thread docs/reference/troubleshooting.mdx Outdated
extractGatewayLogAppendFunction moved to the watchdog suite with its only
caller, leaving an unused import behind. Flagged by CodeQL.

Signed-off-by: Tony Luo <xialuo@nvidia.com>
The writing guide in docs/CONTRIBUTING.md prefers commas, colons, or separate
sentences. Flagged by CodeRabbit.

Signed-off-by: Tony Luo <xialuo@nvidia.com>
@TonyLuo-NV

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TonyLuo-NV

Copy link
Copy Markdown
Collaborator Author

Both automated review findings are addressed:

  • CodeQL js/unused-local-variable: removed the extractGatewayLogAppendFunction import that was orphaned when the watchdog suite moved to its own file (2248e82c5). The alert is no longer open against this branch.
  • CodeRabbit em dashes in docs/reference/troubleshooting.mdx: rewritten with commas per the writing guide in docs/CONTRIBUTING.md (e3725bf68).

All checks now pass. The earlier PR review advisor (GPT-5.6 Terra) red was the advisor's own analysis run not completing rather than a finding; it passed on the latest run, so the quality-gate note about needing maintainer acceptance no longer applies and I have removed it from the description.

Both advisor lanes report 0 blockers, 0 warnings, 0 suggestions.

@TonyLuo-NV
TonyLuo-NV marked this pull request as ready for review August 3, 2026 07:40
@TonyLuo-NV

Copy link
Copy Markdown
Collaborator Author

CI status update after the base moved forward.

Three checks went red on the latest run. Two were transient and cleared on a re-run with no code change:

  • build-sandbox-images-arm64: the image build failed while install-reviewed-runtime.sh fetched eventsource-parser@3.1.0 from the npm registry. Passed on re-run in 2m18s.
  • build-typecheck: public-cli-contracts.test.ts failed because dist/lib/state/mcp-lifecycle-lock-acquisition.js hit SyntaxError: Unexpected token '.', a bad build artifact rather than a source defect. Passed on re-run in 7m17s. This branch changes no file under src/.
  • checks was only the aggregate gate reporting the build-typecheck failure, and it is green now.

E2E / PR Gate and E2E / PR Gate Coordination also completed green.

That leaves PR review advisor (Nemotron 3 Ultra), which fails with PR review advisor analysis did not complete: outcome=failure. That is the advisor's own analysis run not finishing, not a finding. I re-ran it twice with the same result, and it passed on an earlier commit of this branch. The aggregated advisor comment records recommendation: merge_as_is with 0 blockers, 0 warnings, and 0 suggestions, and the primary GPT-5.6 Terra lane completed with high confidence.

Current tally: 45 passing, 1 failing on that advisor lane. A maintainer needs to decide whether to accept it; I have restored the corresponding Quality Gates line in the description rather than marking it resolved.

Note: this branch is behind main by two commits (a931be4f0, 4cd4d64fe). Neither touches the watchdog, and CI already tests the merge result, so I have not rebased. Say the word if you would like the branch refreshed.

cv added 2 commits August 3, 2026 03:03
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Security review: PASS

Verdict

PASS for commit 8d6411a0d15a7b3fc32325b2774462e2b0bb3e9c against base SHA 4cd4d64fe67143b57707f874afa0b9d269dfeff2. The watchdog broadens recovery from connection-refused probes to all defined not-serving results, but it does not broaden process authority: it arms only after a 200 or 401 response, retains the tracked PID start identity, checks the gateway command line, and revalidates the PID identity immediately before signaling. No security findings remain.

Findings table

The review found no findings.

Detailed analysis

  1. Secrets and credentials — PASS. No secret, token, credential, connection string, or credential fixture was added or logged.
  2. Input validation and data sanitization — PASS. The existing validated loopback port remains a quoted curl argument. Probe exit codes and HTTP status values are classified without eval or shell-generated command text. Invalid watchdog interval and threshold values still fall back to positive defaults.
  3. Authentication and authorization — PASS. No endpoint or authentication contract changes. Process signaling still requires prior serving evidence, the tracked PID/start-identity pair, a gateway command-line match, and a second live-identity check immediately before the signal.
  4. Dependencies and third-party libraries — PASS. No dependency, image, package source, or version changed.
  5. Error handling and logging — PASS. Probe failures are fail-safe: unknown curl failures are inconclusive and cannot trigger a signal. Logs contain only the tracked PID, loopback port, bounded failure count, and classified cause; they do not contain credentials or personal data.
  6. Cryptography and data protection — PASS. No cryptography, storage, transport trust, or sensitive-data handling changed.
  7. Configuration and security headers — PASS. No listener, CORS, CSP, network policy, privilege, image, or security-header setting changed. The probe remains limited to the sandbox loopback health endpoint.
  8. Security testing — PASS. Tests cover pre-serving refusal, recovery and streak reset, each admitted transport failure, HTTP error responses, 401, alternating failures, missing or inconclusive curl, invalid configuration, command-line mismatch, PID replacement, and signal-time identity handling.
  9. System security — PASS. The change retains least-privilege signaling and the existing PID-reuse defenses. An unavailable or unexpected probe cannot arm or advance recovery, a replacement process must establish its own serving history, and the target is revalidated before TERM or KILL.

Files reviewed

  • docs/reference/troubleshooting.mdx
  • scripts/nemoclaw-start.sh
  • test/gateway-serving-watchdog.test.ts
  • test/nemoclaw-start-gateway-health.test.ts
  • test/nemoclaw-start-gateway.test-helpers.ts

GitHub CI is authoritative for validation. I did not run a duplicate local test suite; the normal commit and pre-push hooks passed, including repository checks, ShellCheck, secret scanning, formatting, and CLI TypeScript validation.

cv added 2 commits August 3, 2026 07:57
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Merge current main and preserve contributor attribution.

Align diagnostics, tests, comments, and troubleshooting guidance with serving behavior.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions github-actions Bot added v0.0.102 and removed v0.0.101 labels Aug 3, 2026
@prekshivyas prekshivyas self-assigned this Aug 3, 2026

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head c1e3c19. The runtime behavior is safe: arming requires HTTP 200 or 401, transport failures remain not-serving, unknown probe failures stay inconclusive, and PID identity plus command line are rechecked before signaling. Required CI and E2E pass, so this is safe to merge.\n\nNon-blocking fast-follow: the swap-test curl stub in test/gateway-serving-watchdog.test.ts returns success without printing an HTTP status, so the classifier sees HTTP 000 and the test does not actually exercise per-PID armed-state reset. Please narrowly follow up by printing 200 in the success branch or reusing the status-aware curl-plan stub. This is a test-confidence improvement, not a merge blocker.

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 47accd8. The runtime and documentation behavior remain unchanged from the prior review. The only PR-specific follow-up makes the PID-swap test emit HTTP 200, so it now genuinely exercises per-PID watchdog state reset. The focused watchdog suite passes 18 of 18 tests. Current unrelated CI failures reproduce in files identical to the current base; no blocking correctness, security, regression, or compatibility defect is attributable to this PR.

@TonyLuo-NV

Copy link
Copy Markdown
Collaborator Author

Branch refreshed on current main (47accd83a). It was eight commits behind; the merge was clean with no conflicts, and the watchdog suite still passes locally (18/18), as do the sibling gateway-health and kill-marker suites.

Current CI has three distinct failures, none of them from the watchdog change. This branch touches only scripts/nemoclaw-start.sh, three test files, and one docs page.

1. reviewed-npm-audit threshold (repo-wide). install-reviewed-runtime.sh fails the audit gate on mcp-tool-discovery-runtime dependencies with 3 vulnerabilities (1 moderate, 2 high). This cascades into build-sandbox-images, build-sandbox-images-arm64, checks, cli-tests, and both E2E gate jobs, which only report PR #8092 CI did not pass. Re-running does not help. Unrelated PRs (#8183, #8182, #8179, #8174) fail the same way, so this needs a dependency bump or an entry in ci/npm-audit-exceptions.json from someone who owns that surface.

2. cli-test-shards (8). src/lib/onboard/managed-image-registry-fetch.test.ts:39 times out at 5000ms, three runs in a row. That test binds a real HTTP server and proxy and belongs to #7772, not to this branch. It passes locally against this exact merge (5/5). Shard 8 passed on this branch before the merge, so the likely cause is that the merge shifted the shard split and put this test alongside heavier neighbours rather than any behavior change. Flagging rather than re-running further, and I have not touched the upstream test's timeout.

3. Previously transient, now green. build-typecheck failed once on public-cli-contracts.test.ts (check-docs: running: [cli]) and passed on re-run, same as yesterday.

Both PR review advisor lanes pass, along with all CodeQL and ShellCheck jobs and shards 1-7.

@prekshivyas
prekshivyas merged commit a561719 into NVIDIA:main Aug 4, 2026
50 checks passed
@wscurran wscurran added area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression labels Aug 4, 2026
apurvvkumaria added a commit that referenced this pull request Aug 4, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prepares the canonical v0.0.102 release documentation from the current
release-labeled scope.
The change adds a dated changelog for all 38 user-facing shipping PRs
and corrects the OpenClaw agent command reference for the behavior
delivered by #8191.

## Changes

- Add `docs/changelog/2026-08-04.mdx` with the v0.0.102 release summary,
detailed behavior changes, support boundaries, security evidence links,
and links to durable documentation.
- Update `docs/reference/commands.mdx` to describe non-JSON OpenClaw
output capture, its combined limit, marker handling, stream suppression,
recovery guidance, and exit behavior.
- [#8167](#8167) ->
`docs/changelog/2026-08-04.mdx`: Records authenticated attachment of
operator-managed llama.cpp servers.
- [#8129](#8129) ->
`docs/changelog/2026-08-04.mdx`: Records the Experimental managed vLLM
profile for two DGX Spark systems.
- [#7983](#7983) ->
`docs/changelog/2026-08-04.mdx`: Records qualification of the May 2026
GB300WS factory image.
- [#8207](#8207) ->
`docs/changelog/2026-08-04.mdx`: Records the qualified DGX Station
driver transaction.
- [#8208](#8208) ->
`docs/changelog/2026-08-04.mdx`: Records mode-bound Express resume
state.
- [#8158](#8158) ->
`docs/changelog/2026-08-04.mdx`: Records recovery of host-global
dual-Station runtime ownership.
- [#8145](#8145) ->
`docs/changelog/2026-08-04.mdx`: Records Windows-host Ollama validation
from Docker Desktop's network context.
- [#8190](#8190) ->
`docs/changelog/2026-08-04.mdx`: Records HTTP model pulls when WSL has
no local Ollama executable.
- [#8195](#8195) ->
`docs/changelog/2026-08-04.mdx`: Records reuse of a healthy
installer-managed CLI.
- [#8053](#8053) ->
`docs/changelog/2026-08-04.mdx`: Records early rejection of incompatible
OpenShell gateway versions.
- [#8098](#8098) ->
`docs/changelog/2026-08-04.mdx`: Records the bounded
package-service-to-standalone gateway recovery transition.
- [#8216](#8216) ->
`docs/changelog/2026-08-04.mdx`: Records the final dashboard port
selected during multi-sandbox onboarding.
- [#8146](#8146) ->
`docs/changelog/2026-08-04.mdx`: Records managed startup-state
restoration for stopped sandboxes.
- [#8092](#8092) ->
`docs/changelog/2026-08-04.mdx`: Records gateway watchdog recovery for
classified not-serving states.
- [#8182](#8182) ->
`docs/changelog/2026-08-04.mdx`: Records consistent managed-recovery
wait configuration.
- [#8040](#8040) ->
`docs/changelog/2026-08-04.mdx`: Records Docker sandbox rollback
authority through late validation.
- [#8130](#8130) ->
`docs/changelog/2026-08-04.mdx`: Records bounded Shields deadline
recovery and durable containment.
- [#8086](#8086) ->
`docs/changelog/2026-08-04.mdx`: Records repair of narrowly validated
permission-only configuration drift.
- [#8122](#8122) ->
`docs/changelog/2026-08-04.mdx`: Records prompt failure and guidance for
corrupt transition locks.
- [#8124](#8124) ->
`docs/changelog/2026-08-04.mdx`: Records policy restoration flags,
previews, and target revalidation.
- [#7886](#7886) ->
`docs/changelog/2026-08-04.mdx`: Records explicit destruction after
pre-delete Shields hardening failures while preserving recovery
authority.
- [#7901](#7901) ->
`docs/changelog/2026-08-04.mdx`: Records multi-port uninstall behavior
and shared-resource preservation.
- [#7984](#7984) ->
`docs/changelog/2026-08-04.mdx`: Records one classified transient remote
MCP startup retry.
- [#7954](#7954) ->
`docs/changelog/2026-08-04.mdx`: Records bounded hosted-inference probe
replies.
- [#7574](#7574) ->
`docs/changelog/2026-08-04.mdx`: Records preservation of validated
reasoning capabilities through onboarding.
- [#8089](#8089) ->
`docs/changelog/2026-08-04.mdx`: Records proxy routing for Hermes
WhatsApp pairing and media traffic.
- [#7682](#7682) ->
`docs/changelog/2026-08-04.mdx`: Records native Hermes session deletion
and identifier validation.
- [#8150](#8150) ->
`docs/changelog/2026-08-04.mdx`: Records corporate CA trust for
LangChain Deep Agents Code image builds.
- [#8156](#8156) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed managed runtime
dependency remediation.
- [#8180](#8180) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed MCP discovery runtime
dependency updates.
- [#8196](#8196) ->
`docs/changelog/2026-08-04.mdx`: Records private npm dependency
remediation across managed images.
- [#8203](#8203) ->
`docs/changelog/2026-08-04.mdx`: Records reviewed Hermes and LangChain
Deep Agents Code Python dependency updates.
- [#8125](#8125) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for invalid
enumerated CLI values.
- [#8193](#8193) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for
unresolved sandbox base images.
- [#8118](#8118) ->
`docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for changed
gateway authority.
- [#8191](#8191) ->
`docs/changelog/2026-08-04.mdx`, `docs/reference/commands.mdx`: Records
output capture, marker handling, recovery guidance, and exit behavior
for non-JSON OpenClaw agent commands.
- [#8187](#8187) ->
`docs/changelog/2026-08-04.mdx`: Records the aligned
interactive-installation start across supported agents.
- [#8153](#8153) ->
`docs/changelog/2026-08-04.mdx`: Records current product capabilities
and support boundaries.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: This documentation-only
release preparation does not change executable behavior. Existing
changelog and published-route tests pass.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: Independently reviewed `docs/changelog/2026-08-04.mdx` and
`docs/reference/commands.mdx` at commit `b89913780`. All 38 user-facing
v0.0.102 PRs are represented, #8191 behavior matches the implementation,
and the writing rules, documentation style, controlled terminology,
route structure, and skip policy pass review. Targeted tests pass 36/36
and the documentation build completes with 0 errors.
- Agent: Codex Desktop independent documentation writer
<!-- docs-review-head-sha: b899137 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: Not applicable

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run --project integration
test/changelog-docs.test.ts test/check-docs-published-routes.test.ts`
passed 36/36.
- [x] Applicable broad gate passed — not applicable to
documentation-only changes; `npm run docs` completed successfully with 0
errors.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors and 2 existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)
— the native dated changelog uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

---
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added release notes for v0.0.102, covering authentication, hardware
setup, WSL, installer recovery, sandbox resilience, policy management,
inference reliability, CLI improvements, and unified quickstarts.
- Updated command documentation to explain how non-JSON agent output is
collected, replayed, and reported.

- **Bug Fixes**
- Improved command-output recovery guidance when output exceeds limits
or contains unsupported fallback markers.
- Preserved accurate command exit-status reporting after output
processing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ubuntu 24.04][Sandbox] gateway stays unavailable without self-recovery while its process remains alive

6 participants