fix: detect sandbox context in status command to prevent false negatives#69
Merged
fix: detect sandbox context in status command to prevent false negatives#69
Conversation
When running inside an active OpenShell sandbox, `openshell` host commands are unavailable, causing `openclaw nemoclaw status` to silently report "not running" and "Not configured" even though the sandbox is active and inference is working. This adds sandbox detection so the status command reports accurate context instead of false negatives. Closes #25 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds 22 unit tests covering all status command scenarios: - Host with no openshell (blank state) - Host with running sandbox and configured inference - Host with running sandbox but no inference - Inside sandbox (core bug fix — no false negatives) - Inside sandbox with prior plugin state and rollback - Edge cases (custom sandbox name, detection via either marker dir, missing uptime) Also sets up vitest as the project test framework. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Before: After: |
kjw3
approved these changes
Mar 17, 2026
Ryuketsukami
pushed a commit
to Ryuketsukami/NemoClaw
that referenced
this pull request
Mar 24, 2026
…ves (NVIDIA#69) * fix: detect sandbox context in status command to prevent false negatives When running inside an active OpenShell sandbox, `openshell` host commands are unavailable, causing `openclaw nemoclaw status` to silently report "not running" and "Not configured" even though the sandbox is active and inference is working. This adds sandbox detection so the status command reports accurate context instead of false negatives. Closes NVIDIA#25 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test: add vitest unit tests for status command sandbox detection Adds 22 unit tests covering all status command scenarios: - Host with no openshell (blank state) - Host with running sandbox and configured inference - Host with running sandbox but no inference - Inside sandbox (core bug fix — no false negatives) - Inside sandbox with prior plugin state and rollback - Edge cases (custom sandbox name, detection via either marker dir, missing uptime) Also sets up vitest as the project test framework. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jessesanford
pushed a commit
to jessesanford/NemoClaw
that referenced
this pull request
Mar 24, 2026
…ves (NVIDIA#69) * fix: detect sandbox context in status command to prevent false negatives When running inside an active OpenShell sandbox, `openshell` host commands are unavailable, causing `openclaw nemoclaw status` to silently report "not running" and "Not configured" even though the sandbox is active and inference is working. This adds sandbox detection so the status command reports accurate context instead of false negatives. Closes NVIDIA#25 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test: add vitest unit tests for status command sandbox detection Adds 22 unit tests covering all status command scenarios: - Host with no openshell (blank state) - Host with running sandbox and configured inference - Host with running sandbox but no inference - Inside sandbox (core bug fix — no false negatives) - Inside sandbox with prior plugin state and rollback - Edge cases (custom sandbox name, detection via either marker dir, missing uptime) Also sets up vitest as the project test framework. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mafueee
pushed a commit
to mafueee/NemoClaw
that referenced
this pull request
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #25 —
openclaw nemoclaw statusreported "not running" and "Not configured" even inside an active sandbox with working inference.Root cause:
getSandboxStatus()andgetInferenceStatus()shell out toopenshellhost commands. Inside a sandbox, those commands aren't available, so both calls fail silently and return false negatives.Fix: Added
isInsideSandbox()detection (checks for/sandbox/.openclawor/sandbox/.nemoclaw, consistent with existing sandbox path conventions inmigrate.tsandmigration-state.ts). When inside a sandbox:openshellhost commands entirely (they'd always fail)"active (inside sandbox)"instead of"not running""unable to query from inside sandbox"instead of"Not configured"insideSandbox: booleanat the top level and in each subsectionTest results
All 9 test cases passed. Tests ran in Docker containers simulating host and sandbox environments with mock
openshellcommands./nemoclaw status— unaffectedopenclaw nemoclaw logsunchangedTotal: 93 assertions, 0 failures
Additionally, 22 unit tests added with vitest covering all status command scenarios.
Key validations:
slash.tsandlogs.tsare completely unaffected (separate code paths, verified via diff)