ponytail/tests
DietrichGebert 7e6eca6e29
fix: prevent Windows session freeze from stdin EOF deadlock (#477)
On Windows, Claude Code runs the UserPromptSubmit hook through a PowerShell
if {} wrapper that can swallow the piped prompt JSON, so stdin 'end' never
fires and ponytail-mode-tracker.js blocks forever, freezing the session.

Make the hook non-blocking: extract the handler into finish() guarded by a
done flag, and add a 1s unref()'d fallback timeout plus the existing stdin
error handler that both call finish() then exit 0. unref() means zero added
latency on the normal path where 'end' fires first. Adds a regression test
that spawns the hook with a never-closing stdin pipe and asserts self-exit.

Reconciles #453 onto main after #227 (stdin error handler) and #474 (exec
node hooks) landed.

Closes #443

Co-authored-by: Hasnan42 <154899774+Hasnan42@users.noreply.github.com>
2026-07-02 00:18:01 +02:00
..
behavior.test.js
commands.test.js
copilot-plugin.test.js fix: copilot-plugin test checks all 6 command files (#393) 2026-06-30 00:21:09 +02:00
correctness.test.js
gemini-extension.test.js
hermes-plugin.test.js Merge branch 'main' into salaamdev/main 2026-06-26 03:08:24 +02:00
hooks-windows.test.js fix: prevent Windows session freeze from stdin EOF deadlock (#477) 2026-07-02 00:18:01 +02:00
hooks.test.js feat: inject ponytail ruleset into subagents via SubagentStart hook (#254) 2026-06-24 04:19:14 +02:00
openclaw-skills.test.js
opencode-plugin.test.js feat: publish ponytail as an installable npm package for OpenCode and Pi (#197) 2026-06-24 02:09:40 +02:00
uninstall.test.js