Skip to content

fix(ci): bump wsl-e2e NEMOCLAW_EXEC_TIMEOUT to 60s (Fixes #2204) - #2205

Merged
brandonpelfrey merged 1 commit into
mainfrom
prekshi/fix-2204-wsl-exec-timeout
Apr 21, 2026
Merged

brandonpelfrey merged 1 commit into
mainfrom
prekshi/fix-2204-wsl-exec-timeout

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Apr 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes the lingering sandbox-stuck-recovery.test.ts > connect times out with guidance when sandbox is stuck in Provisioning failure on wsl-e2e that has been red on main since #466 merged. My earlier #2198 fixed the sibling tests but this one kept hitting the CI test-budget ceiling.

Fixes #2204.

Root cause

Not a mock-script bug — the mocks for sandbox list already return the phase string that parseSandboxStatus expects, and the tests pass cleanly on macOS and the Linux checks job.

The failure is WSL-specific timing:

  • NEMOCLAW_EXEC_TIMEOUT=30000 caps each outer spawnSync to the CLI at 30 seconds.
  • WSL process-spawn overhead is high: each mocked openshell invocation is a fresh Node.js child process, and the CLI makes 4+ of these (sandbox get, policy get --full, inference get, first sandbox list) before the readiness poll loop from fix(connect): add readiness poll with timeout before connecting (Fixes #430) #466 starts.
  • The 3 sibling tests in sandbox-stuck-recovery.test.ts that skip the poll loop were passing at 26–28s on WSL — already within a few seconds of the ceiling.
  • The failing test is the only one that sets NEMOCLAW_CONNECT_TIMEOUT=3, so it actually enters the poll loop (pre-poll + 3s sleep + final poll + "Timed out" print). That pushes total runtime past 30s on WSL runners, so the outer spawnSync kills the CLI before the "Timed out" guidance prints.

The Status: unknown artifact mentioned in #2204 is the CLI's display fallback parseSandboxStatus(poll, ...) || "unknown" kicking in after the child was killed mid-poll — not a missing subcommand in the mocks.

Changes

  • .github/workflows/wsl-e2e.yaml: bump NEMOCLAW_EXEC_TIMEOUT from 30000 to 60000, aligned with the existing NEMOCLAW_TEST_TIMEOUT=60000. Short comment explains why WSL needs the larger ceiling.

Why this is the right fix

  • Zero impact on fast runners. Tests that finish in a few seconds on macOS/Linux return early; they don't pay for the larger ceiling.
  • No product-code change. Only the WSL CI outer-spawn budget moves.
  • Targeted to the actual bottleneck. The CLI isn't hanging — it's slow on WSL spawn. Bumping the budget matches the structural overhead.

Considered and rejected

Type of Change

  • Code change (bug fix — CI config only)

Verification

  • Local `npx vitest run test/sandbox-stuck-recovery.test.ts test/sandbox-connect-inference.test.ts --project cli` — 7/7 pass in 7.6s
  • `npx prek run --files .github/workflows/wsl-e2e.yaml` — clean
  • Real validation: this PR's `wsl-e2e` check must go green.

AI Disclosure

  • AI-assisted — tool: Claude Code

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved Windows Subsystem for Linux (WSL) test reliability by adjusting execution timeout settings to account for system overhead.

Signed-off-by: Prekshi Vyas <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f9e6cf8-1033-4657-8816-4869bd6819ed

📥 Commits

Reviewing files that changed from the base of the PR and between a0a9139 and 07a7e55.

📒 Files selected for processing (1)
  • .github/workflows/wsl-e2e.yaml

📝 Walkthrough

Walkthrough

A GitHub Actions workflow configuration update that increases the CLI execution timeout from 30000ms to 60000ms for WSL compatibility tests, aligning it with the test timeout value and accounting for process-spawn overhead.

Changes

Cohort / File(s) Summary
WSL E2E Workflow Configuration
.github/workflows/wsl-e2e.yaml
Increased NEMOCLAW_EXEC_TIMEOUT environment variable from 30000 to 60000 milliseconds in the WSL compatibility test step. Added inline comments documenting the rationale: WSL process-spawn overhead consumes runtime, necessitating alignment with the existing test timeout value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A timeout that once was too tight,
Now stretches to thirty seconds bright!
WSL spawns take their time, you see,
So we matched the timeout, now all agree—
Tests breathe easier in the night ⏱️✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary change: increasing NEMOCLAW_EXEC_TIMEOUT in the WSL e2e CI configuration, which is exactly what the changeset implements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch prekshi/fix-2204-wsl-exec-timeout

Comment @coderabbitai help to get the list of available commands and usage tips.

@prekshivyas prekshivyas self-assigned this Apr 21, 2026
@brandonpelfrey
brandonpelfrey merged commit d23ab35 into main Apr 21, 2026
17 checks passed
@prekshivyas
prekshivyas deleted the prekshi/fix-2204-wsl-exec-timeout branch April 21, 2026 23:08
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression chore Build, CI, dependency, or tooling maintenance platform: wsl Affects Windows Subsystem for Linux and removed Platform: Windows/WSL chore Build, CI, dependency, or tooling maintenance labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression platform: wsl Affects Windows Subsystem for Linux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(test): sandbox-stuck-recovery and sandbox-connect-inference tests still failing after #2198

3 participants