fix: use named exec for bridge health probe (Fixes #2018)#2037
fix: use named exec for bridge health probe (Fixes #2018)#2037ericksoa merged 2 commits intoNVIDIA:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated messaging-bridge helpers in Changes
Sequence Diagram(s)(Skipped — changes are a targeted bugfix and tests; no new multi-component flow requiring visualization.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/nemoclaw.ts`:
- Line 1061: readGatewayLog still calls the sandbox exec command using the old
positional form; update its arg array to use the named namespace flag like the
corrected call at line 1061—i.e. change the invocation in readGatewayLog so the
args become ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-c", script]
(matching the "-n", sandboxName, "--" pattern) instead of passing sandboxName
positionally so the namespace is specified consistently.
🪄 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: Pro Plus
Run ID: 6abf4984-8ac1-472f-9ca6-ad5e627da906
📒 Files selected for processing (2)
src/nemoclaw.tstest/cli.test.ts
Fixes NVIDIA#2018 Signed-off-by: Deepak Jain <[email protected]>
5c9195d to
9f3caf4
Compare
|
Rebased on current main and addressed the CodeRabbit follow-up. The status helpers now use the named sandbox exec form consistently, and the focused CLI suite passes locally. |
ericksoa
left a comment
There was a problem hiding this comment.
Clean, focused fix. The -n flag form with -- separator is the correct named-sandbox invocation for OpenShell. Both callsites (bridge health probe and gateway log tail) get the same treatment. Test creates a fake openshell binary and asserts the exact argv shape — solid regression coverage.
CI hasn't run yet (only CodeRabbit completed) — please ensure the checks workflow passes before merging.
Fixes #2018
Summary
checkMessagingBridgeHealth()was callingopenshell sandbox execwith the sandbox name as a positional argument. That form silently misses the intended sandbox on current OpenShell, so the Telegram conflict probe never checks the right target.This change switches the probe to the named-sandbox form that OpenShell expects.
Changes
src/nemoclaw.ts: changed the bridge-health probe to useopenshell sandbox exec -n <sandbox> -- sh -c ....test/cli.test.ts: added a CLI regression test that drivesnemoclaw statuswith a fakeopenshellbinary and verifies the exact argv shape used for the bridge-health exec call.Testing
npm run build:clinpm run typecheck:clinpm test -- test/cli.test.tsEvidence It Works
sandbox exec -n alpha -- sh -c ....Notes
npm test. In this worktree it still reproduces unrelated existing failures intest/legacy-path-guard.test.ts,src/lib/preflight.test.ts,src/lib/sandbox-version.test.ts, andtest/install-preflight.test.ts.Signed-off-by: Deepak Jain [email protected]
Summary by CodeRabbit