Skip to content

Commit b462de6

Browse files
rosschurchillclaude
andcommitted
test safishamsi#534: assert _CODEX_HOOK emits additionalContext (regression guard)
additionalContext was already present in _CODEX_HOOK; add a test so it cannot be silently removed in future refactors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4bbb2fb commit b462de6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_install.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ def test_agents_uninstall_no_op_when_not_installed(tmp_path, capsys):
183183
assert "nothing to do" in out
184184

185185

186+
def test_codex_hook_emits_additional_context():
187+
"""_CODEX_HOOK must include additionalContext so Codex gets graph context."""
188+
from graphify.__main__ import _CODEX_HOOK
189+
hook_cmd = _CODEX_HOOK["hooks"]["PreToolUse"][0]["hooks"][0]["command"]
190+
assert "additionalContext" in hook_cmd
191+
assert "GRAPH_REPORT.md" in hook_cmd
192+
193+
186194
# --- OpenCode plugin tests ---
187195

188196
def test_opencode_agents_install_writes_plugin(tmp_path):

0 commit comments

Comments
 (0)