configs/swe-bench-smoke.plan.yaml — 3 real
SWE-bench Verified instances in oracle mode (gold-patch replay, zero LLM spend) —
through a full real-cloud pass: the AgentRun-hosted agent produces the predictions,
the upstream swebench harness evaluates them in Docker on an ECS driver host, and
the results land back on your laptop via OSS.
The plan’s shape is already proven offline: tests/test_swe_submit_e2e.py submits
the exact committed file through the real csbench submit code path and executes its
task entry end-to-end in mock mode. What only a live run can prove is the wiring —
Docker, the dataset download, the AgentRun invocation, billing — hence this runbook.
Preconditions
- Aliyun balance ≥ ¥100. Postpaid ECS creation is rejected below this account
balance — the submit will fail at
terraform applywith an opaque quota-like error. - RAM credentials. MAIN-account AK exported for terraform
(
ALICLOUD_ACCESS_KEY/ALICLOUD_SECRET_KEY/ALICLOUD_REGION); the controller’s own SDK calls use the sub-account instance role thatcontroller.tfprovisions. configs/agent-runtime-aliyun.local.yaml(gitignored, never committed) withtarget.region,target.blob_bucket, the credential env-var names undertarget.auth_env, andtarget.arms_license_keyfor telemetry.target.mode: realin that local config. Without it the suite bridge defaults to mock — you would pay for a full-price ECS campaign that replays canned fixtures (csbench submitprints a loud warning if asuite:task is submitted non-real).- ARMS license key present in that local config (trace/metric export).
llmmode only — key delivery is NOT yet wired for prod submit.DASHSCOPE_API_KEYmust be present in the DRIVER host’s environment at provision time: the SUT client forwards it into the CreateAgentRuntime provision env, but prod cloud-init does not deliver it to the driver today. Two working options: (i) submit withcontroller_debug=true, SSH to the controller andexport DASHSCOPE_API_KEY=...into the orchestrator’s environment before the campaign claims the suite task; or (ii) run llm mode from a locally-driven (non-submit) execution where your own shell environment carries the key. Oracle mode needs no LLM key at all.
The plan
configs/swe-bench-smoke.plan.yaml (committed; placeholders only — real values live
in the gitignored local config):
driver_image.py): direct pull when reachable
(overseas / unblocked regions), the account’s own ACR endpoint when Docker Hub is
blocked, or a loud abort otherwise — the decision is logged to the campaign. Set
driver.docker_registry_mirror only to FORCE a specific mirror. Unknown driver:
keys are rejected at submit time.
Command sequence
Live-verification checklist (8 points)
Work through these on the first live pass — each one covers a seam that mock-mode tests cannot reach:- Harness report filename + keys. With installed
swebench>=3.0the report is written to<report_dir>/<model_name>.<run_id>.json(slashes in the model name become__) with top-level keysresolved_instances/total_instances/resolved_ids. The suite fails loudly on schema drift — a clean pass here pins the version as compatible. - Dataset auto-download via the HF mirror.
princeton-nlp/SWE-bench_Verifiedmust download throughhf_endpoint(hf-mirror.com), not hang on huggingface.co. Check the controller logs for the download lines. - Oracle → resolved == N. Gold-patch replay must resolve all 3 instances
(
swe-bench.resolved == 1.0). Anything less is an environment or harness problem, never “agent quality”. - Docker image footprint. The harness builds per-instance images (GiBs each).
docker system dfon the driver must show comfortable headroom on the 120 GiB disk. sys.executableresolution. The harness is spawned assys.executable -m swebench.harness.run_evaluation— on the controller this is the SYSTEM python3.11 that cloud-init installed (there is no venv). Confirmswebenchimports there: it is installed via the plan-driven extras (anysuite:task in the plan adds the[swebench]extra to the controller deps).- Placement stays local.
driver.placement == "local"on the driver host — the harness containers run where Docker runs; the suite hard-rejects anything else. - Container naming matches teardown. Harness containers are named
sweb.eval.<instance_id>.<run_id>; suite teardown removes containers viadocker ps --filter name=<run_id>. Verify the run_id appears in the live container names so cleanup catches exactly this run’s containers and nothing else. - Harness stderr surfacing. Force one failure (or inspect any real one): the error must carry the last 2000 chars of harness stderr — a real cause, not a bare exit code.
cn-region gotchas
- Docker Hub reachability is auto-handled. The driver detects it at boot and
routes accordingly (direct / ACR / fail-loud); there is no per-account mirror
address to configure. The Aliyun image accelerator (
<id>.mirror.aliyuncs.com) deliberately is NOT used — it has no OpenAPI, so a tool cannot obtain it; the account’s ACR endpoint (get_instance_endpoint) is used instead when needed. A mainland region also walls off GitHub (repo clones): if the driver reports a blocked strategy, run it in a region with direct egress or pre-stage images. - huggingface.co is unreliable. Keep
driver.hf_endpoint: https://hf-mirror.comfor the dataset auto-download. - NAT gateway + EIP bill per hour. Fetch, then tear down promptly — do not leave a finished campaign’s infra idling overnight.
- FC cold start is ~86 s. Amortize it by batching several tasks into one campaign instead of one campaign per task.
Expected outcomes
Reading the results
csbench fetch writes one JSON record per task (plus parquet sidecars where a task
produces series) into --dest. Then:
swe-bench.resolved and (llm mode) swe-bench.cost_per_resolved;
provenance.suite_id == "swe-bench"; provenance.scaffold as in the table above. The raw
record (suite:swe-bench.json) also carries the artifact manifest — predictions, results,
trajectory, and usage files with sha256 hashes.