ECC/tests
Taro Kawakami a35b2d125d fix(hooks): isolate session-end.js filename using transcript_path UUID
When session-end.js runs and CLAUDE_SESSION_ID is unset, getSessionIdShort()
falls back to the project/worktree name. If any other Stop-hook in the chain
spawns a claude subprocess (e.g. an AI-summary generator using 'claude -p'),
the subprocess also fires the full Stop chain and writes to the same project-
name-based filename, clobbering the parent's valid session summary with a
summary of the summarization prompt itself.

Fix: when stdin JSON (or CLAUDE_TRANSCRIPT_PATH) provides a transcript_path,
extract the first 8 hex chars of the session UUID from the filename and use
that as shortId. Falls back to the original getSessionIdShort() when no
transcript_path is available, so existing behavior is preserved for all
callers that do not set it.

Adds a regression test in tests/hooks/hooks.test.js.

Refs #1494
2026-04-19 11:37:32 +09:00
..
ci fix: block unsafe privileged workflow checkouts 2026-04-12 23:23:01 -07:00
docs fix: publish npm releases and clarify install identifiers 2026-04-14 20:42:28 -07:00
hooks fix(hooks): isolate session-end.js filename using transcript_path UUID 2026-04-19 11:37:32 +09:00
integration fix: consolidate bash hooks without fork storms 2026-04-14 21:23:57 -07:00
lib fix: unblock urgent install and gateguard regressions 2026-04-14 19:23:07 -07:00
scripts test: align hook install expectations with Claude schema 2026-04-15 19:33:34 -07:00
__init__.py Small changes 2026-04-12 12:34:45 +05:30
codex-config.test.js fix(codex): broaden context7 config checks 2026-03-29 00:26:16 -04:00
conftest.py Small changes 2026-04-12 12:34:45 +05:30
opencode-config.test.js fix: namespace opencode command agents 2026-04-05 14:21:57 -07:00
plugin-manifest.test.js fix: harden urgent install and gateguard patch 2026-04-14 19:44:08 -07:00
run-all.js fix: narrow unicode cleanup scope 2026-03-29 21:21:18 -04:00
test_builder.py fix: resolve git conflicts in LLM abstraction layer 2026-04-12 07:10:54 +00:00
test_executor.py Small changes 2026-04-12 12:34:45 +05:30
test_resolver.py Small changes 2026-04-12 12:34:45 +05:30
test_types.py Small changes 2026-04-12 12:34:45 +05:30