ai-psychosis/tests
Kjell Tore Guttormsen 7d53a7325e fix(hooks): include required hookEventName in hookSpecificOutput JSON
outputWithContext() emitted a hookSpecificOutput object without the
required hookEventName field, so Claude Code rejected the hook output
("hookSpecificOutput is missing required field hookEventName") and
dropped the context the SessionStart, UserPromptSubmit, and PostToolUse
hooks tried to inject. Thread the event name through the helper; each
caller now passes its own (SessionStart / UserPromptSubmit / PostToolUse).
Existing emission tests now assert hookEventName per event.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmHCQjJHUyWwxGAVVjNLgp
2026-06-24 06:46:11 +02:00
..
domain-detection.test.mjs feat(ai-psychosis): add 8 paper-grounded domain patterns 2026-05-01 21:32:26 +02:00
interaction-report.test.mjs feat(ai-psychosis): /interaction-report surfaces v1.2 fields 2026-05-01 21:53:41 +02:00
lib.test.mjs feat(ai-psychosis): add readRecentEndRecords for cross-session reads 2026-05-01 21:23:57 +02:00
perf.test.mjs test(ai-psychosis): perf budget validated at v1.2 pattern set 2026-05-01 21:56:14 +02:00
privacy.test.mjs test(ai-psychosis): privacy canary covers v1.2 detectors 2026-05-01 21:54:22 +02:00
prompt-analyzer.test.mjs fix(hooks): include required hookEventName in hookSpecificOutput JSON 2026-06-24 06:46:11 +02:00
session-end.test.mjs feat(ai-psychosis): promote domain_context to array for multi-domain support 2026-05-01 21:28:36 +02:00
session-start.test.mjs fix(hooks): include required hookEventName in hookSpecificOutput JSON 2026-06-24 06:46:11 +02:00
skill-md.test.mjs docs(ai-psychosis): SKILL.md cites paper Score 5 + 11 guidance criteria 2026-05-01 21:51:21 +02:00
stakes-matrix.test.mjs feat(ai-psychosis): domain-stakes weighting on alert thresholds 2026-05-01 21:46:29 +02:00
test-helper.mjs feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
tool-tracker.test.mjs fix(hooks): include required hookEventName in hookSpecificOutput JSON 2026-06-24 06:46:11 +02:00
user-info.test.mjs feat(ai-psychosis): tier-1 user-info isolation alert (per-session) 2026-05-01 21:38:51 +02:00
validation-seeking.test.mjs feat(ai-psychosis): domain-stakes weighting on alert thresholds 2026-05-01 21:46:29 +02:00