Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tools/agent-guard/tests/test_opencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

import pytest

import agent_guard
from agent_guard import ALLOW_EXIT, DENY_EXIT, cli, opencode_main
from agent_guard import ALLOW_EXIT, DENY_EXIT, cli, dispatch, opencode_main


def _feed(monkeypatch: pytest.MonkeyPatch, payload: object) -> None:
Expand Down Expand Up @@ -84,7 +83,7 @@ def test_decision_matches_claude_dispatch(monkeypatch: pytest.MonkeyPatch):
command = "git commit -m 'x\n\nCo-Authored-By: A <a@b.c>'"
_feed(monkeypatch, {"command": command})
opencode_denies = opencode_main() == DENY_EXIT
dispatch_denies = agent_guard.dispatch(command) is not None
dispatch_denies = dispatch(command) is not None
assert opencode_denies is dispatch_denies is True


Expand Down