test(opencode): add adapter contract, TUI readiness, and lifecycle integration tests

This commit is contained in:
2026-08-29 14:59:04 +09:00
parent 94af7f6b8a
commit de2c0e6824
5 changed files with 495 additions and 15 deletions
+5 -1
View File
@@ -488,7 +488,7 @@ def test_c10_create_session_timeout_dead_pid_kills_session(mam_sandbox, mock_her
def test_adapter_strong_weak_partition():
"""N-D: Verify strong_ready_tokens and weak_ready_tokens partition ready_tokens for all adapters."""
from lib_py.agents.registry import get_adapter
for agent in ('claude', 'agy', 'hermes', 'grok'):
for agent in ('claude', 'agy', 'hermes', 'grok', 'opencode'):
adapter = get_adapter(agent)
assert adapter is not None
ready_set = set(t for t in adapter.ready_tokens.split('|') if t)
@@ -525,6 +525,8 @@ echo "5: $(check_sks 'test-worker-hermes-02')"
echo "6: $(check_sks 'workspace-creator-agy-05')"
echo "7: $(check_sks 'claude')"
echo "9: $(check_sks 'grok-02')"
echo "10: $(check_sks 'creator-opencode-01')"
echo "11: $(check_sks 'opencode')"
"""
res = _run_lib_helpers(script)
assert res.returncode == 0, res.stderr + res.stdout
@@ -534,6 +536,8 @@ echo "9: $(check_sks 'grok-02')"
assert "6: RESOLVED_AGENT=agy" in res.stdout
assert "7: RESOLVED_AGENT=claude" in res.stdout
assert "9: RESOLVED_AGENT=grok" in res.stdout
assert "10: RESOLVED_AGENT=opencode" in res.stdout
assert "11: RESOLVED_AGENT=opencode" in res.stdout
def test_f2_upsell_modal_defense_with_real_facts_and_banner():