diff --git a/src/benchflow/agents/registry.py b/src/benchflow/agents/registry.py index 0f00b33a..a00c3800 100644 --- a/src/benchflow/agents/registry.py +++ b/src/benchflow/agents/registry.py @@ -700,7 +700,7 @@ class AgentConfig: skill_paths=["$HOME/.opencode/skills"], home_dirs=[".opencode"], install_cmd=( - _js_agent_install("opencode", "opencode-ai") + _js_agent_install("opencode", "opencode-ai@1.17.20") + " && " + _opencode_family_proxy_wrapper_install( "opencode", ".config/opencode/opencode.json" diff --git a/tests/test_registry_invariants.py b/tests/test_registry_invariants.py index 1227f91c..2671f3dc 100644 --- a/tests/test_registry_invariants.py +++ b/tests/test_registry_invariants.py @@ -259,6 +259,14 @@ def test_js_agent_install_respects_explicit_npm_package_specs(): assert "some-agent@latest" in default_cmd +def test_opencode_install_is_pinned_for_reproducible_harness_runs(): + """Guards PR #931 against silently changing OpenCode between eval stages.""" + install_cmd = AGENTS["opencode"].install_cmd + + assert "opencode-ai@1.17.20" in install_cmd + assert "opencode-ai@latest" not in install_cmd + + def test_gemini_cli_install_is_pinned(): """Guards v0.5-integration@27752fa against Daytona installing moving latest.""" install_cmd = AGENTS["gemini"].install_cmd