Repository navigation
fix(tests): send platform-absolute event paths in the preemptive-context tests (#692, class 5) - #920
Conversation
…ext tests (#692, class 5) The Windows full-suite run 38008915302 (job 114084097957) failed 9 tests of tests_py/hooks/test_preemptive_context.py with "_prime_file_memories called 0 times": the events carried file_path "/a.py", which has no drive on Windows (PureWindowsPath("/a.py").is_absolute() is False), so _event_paths rejected it as a relative path with no cwd. The hook is right; the fixture assumed POSIX. The paths are now built from the resolved filesystem root (C:\ on Windows, / elsewhere). test_expired_cooldown_primes_again seeded the key "/a.py", but the cooldown is keyed by json.dumps([project, path]); it passed even with a fresh cooldown. It now seeds hook._cooldown_key(A_PY, None) and fails when the cooldown is not expired (checked by mutation). Refs #692 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYrLmY9FajFeAEPo9rw
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @cdeust's task in 1m 42s —— View job Review of PR #920 (review 1 of 3)
No Blockers. On Windows, I posted two Notes, neither needed before merge:
Verdict: approve |
Review 1/3: PR #920Five reviewers ran (code quality, performance, test coverage, docs accuracy, security). I traced their claims against What I checked:
Notes, no action before merge
Verdict: approve |
|
Sur la note non bloquante de la revue 1/3 (test frère avec une clé fraîche) : je ne la pousse pas dans cette PR. La graine est maintenant construite par Generated by Claude Code |
Refs #692 (classe 5, première partie :
test_preemptive_context, 9 tests)Cause racine
Le run Windows 38008915302 (job 114084097957) échoue sur 9 tests de
tests_py/hooks/test_preemptive_context.pyavec «_prime_file_memoriescalled 0 times ». Les événements portentfile_path: "/a.py", qui n'a pas de lecteur sous Windows (PureWindowsPath("/a.py").is_absolute()vautFalse) :_event_pathsle rejette, à juste titre, comme chemin relatif sanscwd. Le hook est correct, la fixture supposait POSIX. Les chemins sont maintenant construits depuis la racine résolue du système de fichiers (C:\sous Windows,/ailleurs).test_expired_cooldown_primes_againsemait la clé"/a.py"alors que le cooldown est indexé parjson.dumps([project, path]): il passait même avec un cooldown frais. Il sème maintenanthook._cooldown_key(A_PY, None).Tests lancés
pytest tests_py/hooks/test_preemptive_context.py(Linux) : 25 passés.stale = time.time(), l'ancien test d'expiration passe (vacuité), le nouveau échoue.ruff check,ruff format --check,scripts/check_craftsmanship.py: OK.Non vérifié
Rien n'a tourné sous Windows ; la correction s'appuie sur le log du run 38008915302 et sur la sémantique de
PureWindowsPath. Le reste de la classe 5 (test_validate_memory4,test_capture_dispatch1,test_session_queue[~/state]1) n'est pas dans cette PR.Generated by Claude Code