fix: install post-tool hooks for Codex and OpenCode#258
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🧰 Additional context used📓 Path-based instructions (2)Gradata/tests/**/*.py📄 CodeRabbit inference engine (Gradata/AGENTS.md)
Files:
Gradata/src/**/*.py📄 CodeRabbit inference engine (Gradata/AGENTS.md)
Files:
🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-05-01T15:50:32.772ZApplied to files:
🔇 Additional comments (11)
📝 Walkthrough
WalkthroughHook adapters for Codex and OpenCode now manage multiple hook events per agent instead of single hooks. Both adapters define a HOOKS registry, implement idempotent multi-event install logic with signature-based deduplication, and generalized uninstall. Tests validate the installations across all adapters. ChangesMulti-hook adapter expansion
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.22.0)OpenGrep fatal error (exit code 2): �[32m✔�[39m �[1mOpengrep OSS�[0m �[1m Loading rules from local config...�[0m Comment |
Summary
Verification
python3 -m pytest tests/test_hook_adapters.py→ 21 passedpython3 -m gradata.cli install --agent codex|hermes|opencode --brain <tmp>→ wrote post/session hook configs and assertions passedpython3 -m pytest tests/test_hook_adapters.py tests/test_adapter_extraction_contracts.py tests/test_uninstall_command.py→ 92 passed/home/olive/.local/bin/uvx ruff check src/gradata/hooks/adapters/codex.py src/gradata/hooks/adapters/opencode.py tests/test_hook_adapters.py→ All checks passedgit diff --check→ cleanPaperclip: GRA-55