[macOS] scripts crash on macOS without coreutils; standardize `timeout` handling across the suite
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, andtest/e2e/test-double-onboard.shcallexec timeout ...unconditionally with no detection or fallback. They crash immediately with a crypticexec: timeout: not founderror 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
- Be on macOS without GNU coreutils installed (verify with
command -v timeout && command -v gtimeout— both should be empty). - Clone the NemoClaw repository and cd into it.
- Run any of the Group A scripts, e.g.:
bash test/e2e/test-token-rotation.sh - Observe the immediate crash with no actionable guidance:
test/e2e/test-token-rotation.sh: line 29: exec: timeout: not found - The same crash reproduces with
test-onboard-resume.shandtest-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
✨ 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.