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
oratis added a commit that referenced this pull request Aug 8, 2026
Records the threat-model delta, marks the adoption plan implemented with an
honest deviation log, and bumps to 0.3.0 (minor, not patch: the unattended
permission clamp in #244 is breaking on 0.x).

security-model.md gains three threats (#8 in-project secret reads, #9 unattended
permissive inheritance, #10 no audit or undo) and a residual-risk section
stating plainly what the file contract is not. It constrains dispatcher tool
calls, not Bash; path normalization is string math, not realpath. Describing it
as secret protection would be the false confidence the plan named as this
feature's main risk.

The adoption plan now carries a deviation table rather than a claim of clean
execution. Six entries, including two where the plan was simply wrong: PR 0's
premise that unattended runs might silently allow (the ask path was already
fail-closed), and the four-client consistency test (only two hosts resolve
policy independently; VS Code and LSP consume the server's answer, and the
tests say so instead of implying four verified paths). Two P2 items remain
undone and are listed as such.

Found while bumping: the repo's own version-consistency test caught Cargo.lock
still pinning 0.2.0, a sixth location RELEASING.md's four-item list never
mentioned. Both fixed.

Co-authored-by: oratis <happyllammar@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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