ECC/tests/hooks
Apptah 30ab9e2cd7
fix: extract inline SessionStart bootstrap to separate file (#1035)
Inline `node -e "..."` in hooks.json contained `!` characters (e.g.
`!org.isDirectory()`) that bash history expansion in certain shell
environments would misinterpret, producing syntax errors and the
"SessionStart:startup hook error" banner in the Claude Code CLI header.

Extract the bootstrap logic to `scripts/hooks/session-start-bootstrap.js`
so the shell never sees the JS source. Behaviour is identical: the script
reads stdin, resolves the ECC plugin root via CLAUDE_PLUGIN_ROOT or a set
of well-known fallback paths, then delegates to run-with-flags.js.

Update the test that asserted the old inline pattern to verify the new
file-based approach instead.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 14:05:23 -07:00
..
auto-tmux-dev.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
check-hook-enabled.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
config-protection.test.js fix: finish blocker lane hook and install regressions 2026-03-25 04:00:50 -04:00
cost-tracker.test.js fix: harden windows CI tests and markdown lint 2026-03-20 03:03:57 -07:00
detect-project-worktree.test.js fix(tests): resolve Windows CI test failures (#701) 2026-03-20 03:37:21 -07:00
doc-file-warning.test.js refactor: address reviewer feedback 2026-03-29 10:09:02 +08:00
evaluate-session.test.js fix: remove unused execFileSync import (no-unused-vars ESLint) 2026-02-18 07:15:53 +05:30
governance-capture.test.js fix: resolve blocker PR validation regressions 2026-03-25 01:34:29 -04:00
hook-flags.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
hooks.test.js fix: extract inline SessionStart bootstrap to separate file (#1035) 2026-03-31 14:05:23 -07:00
mcp-health-check.test.js fix: fold session manager blockers into one candidate 2026-03-24 23:08:27 -04:00
observe-subdirectory-detection.test.js fix(clv2): resolve cwd to git root before project detection 2026-03-30 04:46:31 -04:00
observer-memory.test.js fix(observer): clean up prompt_file early and fix test for analysis_relpath 2026-03-28 23:32:44 +08:00
post-bash-hooks.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
pre-bash-commit-quality.test.js fix(hooks): make pre-commit quality checks enforce staged state 2026-03-29 00:07:18 -04:00
pre-bash-dev-server-block.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
pre-bash-reminders.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
quality-gate.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
suggest-compact.test.js test: isolate suggest-compact counter fixtures 2026-03-25 03:51:15 -04:00