Repository navigation
fix(tests): reranker cache-path tests compare paths, not strings (#692) - #952
Conversation
Windows run 38008915302 (job 114084097957) failed
test_falls_back_to_home_cache ('\fake\home\.cache\flashrank' against the
literal '/fake/home/.cache/flashrank') and
test_cell_model_cache_and_state_restore_without_changing_defaults (the
'/'-joined path core/reranker_model.py builds, since core may not import
pathlib under ADR-0244, against a native str(Path) with backslashes). Both
values name the same file; the tests asserted the separator, not the
location. They now compare Path objects.
Refs #692
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYuh12mhbtnpuBLP9bi
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYuh12mhbtnpuBLP9bi
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. |
Review 1/3: PR #952Five reviewers ran: code quality, performance, test coverage, documentation and security. None found a Blocker. I read the test changes against the source:
Both tests still fail if the cache falls back to Notes, no action before merge
Not verified: the reviews read the code but did not run the tests or a Windows job. Verdict: approve |
…gs (#692) The core pathlib rule comes from issue #560, not ADR-0244 (review 1 of PR #952). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYuh12mhbtnpuBLP9bi
|
Claude finished @cdeust's task in 1m 13s —— View job Review 2/3: PR #952
Verdict: approve |
|
Suite à la revue 1/3 :
Generated by Claude Code |
Review 2/3: PR #952Scope. Review 1 ( Five reviewers ran on that commit: code quality, performance, test coverage, documentation and security. None found a Blocker. I checked the new citation against the code:
Notes, no action before merge
Not verified: I did not run the tests or a Windows job for this fixup, since it only changes a comment and a CHANGELOG line. Verdict: approve |
Summary
Tranche de la classe 9 de #692 : deux tests du cache du reranker échouaient sous Windows parce qu'ils comparaient des chaînes de chemin au lieu de chemins. Le produit est correct ; les tests vérifiaient le séparateur, pas l'emplacement. Ils comparent maintenant des objets
Path.Refs #692 (issue multi-tranches : pas de
Closes).Cause racine (log du run 38008915302, job 114084097957) :
tests_py/core/test_reranker.py::TestRerankerCacheDir::test_falls_back_to_home_cache:assert '\\fake\\home...he\\flashrank' == '/fake/home/.cache/flashrank'.shared/platform.cache_dir()renvoie unPathnatif ; le test le comparait à un littéral POSIX.tests_py/benchmarks/test_reranker_matrix_runtime.py::test_cell_model_cache_and_state_restore_without_changing_defaults: le diff ne porte que sur les séparateurs (stat0\ms-marco-…\flashrank-…onnxcontrestat0/ms-marco-…/flashrank-…onnx).core/reranker_model._model_path()joint avec/, core ne pouvant pas importer pathlib (ADR-0244) ; le test le comparait à unstr(Path)natif. Les deux valeurs désignent le même fichier.Type of change
Test plan
pytest tests_py/core/test_reranker.py tests_py/benchmarks/test_reranker_matrix_runtime.py: 46 passed (Linux).ruff check/ruff format --checksur les fichiers touchés : OK ;python scripts/check_craftsmanship.py: OK.reranker_cache_dir()ou un_model_path()qui désignerait un autre dossier ou fichier fait toujours échouer la comparaison dePath; seule la différence de séparateur est neutralisée.torch(téléchargement bloqué par le réseau), dont les tests touchés ne dépendent pas.Audit notes
Coding-standards compliance
Breaking changes
Aucun.
Reviewer checklist
### Fixed).https://claude.ai/code/session_018kyZYuh12mhbtnpuBLP9bi
Generated by Claude Code