Repository navigation
Conversation
code-review-graph reviewOverall risk: 0.30 (LOW) — 3 changed function(s)/class(es), 1 affected flow(s), 1 test gap(s) Risk-scored changes
Affected execution flows
Test gaps
Token savings: this graph-backed report used ~57,446 fewer tokens (~98%) than reading every changed file in full (estimated, chars/4 approximation). Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
|
Changes required: reinstall still fails to add Windows overrides to existing Codex hooks. Generate a config with |
|
Checks pass and the code looks right. Missing: tests for the edge cases it introduces.
Every new branch in the code should have a test, including the failure branch. Disagree with any of these? Say so here first. PRs now target |
|
The upgrade path works because of Four items from my 2026-09-15 comment are still open and neither review got a reply: the reinstall test over an older Unix-only hooks.json, the Windows-only execution tests behind The new test never runs on a Windows runner. It sits in It runs only in the cross-platform Nothing here shows Codex honours a The two forms also diverge on the failure branches, untested. The Unix form sends git's stderr to The claim does reproduce with the real CLI. Staging writes Codex hooks with no To merge: the reinstall test, the Windows execution tests, |
|
Thank you for this PR. I tested reinstalls, the installer tests, and both hooks with PowerShell 7 on a Mac. Before I can merge it, please fix these:
Thank you for your patience. |
There was a problem hiding this comment.
🟡 Changes recommended
The outer PowerShell launcher expands $null out of the hook conditions, producing invalid syntax that causes execution to fail before reaching exit 0.
1 open issue
What changed in this PR
Adds Windows-specific Codex hook commands to address the Unix-only hook failures reported in #620, while preserving existing Unix commands.
Changes:
- Adds PowerShell overrides for graph updates and startup status checks.
- Includes stdin draining, Git checks, and explicit successful exits.
- Adds regression assertions for both generated Windows commands.
| File | Description |
|---|---|
tests/test_skills.py |
Adds assertions for Windows hook command generation. |
code_review_graph/skills.py |
Adds commandWindows overrides to both Codex hooks. |
Review effort: Balanced
| "commandWindows": ( | ||
| 'powershell.exe -NoProfile -NonInteractive -Command "' | ||
| "[Console]::In.ReadToEnd() | Out-Null; " | ||
| "if ((git rev-parse --git-dir) -eq $null) { exit 0 }; " |

Summary
The generated Codex hooks previously contained only Unix shell commands. On Windows, Codex attempted to run
cat,/dev/null, and Unix shell chaining, causing PostToolUse hook failures.Both generated hooks now include
commandWindowsoverrides using PowerShell:[Console]::In.ReadToEnd();|| truebehavior;Not a git repo, skippingfor the startup hook outside Git repositories.Fixes #620.
Testing
pytest tests/test_skills.py::TestGenerateCodexHooksConfig tests/test_skills.py::TestInstallCodexHooks -q— 12 passedruff check code_review_graph/skills.py tests/test_skills.py— passesgit diff --check— passes