-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(cli): correct SANDBOX_NAME precedence in start-services.sh #1311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,11 @@ set -euo pipefail | |
| DASHBOARD_PORT="${DASHBOARD_PORT:-18789}" | ||
|
|
||
| # ── Parse flags ────────────────────────────────────────────────── | ||
| SANDBOX_NAME="${NEMOCLAW_SANDBOX:-${SANDBOX_NAME:-default}}" | ||
| # SANDBOX_NAME precedence: --sandbox flag > SANDBOX_NAME env > NEMOCLAW_SANDBOX env > "default" | ||
| # Using SANDBOX_NAME:-... (not NEMOCLAW_SANDBOX:-SANDBOX_NAME:-...) ensures an explicit | ||
| # caller-set SANDBOX_NAME is not silently overridden by a stale NEMOCLAW_SANDBOX export. | ||
| _SANDBOX_DEFAULT="${NEMOCLAW_SANDBOX:-default}" | ||
| SANDBOX_NAME="${SANDBOX_NAME:-$_SANDBOX_DEFAULT}" | ||
|
Comment on lines
+22
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify which scripts still use the old precedence pattern
echo "=== Scripts with old NEMOCLAW_SANDBOX:-SANDBOX_NAME pattern ==="
rg -n 'NEMOCLAW_SANDBOX:-.*SANDBOX_NAME' --type sh
echo ""
echo "=== Test files referencing the old pattern ==="
rg -n 'NEMOCLAW_SANDBOX:-.*SANDBOX_NAME' --type js --type tsRepository: NVIDIA/NemoClaw Length of output: 859 🏁 Script executed: sed -n '120,160p' test/service-env.test.jsRepository: NVIDIA/NemoClaw Length of output: 1646 🏁 Script executed: sed -n '35,45p' scripts/debug.shRepository: NVIDIA/NemoClaw Length of output: 310 Logic fix is correct; existing tests and The two-step expansion correctly implements the intended precedence (SANDBOX_NAME flag > SANDBOX_NAME env > NEMOCLAW_SANDBOX env > "default"). However, the following must be addressed:
🤖 Prompt for AI Agents |
||
| ACTION="start" | ||
|
|
||
| while [ $# -gt 0 ]; do | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SANDBOX_NAME precedence has changed here, but the existing test coverage appears to still assert the old behavior (e.g.,
test/service-env.test.jshas a case expectingNEMOCLAW_SANDBOXto overrideSANDBOX_NAME, and those tests also don’t executestart-services.shdirectly). Please update/add tests to assert the new precedence (SANDBOX_NAME wins over NEMOCLAW_SANDBOX) and ideally exercise the script logic rather than duplicating a parameter-expansion snippet in the test.