Resolves #14449
Adds an explicit logDir test seam to the Codex Stop hook's in-process classification path, then uses it in direct fixture tests so they cannot read a live Codex prompt-context record from another session. Live/spawned hook behavior stays unchanged: omitted logDir still uses the module-level store, and spawned tests continue to isolate through NEO_AI_DAEMON_DIR.
Evidence: L2 (focused Codex hook spec, polluted-store falsifier, full hook unit directory) -> L2 required (#14449 unit-test isolation contract). Residual: none.
Related: #14420, #14439
Deltas from ticket
None. The ticket was split from #14420 during implementation because #14420 remains a broader stop-hook detection-quality parent and must not be closed by this narrow test-isolation leaf.
Test Evidence
npm run test-unit -- test/playwright/unit/hooks/codexLaneStateStopHook.spec.mjs -> 35 passed.
NEO_AI_DAEMON_DIR=<polluted temp prompt-context store> npm run test-unit -- test/playwright/unit/hooks/codexLaneStateStopHook.spec.mjs -> 35 passed.
npm run test-unit -- test/playwright/unit/hooks/ -> 134 passed.
npm run agent-preflight -- --no-fix -> passed.
node --check .codex/hooks/codex-lane-state-stop.mjs -> passed.
git diff --check and git diff --cached --check -> passed.
Post-Merge Validation
Commit
75d299bb39 — fix(hooks): isolate codex stop-hook prompt store tests (#14449)
Authored by Euclid (GPT-5, Codex Desktop). Session 8facbc96-c346-4633-9141-79a968ca1c5d.
Resolves #14449
Adds an explicit
logDirtest seam to the Codex Stop hook's in-process classification path, then uses it in direct fixture tests so they cannot read a live Codex prompt-context record from another session. Live/spawned hook behavior stays unchanged: omittedlogDirstill uses the module-level store, and spawned tests continue to isolate throughNEO_AI_DAEMON_DIR.Evidence: L2 (focused Codex hook spec, polluted-store falsifier, full hook unit directory) -> L2 required (#14449 unit-test isolation contract). Residual: none.
Related: #14420, #14439
Deltas from ticket
None. The ticket was split from #14420 during implementation because #14420 remains a broader stop-hook detection-quality parent and must not be closed by this narrow test-isolation leaf.
Test Evidence
npm run test-unit -- test/playwright/unit/hooks/codexLaneStateStopHook.spec.mjs-> 35 passed.NEO_AI_DAEMON_DIR=<polluted temp prompt-context store> npm run test-unit -- test/playwright/unit/hooks/codexLaneStateStopHook.spec.mjs-> 35 passed.npm run test-unit -- test/playwright/unit/hooks/-> 134 passed.npm run agent-preflight -- --no-fix-> passed.node --check .codex/hooks/codex-lane-state-stop.mjs-> passed.git diff --checkandgit diff --cached --check-> passed.Post-Merge Validation
Commit
75d299bb39—fix(hooks): isolate codex stop-hook prompt store tests (#14449)Authored by Euclid (GPT-5, Codex Desktop). Session 8facbc96-c346-4633-9141-79a968ca1c5d.