Repository navigation
fix(hooks): read the post-commit cooldown as UTF-8 and copy the plugin trees into the mutation sandbox (#692, class 3) - #888
Conversation
Codex Review SummaryThis 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 3m 17s —— View job Review of PR #888 done: approve, no Blockers
Summary: I found no Blockers. Both cooldown reads in
Not checked: I couldn't confirm whether the stripped environment breaks the child under mutmut, because I couldn't run Python or mutmut here. Your mutation-gate run reports 0 failed, which suggests it doesn't. |
Review 1 of 3: PR #888Five reviewers ran (code quality, performance, test coverage, documentation, security), and I checked their findings against the code. No Blockers. The hook change is correct. Notes, no action before merge
Verdict: approve |
|
Réponse à la revue 1 sur 6d31872 (approve, notes sans action avant fusion) : je ne pousse pas pour elles seules, car un push relance la CI et les revues. Elles partiront avec le prochain push de code sur cette PR, s'il y en a un :
Generated by Claude Code |
|
CI autopilot : la branche a 4 commits de retard sur Le seul conflit est mécanique et se trouve dans Generated by Claude Code |
… the remaining test text I/O (#692, class 3) gated_files.write_json writes the cooldown JSON as UTF-8; post_commit_reindex read it back with a bare read_text(), which uses the locale code page (cp1252 on Windows). Both reads now name UTF-8. The test files that still opened, read or wrote text without an encoding (ruff PLW1514, preview) now name UTF-8. The new test runs the cooldown round trip under -X warn_default_encoding with EncodingWarning made an error; it fails on main and passes here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYqX8MAbhBTCuP8EXYc
6d31872 to
26e9c6b
Compare
|
Claude finished @cdeust's task in 3m 10s —— View job Review 2 of 3 of PR #888 is posted: approve, no Blockers
Review 1 found no Blockers. Since then the branch was rebased onto Notes, no action before merge:
|
Review 2 of 3: PR #888Review 1 (6d31872) found no Blockers. Since then the branch was rebased onto
Notes, no action before merge
Verdict: approve |
|
Réponse à la revue 2 sur 26e9c6b (approve) : la note sur le commentaire de Generated by Claude Code |
Summary
Refs #692 (class 3, text encoding). Slice of a larger issue: the other classes and the re-measurement on Windows stay open, so this does not close it.
post_commit_reindex._check_cooldownand_update_cooldownread the cooldown file with a bareread_text(), so in the locale code page (cp1252 on Windows), whilegated_files.write_jsonwrites it as UTF-8. Both reads now name UTF-8.UnicodeDecodeError: 'charmap'intest_pg_recall_plans,test_codex_plugin_contract,test_generate_repo_badges), all already read withencoding="utf-8"onmain. The test files that still open, read or write text without an encoding (found withruff --preview --select PLW1514) now name UTF-8:test_beam_standard_rag,test_wiki_stub_detector,test_import_sessions,test_launcher_deps_lock,test_launcher_setup,test_migrate.tests_py/hooks/test_post_tool_matchers.pyandtest_stdin_failures.pyforpost_commit_reindex.py. They read.claude-plugin/plugin.jsonandplugins/hypermnesia-mcp-codex/scripts/session_queue.py, which[tool.mutmut].also_copydid not copy, so mutmut's clean run failed (FileNotFoundError ... mutants/.claude-plugin/plugin.json) before any mutant ran. Both are now copied.tests_py/hooks/test_post_commit_reindex_cooldown.pypins them.Type of change
Test plan
tests_py/hooks/test_post_commit_reindex_cooldown.py: the subprocess test (-X warn_default_encoding -W error::EncodingWarning) fails onmainwithEncodingWarning: 'encoding' argument not specifiedand passes here.GITHUB_BASE_REF=main python scripts/ci_mutation_diff.pywith mutmut 3.8.1:>>> mutation: 1 file(s), 0 failed, 0 untested. Before thealso_copychange: the clean run stopped on the missing files.pytest tests_py/hooks tests_py/scripts/test_ci_mutation_diff_cases.pyand the touched test files: 975 passed, 33 skipped, 2 failed. The 2 failures (test_entry_auto_dispatch.py::test_engine_selected_auto_backend_reaches_hook[False-*]) fail the same way onmainin this environment.ruff checkandruff format --check(0.17.3) on the changed files,scripts/check_craftsmanship.py: OK.Mutations the new tests catch:
encoding=Noneon either read,<→<=on the window, the unknown-root default0→1/None/missing,>→>=on the cap, and every change to the pruning sort (key, order, slice).Audit notes
tests_py/shared/test_subprocess_safe.py::test_encoding_parameter_is_honored('' == 'café'on Windows) is still unexplained and not addressed here.Coding-standards compliance
[tool.mutmut].also_copy, CHANGELOG).scripts/check_craftsmanship.py: OK. The new test constantWINDOWcarries a# source:line.Breaking changes
None.
Reviewer checklist
https://claude.ai/code/session_018kyZYqX8MAbhBTCuP8EXYc
Generated by Claude Code