Skip to content

feat(headless): run DeepSWE via Pier as a benchmark axis of the harness A/B - #1398

Merged
Astro-Han merged 4 commits into
mainfrom
feat/headless-deepswe-pier-ab
Jul 23, 2026
Merged

feat(headless): run DeepSWE via Pier as a benchmark axis of the harness A/B#1398
Astro-Han merged 4 commits into
mainfrom
feat/headless-deepswe-pier-ab

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Refs #1343. Makes the DeepSWE (Datacurve) benchmark runnable through the existing harness A/B driver, executed via Pier ≥ 0.3.0, with the Codex CLI as a second proxied competitor arm.

A benchmark is a bound pair of frozen task source and executor (Terminal-Bench 2.1 ↔ plain Harbor 0.13.2, DeepSWE ↔ Pier), so instead of a parallel run script it becomes a second entry in HARNESS_BENCHMARK_PROFILES, selected by MAKA_HARNESS_AB_BENCHMARK and orthogonal to the existing competitor axis:

  • codex_agent.py moves onto harness_compat (Pier selects the pier.* tree; plain Harbor keeps harbor.*) and implements the Pier-required install_spec() (None — the pinned toolchain must never be reinstalled from the network) and network_allowlist() (host provider proxy only, no api.openai.com fallback). Proxy endpoint parsing is shared with the Kimi adapter via provider_proxy.py.
  • createPierTaskRunner gains the codex arm: pinned-toolchain mount, --ak constructor kwargs (version, reasoning_effort), Squid-legal fixed-port lock generalized to all container-CLI arms, and resolver-backed credentials (Codex OAuth) now force the proxy path on the Maka arm, matching the Harbor runner's contract.
  • harness-ab-manifest.ts freezes the DeepSWE identity: DEEP_SWE_REVISION, the 30-task discriminative subset (11×p=0.25 + 17×p=0.50 + 2 anchors from the public v1.1 leaderboard trials), and its task-tree fingerprint.
  • run-harness-ab.mjs dispatches task discovery/assertions, run-id and order-seed derivation, the oracle-evidence hook (Terminal-Bench only), and the runner factory on the benchmark profile. Terminal-Bench default behavior — env names, run ids, order seeds, resume fingerprints — is byte-for-byte unchanged; the k3 order-seed special case collapses into the general template it already equaled.

Resulting matrix from one driver: BENCHMARK=deep-swe-1.1 × COMPETITOR=kimi-code|codex covers both the #1343 K3 target and the GPT-5.6-Sol/Codex-OAuth comparison; opencode on DeepSWE fails fast (no Pier arm).

Verification

  • packages/headless suite: 1287 pass / 0 fail (new: 6 Pier codex-arm cases, DeepSWE benchmark-axis CLI case).
  • tests/test_harness_compat.py: 7/7 pass under the Pier venv, 3 pass + 4 skips under plain Harbor (codex adapter now covered in both trees).
  • Dry-runs of all four paths: Terminal-Bench default (89-task assertion + oracle message unchanged), DeepSWE×kimi-code (30), DeepSWE×codex (canary 5), DeepSWE×opencode (fails fast).
  • Real pier run end-to-end with the fake backend on dasel-html-document-format: adapter loads on the Pier tree, offline container, verifier grades reward 0, structured verifier outcome and cell output read back correctly.
  • npm run format / npm run lint clean.
  • Not run: a real-model Pier trial (Codex OAuth canary is prepared but deliberately not launched) and the Terminal-Bench canary against live tasks (source assertions covered by dry-run + unit tests).

Review focus

The Terminal-Bench path must be behavior-identical: resolveHarnessAbRunId, order-seed derivation, and the oracle-evidence flow moved under profile dispatch with default parameters preserving the old signatures.

- port codex_agent.py to harness_compat (Pier tree selection) and add the
Pier-required install_spec/network_allowlist, sharing the proxy-endpoint
parsing with kimi_code_agent via provider_proxy.py
- extend createPierTaskRunner with a codex arm: pinned toolchain mount,
--ak constructor kwargs, proxy wiring, and resolver-credential proxy
routing for the Maka arm (Codex OAuth)
- freeze the DeepSWE subset-30 task list + task tree fingerprint in
harness-ab-manifest and generalize the manifest benchmark field
- add run-deepswe-ab.mjs: Maka vs Codex on openai-codex/gpt-5.6-sol via
Pier, reusing the harness A/B engine, manifest, and report pipeline
Issue #1343.
…f run-harness-ab
A benchmark is a bound pair of frozen task source and executor (Terminal-Bench
2.1 <-> Harbor, DeepSWE <-> Pier), so it becomes HARNESS_BENCHMARK_PROFILES +
MAKA_HARNESS_AB_BENCHMARK on the existing driver, orthogonal to the competitor
axis, instead of a parallel run script. Task selection, run-id/order-seed
derivation, the oracle-evidence hook, and the runner factory dispatch on the
profile; the Terminal-Bench default behavior (env names, run ids, order seed,
resume fingerprints) is unchanged. Deletes run-deepswe-ab.mjs.
…dentity
Review follow-ups on the DeepSWE benchmark axis:
- codex_agent.py hydrates codex.txt and the sessions rollouts in run()'s
finally, mirroring the Kimi adapter: Pier replaces the default /logs/agent
bind mount under --mounts-json while capabilities.mounted stays true, so
without this download a real token-burning run reads zero events and every
cell is misclassified as failed.
- Benchmark profiles now carry their bound executor explicitly, and a Pier
benchmark freezes `pier --version` (stdout only) into the toolchain
fingerprint so a resume across a Pier upgrade forks instead of mixing
cells; the Harbor payload stays byte-identical.
- resolveHarnessBenchmarkProfile's no-argument default reads
MAKA_HARNESS_AB_BENCHMARK, so defaulted call sites agree with the
production entry points.
- resolveFrozenBenchmarkTasks passes selectTasksByIds an options object, so
missing-task errors keep their DeepSWE subset-30 scope prefix.
…iew polish
- The manifest's benchmark section carries { executor: { id: 'pier', version } }
for Pier benchmarks, so the frozen executor identity is auditable without
trial-log archaeology; the key is absent for Harbor benchmarks and a test
locks the byte-identical Terminal-Bench payload.
- The opencode × Pier guard fires in main() before any run root or lock is
created, so a doomed pairing leaves no run state behind.
- The headless README documents the benchmark axis (MAKA_HARNESS_AB_BENCHMARK,
the DeepSWE subset-30 profile, and the Pier executor pin).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Astro-Han