From 09168e3aa601f1fb5fb926f3315bd512dd2b5899 Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Thu, 2 Apr 2026 12:43:05 +0800 Subject: [PATCH 1/8] fix(sandbox): add credentials dir to writable state layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permission fixes: - Add /sandbox/.openclaw-data/credentials to the writable state layout in Dockerfile.base (mkdir + symlink), following the same pattern as agents, extensions, workspace, and other existing directories - This resolves EACCES errors when WhatsApp/Telegram bridges attempt to mkdir /sandbox/.openclaw/credentials at runtime Gateway token export: - Add export_gateway_token() to nemoclaw-start.sh that reads gateway.auth.token from openclaw.json and exports it as OPENCLAW_GATEWAY_TOKEN - Persist the token to ~/.bashrc and ~/.profile using the same marker-based idempotent pattern as the proxy config, so interactive sessions (openshell sandbox connect) also see the variable - Called in both root and non-root startup paths Security properties preserved: - /sandbox/.openclaw remains root-owned, chmod 755 (read-only for sandbox user) - openclaw.json remains chmod 444 (immutable) - New credentials symlink is chown -h root:root like all other symlinks - No new attack surface — credentials dir follows identical pattern to 10 existing writable subdirectories Fixes #1114 Signed-off-by: Dongni Yang Co-authored-by: Claude Sonnet 4.6 --- Dockerfile.base | 2 ++ scripts/nemoclaw-start.sh | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/Dockerfile.base b/Dockerfile.base index 3fd658485c4..b361c2c0204 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -102,6 +102,7 @@ RUN mkdir -p /sandbox/.openclaw-data/agents/main/agent \ /sandbox/.openclaw-data/canvas \ /sandbox/.openclaw-data/cron \ /sandbox/.openclaw-data/memory \ + /sandbox/.openclaw-data/credentials \ && mkdir -p /sandbox/.openclaw \ && ln -s /sandbox/.openclaw-data/agents /sandbox/.openclaw/agents \ && ln -s /sandbox/.openclaw-data/extensions /sandbox/.openclaw/extensions \ @@ -113,6 +114,7 @@ RUN mkdir -p /sandbox/.openclaw-data/agents/main/agent \ && ln -s /sandbox/.openclaw-data/canvas /sandbox/.openclaw/canvas \ && ln -s /sandbox/.openclaw-data/cron /sandbox/.openclaw/cron \ && ln -s /sandbox/.openclaw-data/memory /sandbox/.openclaw/memory \ + && ln -s /sandbox/.openclaw-data/credentials /sandbox/.openclaw/credentials \ && touch /sandbox/.openclaw-data/update-check.json \ && ln -s /sandbox/.openclaw-data/update-check.json /sandbox/.openclaw/update-check.json \ && chown -R sandbox:sandbox /sandbox/.openclaw /sandbox/.openclaw-data diff --git a/scripts/nemoclaw-start.sh b/scripts/nemoclaw-start.sh index f80c4a272de..6dd63a53f67 100755 --- a/scripts/nemoclaw-start.sh +++ b/scripts/nemoclaw-start.sh @@ -115,6 +115,47 @@ verify_config_integrity() { fi } +export_gateway_token() { + local token + token="$( + python3 - <<'PYTOKEN' +import json +try: + cfg = json.load(open('/sandbox/.openclaw/openclaw.json')) + print(cfg.get('gateway', {}).get('auth', {}).get('token', '')) +except Exception: + print('') +PYTOKEN + )" + if [ -z "$token" ]; then + return + fi + export OPENCLAW_GATEWAY_TOKEN="$token" + + # Persist to .bashrc/.profile so interactive sessions (openshell sandbox + # connect) also see the token — same pattern as the proxy config above. + local marker_begin="# nemoclaw-gateway-token begin" + local marker_end="# nemoclaw-gateway-token end" + local snippet + snippet="${marker_begin} +export OPENCLAW_GATEWAY_TOKEN=\"${token}\" +${marker_end}" + + for rc_file in "${_SANDBOX_HOME}/.bashrc" "${_SANDBOX_HOME}/.profile"; do + if [ -f "$rc_file" ] && grep -qF "$marker_begin" "$rc_file" 2>/dev/null; then + local tmp + tmp="$(mktemp)" + awk -v b="$marker_begin" -v e="$marker_end" \ + '$0==b{s=1;next} $0==e{s=0;next} !s' "$rc_file" >"$tmp" + printf '%s\n' "$snippet" >>"$tmp" + cat "$tmp" >"$rc_file" + rm -f "$tmp" + elif [ -w "$rc_file" ] || [ -w "$(dirname "$rc_file")" ]; then + printf '\n%s\n' "$snippet" >>"$rc_file" + fi + done +} + write_auth_profile() { if [ -z "${NVIDIA_API_KEY:-}" ]; then return @@ -345,6 +386,7 @@ if [ "$(id -u)" -ne 0 ]; then echo "[SECURITY] Config integrity check failed — refusing to start (non-root mode)" >&2 exit 1 fi + export_gateway_token write_auth_profile if [ ${#NEMOCLAW_CMD[@]} -gt 0 ]; then @@ -374,6 +416,7 @@ fi # Verify config integrity before starting anything verify_config_integrity +export_gateway_token # Write auth profile as sandbox user (needs writable .openclaw-data) gosu sandbox bash -c "$(declare -f write_auth_profile); write_auth_profile" From 69db8ed9cc4d93a199e0ce43f3930c35f53a7411 Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Fri, 3 Apr 2026 14:19:45 +0800 Subject: [PATCH 2/8] fix(sandbox): clean stale gateway token from rc files on empty token When the gateway token is empty or revoked, remove previously written marker blocks from .bashrc/.profile to prevent stale credentials from persisting in interactive sessions. Signed-off-by: Dongni Yang Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/nemoclaw-start.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/nemoclaw-start.sh b/scripts/nemoclaw-start.sh index 6dd63a53f67..813eca90407 100755 --- a/scripts/nemoclaw-start.sh +++ b/scripts/nemoclaw-start.sh @@ -127,15 +127,28 @@ except Exception: print('') PYTOKEN )" + local marker_begin="# nemoclaw-gateway-token begin" + local marker_end="# nemoclaw-gateway-token end" + if [ -z "$token" ]; then + # Remove any stale marker blocks from rc files so revoked/old tokens + # are not re-exported in later interactive sessions. + for rc_file in "${_SANDBOX_HOME}/.bashrc" "${_SANDBOX_HOME}/.profile"; do + if [ -f "$rc_file" ] && grep -qF "$marker_begin" "$rc_file" 2>/dev/null; then + local tmp + tmp="$(mktemp)" + awk -v b="$marker_begin" -v e="$marker_end" \ + '$0==b{s=1;next} $0==e{s=0;next} !s' "$rc_file" >"$tmp" + cat "$tmp" >"$rc_file" + rm -f "$tmp" + fi + done return fi export OPENCLAW_GATEWAY_TOKEN="$token" # Persist to .bashrc/.profile so interactive sessions (openshell sandbox # connect) also see the token — same pattern as the proxy config above. - local marker_begin="# nemoclaw-gateway-token begin" - local marker_end="# nemoclaw-gateway-token end" local snippet snippet="${marker_begin} export OPENCLAW_GATEWAY_TOKEN=\"${token}\" From 8b38502d7aa7bf49221a2b693c88719dd823d2c8 Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Fri, 3 Apr 2026 15:14:21 +0800 Subject: [PATCH 3/8] refactor: drop credentials dir layout (covered by #1126) Remove the Dockerfile.base credentials directory changes to avoid overlap with PR #1126 which already addresses that fix. Signed-off-by: Dongni Yang Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile.base | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index b361c2c0204..3fd658485c4 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -102,7 +102,6 @@ RUN mkdir -p /sandbox/.openclaw-data/agents/main/agent \ /sandbox/.openclaw-data/canvas \ /sandbox/.openclaw-data/cron \ /sandbox/.openclaw-data/memory \ - /sandbox/.openclaw-data/credentials \ && mkdir -p /sandbox/.openclaw \ && ln -s /sandbox/.openclaw-data/agents /sandbox/.openclaw/agents \ && ln -s /sandbox/.openclaw-data/extensions /sandbox/.openclaw/extensions \ @@ -114,7 +113,6 @@ RUN mkdir -p /sandbox/.openclaw-data/agents/main/agent \ && ln -s /sandbox/.openclaw-data/canvas /sandbox/.openclaw/canvas \ && ln -s /sandbox/.openclaw-data/cron /sandbox/.openclaw/cron \ && ln -s /sandbox/.openclaw-data/memory /sandbox/.openclaw/memory \ - && ln -s /sandbox/.openclaw-data/credentials /sandbox/.openclaw/credentials \ && touch /sandbox/.openclaw-data/update-check.json \ && ln -s /sandbox/.openclaw-data/update-check.json /sandbox/.openclaw/update-check.json \ && chown -R sandbox:sandbox /sandbox/.openclaw /sandbox/.openclaw-data From 2cc5d78d74b4de4f2020c1de49c492d4ee4a2458 Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 7 Apr 2026 11:02:16 +0800 Subject: [PATCH 4/8] refactor(sandbox): extract _read_gateway_token helper Address CodeRabbit review: use `with open()` context manager and deduplicate the token-reading Python snippet shared by export_gateway_token and print_dashboard_urls. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/nemoclaw-start.sh | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/scripts/nemoclaw-start.sh b/scripts/nemoclaw-start.sh index 9ee289e9488..9dcaf8565f1 100755 --- a/scripts/nemoclaw-start.sh +++ b/scripts/nemoclaw-start.sh @@ -115,18 +115,21 @@ verify_config_integrity() { fi } -export_gateway_token() { - local token - token="$( - python3 - <<'PYTOKEN' +_read_gateway_token() { + python3 - <<'PYTOKEN' import json try: - cfg = json.load(open('/sandbox/.openclaw/openclaw.json')) + with open('/sandbox/.openclaw/openclaw.json') as f: + cfg = json.load(f) print(cfg.get('gateway', {}).get('auth', {}).get('token', '')) except Exception: print('') PYTOKEN - )" +} + +export_gateway_token() { + local token + token="$(_read_gateway_token)" local marker_begin="# nemoclaw-gateway-token begin" local marker_end="# nemoclaw-gateway-token end" @@ -259,19 +262,7 @@ configure_messaging_channels() { print_dashboard_urls() { local token chat_ui_base local_url remote_url - token="$( - python3 - <<'PYTOKEN' -import json -import os -path = '/sandbox/.openclaw/openclaw.json' -try: - cfg = json.load(open(path)) -except Exception: - print('') -else: - print(cfg.get('gateway', {}).get('auth', {}).get('token', '')) -PYTOKEN - )" + token="$(_read_gateway_token)" chat_ui_base="${CHAT_UI_URL%/}" local_url="http://127.0.0.1:${PUBLIC_PORT}/" From 902eaab03059e590083b3834b3fca1e3e506c5fe Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 7 Apr 2026 11:27:21 +0800 Subject: [PATCH 5/8] fix(sandbox): guard openclaw configure with actionable error (#1114) Running `openclaw configure` inside the sandbox fails with a cryptic EACCES because Landlock enforces read-only on /sandbox/.openclaw/ at the kernel level. The atomic-write temp file lands in the locked directory and is rejected. Install a shell function wrapper in .bashrc/.profile that intercepts `openclaw configure` and prints a clear message directing users to `nemoclaw onboard --resume` on the host instead. Fixes #1114 Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/nemoclaw-start.sh | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/scripts/nemoclaw-start.sh b/scripts/nemoclaw-start.sh index 9dcaf8565f1..87b95100b53 100755 --- a/scripts/nemoclaw-start.sh +++ b/scripts/nemoclaw-start.sh @@ -172,6 +172,49 @@ ${marker_end}" done } +install_configure_guard() { + # Installs a shell function that intercepts `openclaw configure` inside the + # sandbox. The config is Landlock read-only — atomic writes to + # /sandbox/.openclaw/ fail with EACCES. Instead of a cryptic error, guide + # the user to the correct host-side workflow. + local marker_begin="# nemoclaw-configure-guard begin" + local marker_end="# nemoclaw-configure-guard end" + local snippet + read -r -d '' snippet <<'GUARD' || true +# nemoclaw-configure-guard begin +openclaw() { + case "$1" in + configure) + echo "Error: 'openclaw configure' cannot modify config inside the sandbox." >&2 + echo "The sandbox config is read-only (Landlock enforced) for security." >&2 + echo "" >&2 + echo "To change your configuration, exit the sandbox and run:" >&2 + echo " nemoclaw onboard --resume" >&2 + echo "" >&2 + echo "This rebuilds the sandbox with your updated settings." >&2 + return 1 + ;; + esac + command openclaw "$@" +} +# nemoclaw-configure-guard end +GUARD + + for rc_file in "${_SANDBOX_HOME}/.bashrc" "${_SANDBOX_HOME}/.profile"; do + if [ -f "$rc_file" ] && grep -qF "$marker_begin" "$rc_file" 2>/dev/null; then + local tmp + tmp="$(mktemp)" + awk -v b="$marker_begin" -v e="$marker_end" \ + '$0==b{s=1;next} $0==e{s=0;next} !s' "$rc_file" >"$tmp" + printf '%s\n' "$snippet" >>"$tmp" + cat "$tmp" >"$rc_file" + rm -f "$tmp" + elif [ -w "$rc_file" ] || [ -w "$(dirname "$rc_file")" ]; then + printf '\n%s\n' "$snippet" >>"$rc_file" + fi + done +} + validate_openclaw_symlinks() { local entry name target expected for entry in /sandbox/.openclaw/*; do @@ -456,6 +499,7 @@ if [ "$(id -u)" -ne 0 ]; then exit 1 fi export_gateway_token + install_configure_guard configure_messaging_channels validate_openclaw_symlinks write_auth_profile @@ -488,6 +532,7 @@ fi # Verify config integrity before starting anything verify_config_integrity export_gateway_token +install_configure_guard # Inject messaging channel config if provider tokens are present. # Must run AFTER integrity check (to detect build-time tampering) and From c30c8620e9ee7596a5f806660107e9eec05d687e Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 7 Apr 2026 12:10:43 +0800 Subject: [PATCH 6/8] fix(sandbox): harden token export and add regression tests Address CodeRabbit review: - Unset stale OPENCLAW_GATEWAY_TOKEN when token is empty so child processes do not inherit a revoked value. - Shell-escape token with single-quote wrapping before embedding in .bashrc/.profile to prevent injection via quotes/dollars/backticks. - Add regression tests for export_gateway_token and install_configure_guard (marker idempotency, escaping, call sites). Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/nemoclaw-start.sh | 7 ++- test/nemoclaw-start.test.js | 86 +++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/scripts/nemoclaw-start.sh b/scripts/nemoclaw-start.sh index 87b95100b53..75fbc3c18b6 100755 --- a/scripts/nemoclaw-start.sh +++ b/scripts/nemoclaw-start.sh @@ -136,6 +136,7 @@ export_gateway_token() { if [ -z "$token" ]; then # Remove any stale marker blocks from rc files so revoked/old tokens # are not re-exported in later interactive sessions. + unset OPENCLAW_GATEWAY_TOKEN for rc_file in "${_SANDBOX_HOME}/.bashrc" "${_SANDBOX_HOME}/.profile"; do if [ -f "$rc_file" ] && grep -qF "$marker_begin" "$rc_file" 2>/dev/null; then local tmp @@ -152,9 +153,13 @@ export_gateway_token() { # Persist to .bashrc/.profile so interactive sessions (openshell sandbox # connect) also see the token — same pattern as the proxy config above. + # Shell-escape the token so quotes/dollars/backticks cannot break the + # sourced snippet or allow code injection. + local escaped_token + escaped_token="$(printf '%s' "$token" | sed "s/'/'\\\\''/g")" local snippet snippet="${marker_begin} -export OPENCLAW_GATEWAY_TOKEN=\"${token}\" +export OPENCLAW_GATEWAY_TOKEN='${escaped_token}' ${marker_end}" for rc_file in "${_SANDBOX_HOME}/.bashrc" "${_SANDBOX_HOME}/.profile"; do diff --git a/test/nemoclaw-start.test.js b/test/nemoclaw-start.test.js index c51d26eaf69..564b9132a3f 100644 --- a/test/nemoclaw-start.test.js +++ b/test/nemoclaw-start.test.js @@ -68,6 +68,92 @@ describe("nemoclaw-start non-root fallback", () => { }); }); +describe("nemoclaw-start gateway token export (#1114)", () => { + const src = fs.readFileSync(START_SCRIPT, "utf-8"); + + it("defines _read_gateway_token helper used by both export and dashboard", () => { + expect(src).toMatch(/_read_gateway_token\(\) \{/); + // export_gateway_token calls the helper + expect(src).toMatch(/token="\$\(_read_gateway_token\)"/); + // print_dashboard_urls also calls the helper + const dashboardFn = src.match(/print_dashboard_urls\(\) \{([\s\S]*?)^\}/m); + expect(dashboardFn).toBeTruthy(); + expect(dashboardFn[1]).toContain("_read_gateway_token"); + }); + + it("uses with-open context manager in the Python snippet", () => { + const helperFn = src.match(/_read_gateway_token\(\) \{([\s\S]*?)^\}/m); + expect(helperFn).toBeTruthy(); + expect(helperFn[1]).toContain("with open("); + }); + + it("unsets stale OPENCLAW_GATEWAY_TOKEN when token is empty", () => { + const exportFn = src.match(/export_gateway_token\(\) \{([\s\S]*?)^\}/m); + expect(exportFn).toBeTruthy(); + const body = exportFn[1]; + // Must unset before returning on empty token + const unsetPos = body.indexOf("unset OPENCLAW_GATEWAY_TOKEN"); + const returnPos = body.indexOf("return"); + expect(unsetPos).toBeGreaterThan(-1); + expect(returnPos).toBeGreaterThan(-1); + expect(unsetPos).toBeLessThan(returnPos); + }); + + it("shell-escapes the token before embedding in rc snippet", () => { + const exportFn = src.match(/export_gateway_token\(\) \{([\s\S]*?)^\}/m); + expect(exportFn).toBeTruthy(); + const body = exportFn[1]; + // Must use single quotes around the escaped token value + expect(body).toContain("escaped_token"); + expect(body).toMatch(/export OPENCLAW_GATEWAY_TOKEN='\$\{escaped_token\}'/); + }); + + it("calls export_gateway_token in both root and non-root paths", () => { + const calls = src.match(/export_gateway_token/g) || []; + // definition + 2 call sites + expect(calls.length).toBeGreaterThanOrEqual(3); + }); +}); + +describe("nemoclaw-start configure guard (#1114)", () => { + const src = fs.readFileSync(START_SCRIPT, "utf-8"); + + it("defines install_configure_guard function", () => { + expect(src).toMatch(/install_configure_guard\(\) \{/); + }); + + it("intercepts openclaw configure with an actionable error", () => { + const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); + expect(guardFn).toBeTruthy(); + const body = guardFn[1]; + expect(body).toContain('configure)'); + expect(body).toContain("nemoclaw onboard --resume"); + expect(body).toContain("return 1"); + }); + + it("passes non-configure subcommands through to the real binary", () => { + const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); + expect(guardFn).toBeTruthy(); + expect(guardFn[1]).toContain('command openclaw "$@"'); + }); + + it("uses idempotent marker blocks", () => { + const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); + expect(guardFn).toBeTruthy(); + const body = guardFn[1]; + expect(body).toContain("nemoclaw-configure-guard begin"); + expect(body).toContain("nemoclaw-configure-guard end"); + // Uses awk to strip existing block before re-inserting + expect(body).toContain("awk"); + }); + + it("calls install_configure_guard in both root and non-root paths", () => { + const calls = src.match(/install_configure_guard/g) || []; + // definition + 2 call sites + expect(calls.length).toBeGreaterThanOrEqual(3); + }); +}); + describe("nemoclaw-start auto-pair client whitelisting (#117)", () => { const src = fs.readFileSync(START_SCRIPT, "utf-8"); From 21bd01f93f08db81d1bb7420b41f3304f48f433d Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 7 Apr 2026 12:24:14 +0800 Subject: [PATCH 7/8] fix(test): adjust configure guard regex to span heredoc The install_configure_guard function contains a heredoc with a nested openclaw() shell function. The previous regex stopped at the first word-character line inside the heredoc. Match up to the next top-level function definition instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/nemoclaw-start.test.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/test/nemoclaw-start.test.js b/test/nemoclaw-start.test.js index 564b9132a3f..954435c014d 100644 --- a/test/nemoclaw-start.test.js +++ b/test/nemoclaw-start.test.js @@ -123,24 +123,32 @@ describe("nemoclaw-start configure guard (#1114)", () => { }); it("intercepts openclaw configure with an actionable error", () => { - const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); - expect(guardFn).toBeTruthy(); - const body = guardFn[1]; - expect(body).toContain('configure)'); + // The guard installs a heredoc containing a shell function — extract the + // full block between the function definition and the next top-level function. + const guardBlock = src.match( + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + ); + expect(guardBlock).toBeTruthy(); + const body = guardBlock[1]; + expect(body).toContain("configure)"); expect(body).toContain("nemoclaw onboard --resume"); expect(body).toContain("return 1"); }); it("passes non-configure subcommands through to the real binary", () => { - const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); - expect(guardFn).toBeTruthy(); - expect(guardFn[1]).toContain('command openclaw "$@"'); + const guardBlock = src.match( + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + ); + expect(guardBlock).toBeTruthy(); + expect(guardBlock[1]).toContain('command openclaw "$@"'); }); it("uses idempotent marker blocks", () => { - const guardFn = src.match(/install_configure_guard\(\) \{([\s\S]*?)^(?=\w)/m); - expect(guardFn).toBeTruthy(); - const body = guardFn[1]; + const guardBlock = src.match( + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + ); + expect(guardBlock).toBeTruthy(); + const body = guardBlock[1]; expect(body).toContain("nemoclaw-configure-guard begin"); expect(body).toContain("nemoclaw-configure-guard end"); // Uses awk to strip existing block before re-inserting From 682cc609791fb933334255a99abf31595ce8411c Mon Sep 17 00:00:00 2001 From: Dongni Yang Date: Tue, 7 Apr 2026 13:28:50 +0800 Subject: [PATCH 8/8] style(test): add trailing commas for prettier Co-Authored-By: Claude Opus 4.6 (1M context) --- test/nemoclaw-start.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/nemoclaw-start.test.js b/test/nemoclaw-start.test.js index 954435c014d..b0049e4d4c2 100644 --- a/test/nemoclaw-start.test.js +++ b/test/nemoclaw-start.test.js @@ -126,7 +126,7 @@ describe("nemoclaw-start configure guard (#1114)", () => { // The guard installs a heredoc containing a shell function — extract the // full block between the function definition and the next top-level function. const guardBlock = src.match( - /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m, ); expect(guardBlock).toBeTruthy(); const body = guardBlock[1]; @@ -137,7 +137,7 @@ describe("nemoclaw-start configure guard (#1114)", () => { it("passes non-configure subcommands through to the real binary", () => { const guardBlock = src.match( - /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m, ); expect(guardBlock).toBeTruthy(); expect(guardBlock[1]).toContain('command openclaw "$@"'); @@ -145,7 +145,7 @@ describe("nemoclaw-start configure guard (#1114)", () => { it("uses idempotent marker blocks", () => { const guardBlock = src.match( - /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m + /install_configure_guard\(\) \{([\s\S]*?)^validate_openclaw_symlinks/m, ); expect(guardBlock).toBeTruthy(); const body = guardBlock[1];