eval: gobang as a Track B native agent

gobang, the Aji-native harness, joins Codex, Claude Code and OpenCode in
ajieval native. Like them it is an agent product: its runs are never
evidence for H4. Model ids choose the provider: claude-* the Anthropic
API, any other GLM via z.ai, fixture:PATH a scenario without network
(self-tests).

gobang reaches the model over its API, so the key's variable is passed
into the sandbox environment; NativeAgent.env supplies it, its value
never enters the run record, and a missing key stops the run before
anything is created. Tool processes run in gobang's own networkless
bubblewrap sandbox, so no shell wrapper is used. The transcript is
gobang's journal: usage, tool calls and the model come from its events,
the repair metrics from its toolchain tools (aji_check, aji_run,
run_tests with aji's exit codes), and its documentation tools count as
reads of /docs files.

Checked end to end on dev-echo (aji_source) with a fixture model: the
dev evaluator accepts the solution, the workspace holds only the
solution, and the first-check and first-test metrics are exact. With a
fake key the run reaches z.ai from the sandbox and ends INFRA_FAILED
(auth) without the key in any file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
devandClaude Opus 5.5 committed 2026-10-08 15:00:36 +03:00
1 parent 762c5abe7b
commit 0e98638bc6
4 files changed
+246 -2

No files matched your search

+24
View File
@@ -99,6 +99,30 @@ def tool_events_native(agent_name, transcript_path):
if e.get("type") == "tool_use":
st = part.get("state") or {}
out.append((json.dumps(st.get("input")), st.get("output") or ""))
if agent_name == "gobang":
out += _gobang_tool_events(transcript_path)
return out
def _gobang_tool_events(transcript_path):
"""gobang's documentation tools name sections and files relative to the
bundle; they are presented as /docs paths, and their numbered text as
the output, so the documentation metrics count them like a file read."""
from .native import gobang_events
out = []
results, _ = gobang_events(transcript_path)
for tool, args, output in results:
try:
a = json.loads(args) if args else {}
o = json.loads(output)
except json.JSONDecodeError:
continue
if tool in ("docs_read", "docs_search", "docs_index"):
target = a.get("path") or (a.get("section") or "").split("#")[0]
text = o.get("text") or json.dumps(o.get("sections") or "")
out.append(("/docs/" + target if target else "/docs", text))
else:
out.append((args, output))
return out