NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[macOS] scripts crash on macOS without coreutils; standardize `timeout` handling across the suite

Open hunglp6d opened this issue 7 months ago • 1 comments

Description

Several e2e test scripts under test/e2e/ rely on the GNU timeout command in their preamble to wrap the entire script run. On macOS, timeout is not part of the base system — it ships with GNU coreutils (available via brew install coreutils as gtimeout). On a clean macOS without coreutils:

  • test/e2e/test-token-rotation.sh, test/e2e/test-onboard-resume.sh, and test/e2e/test-double-onboard.sh call exec timeout ... unconditionally with no detection or fallback. They crash immediately with a cryptic exec: timeout: not found error and no remediation guidance.

Separately, a second group of scripts already does some kind of timeout/ gtimeout detection, but the patterns are ad-hoc and inconsistent across files — some duplicate the detection in two places, some pick gtimeout first vs timeout first, some use a project-namespaced env var (NEMOCLAW_E2E_TIMEOUT_SECONDS) and others a generic one (TIMEOUT_SECONDS), some use a local variable named TIMEOUT_CMD and others TIMEOUT_BIN.

Reproduction Steps

  1. Be on macOS without GNU coreutils installed (verify with command -v timeout && command -v gtimeout — both should be empty).
  2. Clone the NemoClaw repository and cd into it.
  3. Run any of the Group A scripts, e.g.: bash test/e2e/test-token-rotation.sh
  4. Observe the immediate crash with no actionable guidance: test/e2e/test-token-rotation.sh: line 29: exec: timeout: not found
  5. The same crash reproduces with test-onboard-resume.sh and test-double-onboard.sh.

Environment

  • OS: macOS, without brew install coreutils
  • Node.js: not relevant (failure is in script preamble before any node/nemoclaw runs)
  • Docker: not relevant (same reason)
  • NemoClaw: reproducible against current main

Debug Output


Logs

$ bash test/e2e/test-token-rotation.sh
test/e2e/test-token-rotation.sh: line 29: exec: timeout: not found

Checklist

  • [x] I confirmed this bug is reproducible
  • [x] I searched existing issues and this is not a duplicate

hunglp6d avatar Apr 21 '26 10:04 hunglp6d

✨ Thanks for submitting this issue that identifies a bug in the NemoClaw CLI's timeout handling on macOS — the detailed description and reproduction steps will help us review this further.

wscurran avatar Apr 21 '26 14:04 wscurran