Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7a9ecf0d-b093-48a9-97db-df3fe360f466
📒 Files selected for processing (4)
src/main/agent-hooks/installer-utils.test.tssrc/main/agent-hooks/installer-utils.tssrc/main/codex/hook-service.test.tssrc/main/codex/hook-service.ts
|
Live Windows validation passed on commit \3e090350b:\n\n- launched an isolated real \pnpm dev\ Electron instance\n- created a PowerShell terminal with the Orca-managed \CODEX_HOME\n- verified all managed Codex events use \C:/Users/neil/.orca/agent-hooks/codex-hook.cmd\n- launched \codex-cli 0.144.3\ with an initial harmless prompt\n- observed no \SessionStart hook (failed), \UserPromptSubmit hook (failed), or \hook exited with code 1\n- observed \UserPromptSubmit\ in Orca's agent-status handling and a completed assistant response\n- stopped the dev/Codex process tree and removed the isolated profile\n\nThe review portability note is addressed by \3e090350b; the focused PowerShell regression test passes. |
|
Closing as superseded by #8737, which landed the broader Windows hook launcher fix on main for Codex, Antigravity, and Devin. |
Summary
.cmdpaths with forward slashes so CMD, PowerShell, and Git Bash can all execute the same commandThis fixes the Windows regression introduced by #8430. That change replaced the direct Codex hook path with a CMD-only
if exist (...)guard, but Codex uses the configured session shell when present. PowerShell therefore rejected the hook before Orca's script could read stdin.Screenshots
No visual change.
Testing
pnpm lint— not run in full; targeted Oxlint passed for all four changed filespnpm typecheck— not run in full;pnpm run typecheck:nodepassedpnpm test— not run in full; focused Vitest run passed 30 tests across the Codex service and cross-shell launcherpnpm build— not runAdditional verification:
pnpm run check:max-lines-ratchetpassedgit diff --checkpassedA broader managed-hook lifecycle run reached two unchanged failures in the existing CMD-only fast-path tests on this machine (
more.com/Node stdin EOF and missing-script exit 1). The fixed Codex installer no longer uses that CMD-only launcher.AI Review Report
The review traced Codex hook discovery, trust hashing, and command execution through the current upstream implementation. It confirmed that Windows hooks default to
cmd.exeonly when no session shell is configured; otherwise Codex executes them through the active shell. That made the existing CMD-only guard invalid for Orca sessions hosted by PowerShell.Main risks checked:
.cmdcommand under CMD, Windows PowerShell, and Git Bash. Paths that are not safe to execute unquoted retain Orca's existing encoded launcher.process.platform === 'win32'. macOS/Linux local hooks, WSL runtime hooks, and SSH remote hooks keep their existing POSIX launchers unchanged.No additional correctness changes were needed after review.
Security Audit
%,^,&, parentheses, Unicode, and other potentially ambiguous characters fall back to the encoded PowerShell launcher.~/.orca/agent-hookslocation and is written atomically beforehooks.jsonis published.No security follow-up is required.
Notes
.cmdis manually deleted after Orca publisheshooks.json, a shell-safe direct entry can report a missing hook until Orca's installer repairs it. Normal install, upgrade, dev/prod switching, and removal flows write the shared script before publishing configuration, so they do not create that state.