From 757dcb5db8b48a46dee4380e6637f5e3be5c151d Mon Sep 17 00:00:00 2001 From: Aaron Erickson Date: Thu, 23 Apr 2026 08:05:13 -0700 Subject: [PATCH 1/2] style(test): apply shfmt formatting to E2E scripts The squash merge of #2351 skipped pre-commit hooks, leaving shfmt formatting violations in the snapshot-commands and deployment-services test scripts. Run shfmt -w to fix. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/e2e/test-deployment-services.sh | 18 +++++++++--------- test/e2e/test-snapshot-commands.sh | 21 +++++++++++---------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/test/e2e/test-deployment-services.sh b/test/e2e/test-deployment-services.sh index 796a9f6745f..f1fb525ebc1 100755 --- a/test/e2e/test-deployment-services.sh +++ b/test/e2e/test-deployment-services.sh @@ -148,16 +148,16 @@ preflight() { local arch arch=$(uname -m) case "$arch" in - x86_64) arch="amd64" ;; - aarch64 | arm64) arch="arm64" ;; - *) - log "WARNING: Unsupported arch $arch for cloudflared — skipping install" - return 0 - ;; + x86_64) arch="amd64" ;; + aarch64 | arm64) arch="arm64" ;; + *) + log "WARNING: Unsupported arch $arch for cloudflared — skipping install" + return 0 + ;; esac - if curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${arch}" -o /tmp/cloudflared \ - && chmod +x /tmp/cloudflared \ - && sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null; then + if curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${arch}" -o /tmp/cloudflared && + chmod +x /tmp/cloudflared && + sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null; then log "cloudflared installed" else log "WARNING: Could not install cloudflared" diff --git a/test/e2e/test-snapshot-commands.sh b/test/e2e/test-snapshot-commands.sh index 3b4f4f754e8..0d82948ee36 100755 --- a/test/e2e/test-snapshot-commands.sh +++ b/test/e2e/test-snapshot-commands.sh @@ -56,7 +56,8 @@ info() { echo -e "${YELLOW}[INFO]${NC} $1"; } # Sets $VAR_NAME to the combined stdout+stderr and $_CAPTURE_RC to the exit code. _CAPTURE_RC=0 run_capture() { - local _var_name="$1"; shift + local _var_name="$1" + shift _CAPTURE_RC=0 local _output _output=$("$@" 2>&1) || _CAPTURE_RC=$? @@ -107,8 +108,8 @@ pass "NemoClaw installed" info "Phase 2: Writing marker files into sandbox..." openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "mkdir -p /sandbox/.openclaw-data/workspace && echo '${MARKER_CONTENT}' > ${MARKER_FILE}" \ - || fail "Failed to write marker file" + sh -c "mkdir -p /sandbox/.openclaw-data/workspace && echo '${MARKER_CONTENT}' > ${MARKER_FILE}" || + fail "Failed to write marker file" VERIFY=$(openshell sandbox exec --name "${SANDBOX_NAME}" -- cat "${MARKER_FILE}" 2>/dev/null || true) [ "$VERIFY" = "${MARKER_CONTENT}" ] || fail "Marker verification failed: got '${VERIFY}'" @@ -179,8 +180,8 @@ info "Snapshot timestamp: ${SNAPSHOT_TIMESTAMP}" info "Phase 5: Modifying sandbox state and creating second snapshot..." openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "rm -f ${MARKER_FILE} && echo '${SECOND_CONTENT}' > ${SECOND_MARKER}" \ - || fail "Failed to modify sandbox state" + sh -c "rm -f ${MARKER_FILE} && echo '${SECOND_CONTENT}' > ${SECOND_MARKER}" || + fail "Failed to modify sandbox state" # Verify first marker is gone GONE=$(openshell sandbox exec --name "${SANDBOX_NAME}" -- cat "${MARKER_FILE}" 2>/dev/null || echo "GONE") @@ -194,8 +195,8 @@ pass "State modified, second snapshot created" # Perturb workspace so restore has to do real work openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "rm -f ${SECOND_MARKER} && echo 'BROKEN' > ${MARKER_FILE}" \ - || fail "Failed to perturb sandbox before latest restore" + sh -c "rm -f ${SECOND_MARKER} && echo 'BROKEN' > ${MARKER_FILE}" || + fail "Failed to perturb sandbox before latest restore" # ── Phase 6: snapshot restore (latest) ────────────────────────────── info "Phase 6: Restoring latest snapshot..." @@ -257,9 +258,9 @@ run_capture HELP_OUTPUT nemoclaw "${SANDBOX_NAME}" snapshot if [ "$_CAPTURE_RC" -ne 0 ]; then fail "snapshot help exited with code $_CAPTURE_RC: ${HELP_OUTPUT}" fi -if echo "$HELP_OUTPUT" | grep -q "snapshot create" \ - && echo "$HELP_OUTPUT" | grep -q "snapshot list" \ - && echo "$HELP_OUTPUT" | grep -q "snapshot restore"; then +if echo "$HELP_OUTPUT" | grep -q "snapshot create" && + echo "$HELP_OUTPUT" | grep -q "snapshot list" && + echo "$HELP_OUTPUT" | grep -q "snapshot restore"; then pass "snapshot help shows create/list/restore" else fail "snapshot help incomplete: ${HELP_OUTPUT}" From c4d6acb6c7635432ae0f6613f514434c234277eb Mon Sep 17 00:00:00 2001 From: Aaron Erickson Date: Fri, 24 Apr 2026 16:07:44 -0700 Subject: [PATCH 2/2] chore(test): apply shfmt formatting to merged files The merge resolution used &&-at-EOL style but shfmt prefers backslash continuation with &&/|| at the start of the next line. Also fixes case-statement indentation in test-deployment-services.sh. --- .../references/commands.md | 32 +++++++++++++++++++ test/e2e/test-deployment-services.sh | 18 +++++------ test/e2e/test-snapshot-commands.sh | 18 +++++------ 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/.agents/skills/nemoclaw-user-reference/references/commands.md b/.agents/skills/nemoclaw-user-reference/references/commands.md index a7a88fe6cc5..c5c8750e2d7 100644 --- a/.agents/skills/nemoclaw-user-reference/references/commands.md +++ b/.agents/skills/nemoclaw-user-reference/references/commands.md @@ -174,6 +174,15 @@ $ NEMOCLAW_DANGEROUSLY_SKIP_PERMISSIONS=1 nemoclaw onboard --non-interactive --y The flag is persisted on the sandbox registry entry, so `nemoclaw status` surfaces `Permissions: dangerously-skip-permissions (shields permanently down)` for sandboxes created this way. To tighten a sandbox after the fact, re-run `nemoclaw onboard` without the flag. +### `nemoclaw onboard --from` + +Use a custom Dockerfile for the sandbox image. +This variant of `nemoclaw onboard` accepts a `--from ` argument to build the sandbox from a user-supplied Dockerfile instead of the default NemoClaw image. + +```console +$ nemoclaw onboard --from ./Dockerfile.custom +``` + ### `nemoclaw list` List all registered sandboxes with their model, provider, and policy presets. @@ -566,6 +575,18 @@ $ nemoclaw tunnel stop `nemoclaw stop` remains as a deprecated alias that prints a warning and delegates to `tunnel stop`. +### `nemoclaw start` + +> **Warning:** Deprecated. Use `nemoclaw tunnel start` instead. + +This command remains as a compatibility alias to `nemoclaw tunnel start`. + +### `nemoclaw stop` + +> **Warning:** Deprecated. Use `nemoclaw tunnel stop` instead. + +This command remains as a compatibility alias to `nemoclaw tunnel stop`. + ### `nemoclaw status` Show the sandbox list and the status of host auxiliary services (for example cloudflared). @@ -574,6 +595,17 @@ Show the sandbox list and the status of host auxiliary services (for example clo $ nemoclaw status ``` +### `nemoclaw setup` + +> **Warning:** The `nemoclaw setup` command is deprecated. +> Use `nemoclaw onboard` instead. + +This command remains as a compatibility alias to `nemoclaw onboard`. + +```console +$ nemoclaw setup +``` + ### `nemoclaw setup-spark` > **Warning:** The `nemoclaw setup-spark` command is deprecated. diff --git a/test/e2e/test-deployment-services.sh b/test/e2e/test-deployment-services.sh index 2ab44cfd130..391528cbbce 100755 --- a/test/e2e/test-deployment-services.sh +++ b/test/e2e/test-deployment-services.sh @@ -121,17 +121,17 @@ preflight() { local arch arch=$(uname -m) case "$arch" in - x86_64) arch="amd64" ;; - aarch64 | arm64) arch="arm64" ;; - *) - log "WARNING: Unsupported arch $arch for cloudflared — skipping install" - return 0 - ;; + x86_64) arch="amd64" ;; + aarch64 | arm64) arch="arm64" ;; + *) + log "WARNING: Unsupported arch $arch for cloudflared — skipping install" + return 0 + ;; esac local cf_url="${CLOUDFLARED_DOWNLOAD_URL:-https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${arch}}" - if curl -fsSL "$cf_url" -o /tmp/cloudflared && - chmod +x /tmp/cloudflared && - sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null; then + if curl -fsSL "$cf_url" -o /tmp/cloudflared \ + && chmod +x /tmp/cloudflared \ + && sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null; then log "cloudflared installed" else log "WARNING: Could not install cloudflared" diff --git a/test/e2e/test-snapshot-commands.sh b/test/e2e/test-snapshot-commands.sh index c53d4ddd0e4..b1568488d4a 100755 --- a/test/e2e/test-snapshot-commands.sh +++ b/test/e2e/test-snapshot-commands.sh @@ -123,8 +123,8 @@ pass "NemoClaw installed" info "Phase 2: Writing marker files into sandbox..." openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "mkdir -p /sandbox/.openclaw-data/workspace && echo '${MARKER_CONTENT}' > ${MARKER_FILE}" || - fail "Failed to write marker file" + sh -c "mkdir -p /sandbox/.openclaw-data/workspace && echo '${MARKER_CONTENT}' > ${MARKER_FILE}" \ + || fail "Failed to write marker file" VERIFY=$(openshell sandbox exec --name "${SANDBOX_NAME}" -- cat "${MARKER_FILE}" 2>/dev/null || true) [ "$VERIFY" = "${MARKER_CONTENT}" ] || fail "Marker verification failed: got '${VERIFY}'" @@ -187,8 +187,8 @@ info "Snapshot timestamp: ${SNAPSHOT_TIMESTAMP}" info "Phase 5: Modifying sandbox state and creating second snapshot..." openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "rm -f ${MARKER_FILE} && echo '${SECOND_CONTENT}' > ${SECOND_MARKER}" || - fail "Failed to modify sandbox state" + sh -c "rm -f ${MARKER_FILE} && echo '${SECOND_CONTENT}' > ${SECOND_MARKER}" \ + || fail "Failed to modify sandbox state" # Verify first marker is gone GONE=$(openshell sandbox exec --name "${SANDBOX_NAME}" -- cat "${MARKER_FILE}" 2>/dev/null || echo "GONE") @@ -202,8 +202,8 @@ pass "State modified, second snapshot created" # Perturb workspace so restore has to do real work openshell sandbox exec --name "${SANDBOX_NAME}" -- \ - sh -c "rm -f ${SECOND_MARKER} && echo 'BROKEN' > ${MARKER_FILE}" || - fail "Failed to perturb sandbox before latest restore" + sh -c "rm -f ${SECOND_MARKER} && echo 'BROKEN' > ${MARKER_FILE}" \ + || fail "Failed to perturb sandbox before latest restore" # ── Phase 6: snapshot restore (latest) ────────────────────────────── info "Phase 6: Restoring latest snapshot..." @@ -265,9 +265,9 @@ run_capture HELP_OUTPUT nemoclaw "${SANDBOX_NAME}" snapshot if [ "$_CAPTURE_RC" -ne 0 ]; then fail "snapshot help exited with code $_CAPTURE_RC: ${HELP_OUTPUT}" fi -if echo "$HELP_OUTPUT" | grep -q "snapshot create" && - echo "$HELP_OUTPUT" | grep -q "snapshot list" && - echo "$HELP_OUTPUT" | grep -q "snapshot restore"; then +if echo "$HELP_OUTPUT" | grep -q "snapshot create" \ + && echo "$HELP_OUTPUT" | grep -q "snapshot list" \ + && echo "$HELP_OUTPUT" | grep -q "snapshot restore"; then pass "snapshot help shows create/list/restore" else fail "snapshot help incomplete: ${HELP_OUTPUT}"