Skip to content

Add Windows E2E tests to CI pipeline#107

Merged
jancurn merged 1 commit intomainfrom
claude/add-windows-e2e-tests-I8s2h
Apr 5, 2026
Merged

Add Windows E2E tests to CI pipeline#107
jancurn merged 1 commit intomainfrom
claude/add-windows-e2e-tests-I8s2h

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented Mar 24, 2026

Summary

  • Add a windows-latest E2E test job to the CI workflow, running tests via Git Bash
  • Make the e2e test framework (framework.sh, run.sh) cross-platform by replacing Unix-specific tools/patterns with portable alternatives
  • Key cross-platform fixes: pkilltaskkill, atomic symlink locking → atomic mkdir, bc → integer arithmetic, /tmp$TEMP/$TMPDIR, export -f + xargs → background jobs on Windows

Test plan

  • Existing Linux E2E tests (Node.js and Bun) still pass
  • New Windows E2E job runs successfully on windows-latest
  • Unit tests unaffected (430 tests pass)
  • Lint passes

https://claude.ai/code/session_01QA2R1dDEWRrdGUAbX9Qz9B

@jancurn jancurn force-pushed the claude/add-windows-e2e-tests-I8s2h branch from ddeceef to c83c6ef Compare March 25, 2026 20:59
Add a separate `e2e-windows.yml` workflow (triggered via workflow_dispatch)
that runs the full E2E test suite on Windows using Git Bash, for both
Node.js and Bun runtimes.

Source changes:
- isProcessAlive(): Use cached `tasklist` on Windows instead of unreliable
  `process.kill(pid, 0)` (OpenProcess succeeds for zombie processes).
  Single tasklist call caches all PIDs for 2s — instant Set lookups after.
- stopBridge(): On Windows, send IPC shutdown message for graceful close
  (HTTP DELETE) since SIGTERM = immediate TerminateProcess. Only used for
  closeSession, not restart (via `{ graceful: true }` option).

Test framework (framework.sh, run.sh):
- Cross-platform helpers: is_windows, to_native_path, _kill_tree,
  _wait_killed, _find_python, _md5_short, _TMPDIR, NATIVE_TEST_TMP
- MSYS path conversion for config file refs and CLI tool-call args
- mkdir-based atomic locking (replaces symlinks, works on Windows)
- Integer arithmetic in wait_for (replaces bc dependency)
- Per-test 5-minute timeout on Windows to prevent hangs
- Background jobs for parallel execution (replaces export -f + xargs)

Test fixes:
- Config paths use to_native_path for composite args (path:entry)
- Process checks use tasklist on Windows instead of kill -0
- Bridge kills use _kill_tree instead of plain kill
- Session expiry via control API after force-kill on Windows
- JSON-escaped Windows named pipe paths in expired test fixtures

https://claude.ai/code/session_01QA2R1dDEWRrdGUAbX9Qz9B
@jancurn jancurn force-pushed the claude/add-windows-e2e-tests-I8s2h branch from 46bb60e to f50af01 Compare April 4, 2026 23:49
@jancurn jancurn merged commit 4c868f4 into main Apr 5, 2026
6 checks passed
@jancurn jancurn deleted the claude/add-windows-e2e-tests-I8s2h branch April 7, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants