Skip to content

fix(ci): Node 22 + EPIPE in hooks dispatcher + bash cwd test regex#8

Merged
oratis merged 1 commit into
mainfrom
fix/ci-ubuntu-node-compat
May 27, 2026
Merged

fix(ci): Node 22 + EPIPE in hooks dispatcher + bash cwd test regex#8
oratis merged 1 commit into
mainfrom
fix/ci-ubuntu-node-compat

Conversation

@oratis

@oratis oratis commented May 27, 2026

Copy link
Copy Markdown
Owner

Three real CI failures from M5/M7 merges on Ubuntu runner. Fixes:

  1. GlobTool requires Node 22+ (fs.promises.glob). Bumped engines.node + workflow node-version + .nvmrc to 22.
  2. HookDispatcher EPIPE when child closes stdin first — added error listener + try/catch.
  3. BashTool cwd test regex escaping bug — replaced with a simpler suffix check.

All 258 tests pass locally. release-notes:fix.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

CI on Ubuntu was failing on commits b70c0e1 and febfa30 with three real
(non-flaky) issues:

1. GlobTool tests failed because fs.promises.glob was added in Node 22
   but CI used Node 20. Bumped engines.node to >=22 across all packages
   + .nvmrc + workflow setup-node version. Node 22 has been LTS since
   Oct 2024, so this is reasonable.

2. HookDispatcher tests intermittently failed with EPIPE because child
   processes that don't read stdin close the pipe before our write
   completes. Added stdin error listener + try/catch around write/end
   to swallow EPIPE/EBADF cleanly.

3. BashTool 'runs in the given cwd' test had a regex bug: escaping
   step ran AFTER inserting `(/private)?` so the parens/question-mark
   got literally escaped instead of staying as regex syntax. Replaced
   with a simpler suffix-substring check that works on both platforms.

Verified locally (Node 24 → behaviour equivalent to Node 22):
  pnpm test → 258 passed / 4 skipped / 0 failed
  pnpm typecheck → green
  pnpm format:check → conformant

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 42d87ba into main May 27, 2026
@oratis oratis deleted the fix/ci-ubuntu-node-compat branch May 27, 2026 16:49
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.

1 participant