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

+16
View File
@@ -205,6 +205,7 @@ Per agent:
| `codex` | `codex exec --json`; `approval_policy=never`; web search off; product features off (multi-agent, apps, browser, computer use, plugins, skills, goals, hooks…) | off (Codex `workspace-write` sandbox) |
| `claude` | `claude -p --output-format stream-json`; tools limited to `Bash`, `Read`, `Edit` and `Write`; `--strict-mcp-config`; slash commands off | off (networkless shell wrapper) |
| `opencode` | `opencode run --pure --format json`; no MCP; `webfetch`, `websearch` and `task` off; no LSP downloads | off (networkless shell wrapper) |
| `gobang` | `gobang run --json-events --in-place /work`; configuration written to the fresh HOME; documentation at `/docs` | off (gobang's own bubblewrap sandbox; the model has no shell) |
**Networkless shell.** Inside the sandbox, the real shell binaries (`/usr/bin/bash`; `sh` follows its symlink) are replaced by wrappers. Each wrapper runs the command in a nested bubblewrap with a fresh, empty network namespace and without the resolver socket. The CLI process keeps the network to reach its backend. Every process a tool starts through a shell, `python3` sockets included, has neither network nor DNS. The live check is the dev task [`dev-netprobe`](dev-tasks/dev-netprobe/), which all three agents pass.
@@ -230,6 +231,21 @@ Per agent:
A first-generation snapshot is not available in Track B. There is no cost in dollars either: on subscriptions there is no honest cost per solution, so Track B reports success, time, tool calls and context. Economics stays with Track A.
### gobang
gobang (a sibling repository) is an Aji-native harness: the model works through typed tools bound to the toolchain instead of a shell, and gobang's own verification gate decides when it is done. It is another agent product in Track B, so its runs are never evidence for H4 either; what it measures is the harness, against the other agents, ideally on the same model.
```sh
PATH=/path/to/gobang/zig-out/bin:$PATH ZAI_API_KEY=… python3 -m ajieval native --task DIR --language aji_source \
--agent gobang --model glm-5.3-flash --evaluator CMD --out runs/
```
- **Model ids.** `claude-*` uses the Anthropic API (`ANTHROPIC_API_KEY`); any other id uses GLM via z.ai (`ZAI_API_KEY`); `fixture:PATH` replays a gobang scenario file without a network, for harness self-tests.
- **Key.** Unlike the other agents, gobang has no credential file: the key's variable is passed into the sandbox with `--setenv` and named, never valued, in the configuration. Its value appears in no record. It is visible to the user's own processes in the bubblewrap command line while the run lasts. A missing key stops the run before anything is created.
- **Isolation.** gobang runs aji and test commands in a nested bubblewrap sandbox with every namespace unshared, so tool processes have no network even though the sandbox shares it for the model API; there is no shell wrapper.
- **Transcript.** `transcript.jsonl` is gobang's journal (`--json-events`). Tool calls, token usage (input including cached, cached, output) and the model come from its events. The repair metrics come from gobang's toolchain tools, not from guessed shell commands: `aji_check` and `aji_run` count as `aji check` and `aji run` with aji's exit code for their outcome, `run_tests` as the configured test commands. The documentation tools are presented as reads of `/docs/<file>`, so the documentation metrics count them like a file read.
- **State.** gobang keeps its session state under `/tmp/gobang` inside the sandbox, so the evaluated repository contains only the solution. `metrics.agent_facts` carries `gobang_state` and `gobang_reason` (COMPLETED, FAILED, BLOCKED, INFRA_FAILED …) and the hash of gobang's prompts.
## Agent and evaluation status (Track B, `metrics`)
How the agent's session ended and what the evaluator says about the repository are recorded separately, so that a transport problem after a finished solution is not read as a failure of the solution, and a cut-off reply is not read as a normal exit.