Curate a Terminal-Bench 2.0 cross-section suite for the Gym

4669feeeb455 · AtlantisPleb · · parent 7da97eb6fced

Curate a Terminal-Bench 2.0 cross-section suite for the Gym

Twelve tasks spanning version control, build, debugging, data
processing, forensics, sysadmin/networking, and one long-horizon
anchor, chosen to vary round count and output volume so the
tool-declaration efficiency levers from the fix-git analysis can be
tested for generalization. Includes per-task runnability notes for
the Rosetta rig, exclusions with cause, plugin-delta candidates for
OpenAgentsInc/openagents#37, and the exact harbor run invocations
(repeated -i confirmed against harbor run --help) plus a loop form
driven by the machine-readable task list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GoYpb8FEmdxVErsv7ABCYi
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • added bench/suites/tb2-cross-section.md
  • added bench/suites/tb2-cross-section.txt

Diff

2 files changed, +181 -0

bench/suites/tb2-cross-section.md added +160

@@ -0,0 +1,160 @@

1
# Terminal-Bench 2.0 cross-section suite
2
3
Date: 2026-08-24. Companion to
4
`docs/terminalbench/2026-08-24-fix-git-run-analysis.md` (openagents.com repo)
5
and the Gym plan. Purpose: test whether the tool-declaration efficiency
6
levers (batching, quiet flags, `--stat`-before-`-p`, lane-aware verbosity)
7
generalize beyond `fix-git`, across distinct skill families and across
8
round-count and output-volume regimes.
9
10
Source of truth for task metadata: `task.toml` in each task directory of
11
`laude-institute/terminal-bench-2` (the repo Harbor's `terminal-bench@2.0`
12
registry entry points at). All 89 tasks are amd64, `gpus = 0`,
13
`allow_internet = true`; none use docker-compose or multi-container setups.
14
15
## The twelve tasks
16
17
| # | Task | Skill family | What it tests | Difficulty | Expected shape | Why this slot |
18
| --- | --- | --- | --- | --- | --- | --- |
19
| 1 | `git-leak-recovery` | version control / forensics | Recover a secret purged by history rewrite (reflog, dangling objects, packfiles), then scrub it without touching unrelated history | medium | many rounds, high output volume (history dumps) | Direct oracle for the `git_lost_work` plugin delta (OpenAgentsInc/openagents#37); the recon phase is exactly what the plugin collapses |
20
| 2 | `sanitize-git-repo` | version control / security | Find and replace all API keys across a real repo's full history with consistent placeholders, leaving clean files untouched | medium | many rounds, high output volume (grep/log over history) | Second plugin-delta candidate; punishes full-patch dumps — the `--stat`-before-`-p` lever is load-bearing here |
21
| 3 | `merge-diff-arc-agi-task` | version control + codegen | Fetch two git bundles into branches, merge with conflict resolution, and write an `algo.py` that generalizes an ARC-style mapping | medium | medium rounds, low volume | Multi-skill in one task: git mechanics plus a reasoning payload; the closest sibling to `fix-git` without repeating it |
22
| 4 | `build-cython-ext` | build / compile | Clone pyknotid 0.5.3, fix NumPy 2.x incompatibilities, compile three Cython extensions, install system-wide | medium | MANY rounds (compile-fix loop), high volume (compiler errors) | The canonical iterate-on-compiler-output loop; round count here is where batching either pays or doesn't |
23
| 5 | `sqlite-with-gcov` | build / system | Build SQLite from a pre-vendored fossil tarball with gcov instrumentation and put it on PATH | medium | FEW rounds, very high output volume (configure/make) | Offline and deterministic — the pure output-volume probe: a good agent quiets make, a bad one replays it every round |
24
| 6 | `fix-code-vulnerability` | debugging / security | Identify the CWE-classified vulnerability in a pinned `bottle.py` checkout and report it as JSONL | hard | FEW rounds, low volume, reasoning-heavy | Quick-shaped but hard: discriminates on success, not cost — anchors the suite so efficiency wins aren't confounded with capability losses |
25
| 7 | `regex-log` | data processing | Author one regex (last date on IPv4-bearing lines, validity rules) into `/app/regex.txt` | medium | FEW rounds (quick task) | The suite's fast lane: near-zero tool surface, measures whether the agent can just answer |
26
| 8 | `count-dataset-tokens` | data processing / ML | Pull a 1k-sample HF dataset, read its README for usage, tokenize the science domain with the Qwen2.5-1.5B tokenizer, write one integer | medium | medium rounds, network-bound | Real-world dataset plumbing (pip + HF hub at agent time); tokenizer-only download, no model weights |
27
| 9 | `password-recovery` | security / forensics | Carve a fragmented zip out of a raw disk image (dd/strings/foremost/sleuthkit) to recover a deleted password | hard | MANY rounds, medium volume | File-forensics: the non-git half of the future forensics-plugin story; forensic tools are pre-installed so it is iteration, not setup |
28
| 10 | `openssl-selfsigned-cert` | security / sysadmin | Execute a fully-specified checklist: key with 0600 perms, self-signed cert with exact subject fields, verification artifacts | medium | FEW rounds if batched, MANY if not | The purest batching discriminator in the set: every command is known upfront; round count is entirely a tool-habit measurement |
29
| 11 | `nginx-request-logging` | networking / sysadmin | Install and configure nginx: custom log format, rate limiting zone, 404 page, exact file locations; verifier drives HTTP traffic | medium | medium-many rounds (config-test loop) | The service-configuration family; edit-reload-curl loops reward tight rounds and punish re-reading configs |
30
| 12 | `schemelike-metacircular-eval` | long-horizon SWE | Write a metacircular evaluator in a scheme-like language that runs all test programs *and itself* | medium (300-min expert) | MANY rounds, large artifacts, long wall time | The long-horizon anchor: sustained write-test-debug over one growing file; context growth over many rounds is exactly the quadratic-replay cost under test |
31
32
Coverage check against the selection criteria:
33
34
- Version control without repeating `fix-git`: tasks 1–3.
35
- Build/compile: 4, 5. Debugging/code-fix: 6 (and 4's fix loop).
36
- Data processing: 7, 8. Security/forensics: 1, 2, 9, 10.
37
- Networking/sysadmin: 10, 11. Long-horizon: 12 (plus 4, 9).
38
- Round-count spread: quick — 6, 7, 10 (if batched); many-round — 1, 2, 4,
39
  9, 11, 12. Output-volume spread: 5 (dominant), 1, 2, 4.
40
- Plugin-delta candidates (#37): 1 and 2 (git forensics), 9 (file
41
  forensics).
42
43
Near-misses, recorded so the next round doesn't re-derive them:
44
`extract-elf` (write a JS ELF parser — good, lost its slot to
45
`openssl-selfsigned-cert` because this round is about efficiency levers),
46
`build-pmars` (Debian source archaeology, overlaps 4/5),
47
`cancel-async-tasks` (subtle asyncio, overlaps 6's shape),
48
`sqlite-db-truncate` and `db-wal-recovery` (overlap 9),
49
`cobol-modernization` (easy; a fine future quick slot).
50
51
## Excluded with cause
52
53
- `custom-memory-heap-crash`: the Dockerfile builds a custom gcc/libstdc++
54
  from source at image build time — hours under Rosetta.
55
- `qemu-startup`, `qemu-alpine-ssh`, `install-windows-3.11`: nested
56
  virtualization inside an emulated amd64 container; the run-analysis doc's
57
  qemu fragility note applies squarely.
58
- `hf-model-inference`, `mteb-*`, `caffe-cifar-10`, `sam-cell-seg`,
59
  `train-fasttext`: model/dataset downloads in the hundreds of MB to GB, or
60
  ML workloads that are emulation-hostile.
61
- `build-pov-ray` (12,000 s timeouts), `compile-compcert` (Coq/OCaml
62
  toolchain build): compile times balloon under Rosetta.
63
- `crack-7z-hash`: builds John the Ripper at image build and then
64
  brute-forces — CPU-bound cracking under emulation is a wall-time gamble.
65
- `extract-moves-from-video`, `video-processing`, `code-from-image`,
66
  `financial-document-processor`: video/OCR workloads, heavy and slow
67
  under emulation.
68
69
## Per-task runnability notes and risks
70
71
| Task | Image base | Agent-time network needs | Risks |
72
| --- | --- | --- | --- |
73
| git-leak-recovery | ubuntu:24.04 + git | none | none notable |
74
| sanitize-git-repo | python:3.13-slim + git | none (repo cloned at image build, pinned commit) | image build clones a GitHub repo — needs network at build; verifier bundles a 1.4 MB fixture |
75
| merge-diff-arc-agi-task | ubuntu:24.04 (bare) | apt-get install git (image ships **without git**) | first rounds are apt-driven; apt mirror slowness inflates wall time, not rounds |
76
| build-cython-ext | python:3.13-slim + build-essential, numpy 2.3.0 | git clone pyknotid + pip installs | Cython compile under Rosetta is minutes, bounded; network clone at agent time |
77
| sqlite-with-gcov | ubuntu:24.04 + toolchain, vendored tarball | none | configure/make of SQLite under Rosetta ≈ several minutes; verifier runs gcov checks |
78
| fix-code-vulnerability | python:3.11-slim + pinned bottle checkout | none | none notable |
79
| regex-log | ubuntu:24.04 (bare) | none | none notable |
80
| count-dataset-tokens | python:3.13-slim (bare) | pip (datasets/transformers ≈ 100–300 MB wheels) + HF hub (dataset ~1k rows, tokenizer files only) | heaviest network dependency in the suite; still well under the 2 GB line; HF availability is a flake source |
81
| password-recovery | ubuntu:24.04 + forensic tools (extundelete, sleuthkit, foremost) | none | 4 MB image is carved with userland tools; no loop mounts needed |
82
| openssl-selfsigned-cert | (light) | none | none notable |
83
| nginx-request-logging | python:3.13-slim + curl | apt-get install nginx | verifier makes live HTTP requests incl. rate-limit probes — mildly timing-sensitive under emulation; watch for flaky rate-limit assertions |
84
| schemelike-metacircular-eval | python:3.13-slim + test corpus | none | 2,400 s agent/verifier timeouts; the self-interpretation test tower is slow — budget the long verifier |
85
86
Verifier shape: every task's `tests/test.sh` follows the standard template
87
(install `uv` 0.9.5, `uvx pytest` with CTRF output, reward.txt), except
88
`build-cython-ext`, `fix-code-vulnerability`, `hf-model-inference`,
89
`headless-terminal`, `kv-store-grpc`, and `largest-eigenval`, which
90
`pip install pytest` directly. Both shapes run fine under Rosetta (the qemu
91
`uv` segfault is the already-documented failure mode that Rosetta fixes —
92
see `bench/README.md`).
93
94
## Running the suite
95
96
`harbor run --help` confirms `-i` / `--include-task-name` is a repeatable
97
`list[str]` option (and accepts globs), so the whole suite is one
98
invocation. Follow `bench/README.md` for the working-tree CLI tarball,
99
dev-forge token, and Rosetta prerequisites.
100
101
Proxy lane (one command per catalog model; shown for gpt-5.6-luna —
102
substitute `-m openai/<model>` per lane, e.g. `gemini-3.7-flash`):
103
104
```sh
105
PYTHONPATH=bench OPENAGENTS_TOKEN=... harbor run \
106
  --dataset terminal-bench@2.0 \
107
  --agent-import-path adapters.openagents_coder:OpenAgentsCoder \
108
  -m openai/gpt-5.6-luna \
109
  -i git-leak-recovery -i sanitize-git-repo -i merge-diff-arc-agi-task \
110
  -i build-cython-ext -i sqlite-with-gcov -i fix-code-vulnerability \
111
  -i regex-log -i count-dataset-tokens -i password-recovery \
112
  -i openssl-selfsigned-cert -i nginx-request-logging \
113
  -i schemelike-metacircular-eval \
114
  --n-concurrent 2 \
115
  --jobs-dir /tmp/gym-jobs/tb2-cross-section-luna
116
```
117
118
Local lane (Ollama through the same adapter, as in the fix-git qwen run):
119
120
```sh
121
PYTHONPATH=bench OPENAGENTS_TOKEN=... harbor run \
122
  --dataset terminal-bench@2.0 \
123
  --agent-import-path adapters.openagents_coder:OpenAgentsCoder \
124
  -m ollama/qwen3.8:27b-mtp-q8_0 \
125
  -i git-leak-recovery -i sanitize-git-repo -i merge-diff-arc-agi-task \
126
  -i build-cython-ext -i sqlite-with-gcov -i fix-code-vulnerability \
127
  -i regex-log -i count-dataset-tokens -i password-recovery \
128
  -i openssl-selfsigned-cert -i nginx-request-logging \
129
  -i schemelike-metacircular-eval \
130
  --n-concurrent 1 \
131
  --jobs-dir /tmp/gym-jobs/tb2-cross-section-qwen
132
```
133
134
`--n-concurrent 2` is the suggested ceiling on the Rosetta rig for the
135
proxy lanes (two emulated amd64 builds plus a compile task saturate the
136
machine); the local lane should stay at 1 because the model itself owns
137
the cores. Jobs-dir convention:
138
`/tmp/gym-jobs/tb2-cross-section-<lane>`, one directory per lane, so
139
`bench/post_gym_run.py` can post each lane's job separately.
140
141
Loop form, for scripts (equivalent per-task jobs driven from the
142
machine-readable list; also the fallback if a future Harbor version
143
changes `-i` semantics):
144
145
```sh
146
grep -v '^#' bench/suites/tb2-cross-section.txt | while read -r task; do
147
  [ -z "$task" ] && continue
148
  PYTHONPATH=bench OPENAGENTS_TOKEN=... harbor run \
149
    --dataset terminal-bench@2.0 \
150
    --agent-import-path adapters.openagents_coder:OpenAgentsCoder \
151
    -m openai/gpt-5.6-luna \
152
    -i "$task" --n-concurrent 1 \
153
    --jobs-dir "/tmp/gym-jobs/tb2-cross-section-luna/$task"
154
done
155
```
156
157
Timeout note: `schemelike-metacircular-eval` carries 2,400 s budgets and
158
Rosetta compile tasks run slow; if a run brushes limits, prefer
159
`--timeout-multiplier 2.0` over trimming the suite — a timeout-shaped
160
failure is not an efficiency signal.
bench/suites/tb2-cross-section.txt added +21

@@ -0,0 +1,21 @@

1
# Terminal-Bench 2.0 cross-section suite (see tb2-cross-section.md)
2
# One task name per line; lines starting with # are comments.
3
# version control / forensics
4
git-leak-recovery
5
sanitize-git-repo
6
merge-diff-arc-agi-task
7
# build / compile
8
build-cython-ext
9
sqlite-with-gcov
10
# debugging / security code-fix
11
fix-code-vulnerability
12
# data processing
13
regex-log
14
count-dataset-tokens
15
# security / forensics / sysadmin
16
password-recovery
17
openssl-selfsigned-cert
18
# networking / service configuration
19
nginx-request-logging
20
# long-horizon
21
schemelike-metacircular-eval

This page updates live while a promote is in flight · changelog