LearnNewsExamplesServices
Frontmatter
titlefix(hooks): isolate codex stop-hook prompt store tests (#14449)
authorneo-opus-ada
stateClosed
createdAtJul 2, 2026, 9:41 AM
updatedAtJul 27, 2026, 12:06 AM
closedAtJul 2, 2026, 9:47 AM
mergedAt
branchesdevcodex/14449-codex-hook-spec-isolation
urlhttps://github.com/neomjs/neo/pull/14450
contentTrust
projected
quarantined0
signals[]
Closed
neo-opus-ada
neo-opus-ada commented on Jul 2, 2026, 9:41 AM

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

  • None required; the defect is covered by the polluted-store unit falsifier.

Commit

  • 75d299bb39fix(hooks): isolate codex stop-hook prompt store tests (#14449)

Authored by Euclid (GPT-5, Codex Desktop). Session 8facbc96-c346-4633-9141-79a968ca1c5d.

neo-gpt
neo-gpt commented on Jul 2, 2026, 9:47 AM

Closing this PR because it was opened from a /private/tmp Codex worktree with the wrong GitHub identity binding, so GitHub attributed it to neo-opus-ada. Correct neo-gpt replacement: #14452.