fix: point swe-atlas-qna at a provisioned model and off the DinD SPOF#58
fix: point swe-atlas-qna at a provisioned model and off the DinD SPOF#58shehabyasser-scale wants to merge 15 commits into
Conversation
Bring the benchmark harness with each benchmark as a top-level sibling of gaia/ (ale-bench, officeqa, swe-atlas-qna, tau3), flattening the former candidates/ grouping.
The floor gates a ship on a validation comparison while gaia's reward is on the test partition (different distributions), so keep it opt-in / off. Now that the harbor default is false this is explicit-for-clarity.
Now that the sidecar image pre-warms the harness uv cache, the inner eval runs as the unprivileged harness user again, so the candidate harness cannot read the held-out records, budgets, or admin token.
Move each benchmark to harbor 0.20.0 in lockstep so the eval resolves: build.yaml harbor_requirement (the evaluator's --with harbor[modal]) and target/pyproject.toml (the candidate's own harbor dep) must match, else `uv run --project <target> --with harbor[modal]==0.20.0` is unsatisfiable. uv.lock regenerated with `uv lock` (not hand-edited). Covers gaia, officeqa, swe-atlas-qna, tau3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up to the pr2 rename: instructions, READMEs, and the ale-bench reference solution now teach `evals run/status/result/submit` and the .evals/tasks + .evals/results paths; baseline gitignores cover .evals/. Compiled trees are build outputs (not committed) and pick this up on rebuild. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All four vero-compiled benchmarks pass --ek app_name=harness-engineering-bench so their Modal sandboxes are grouped under one app instead of __harbor__. Docker inner environments ignore the kwarg.
The task's verifier runs inside the Modal task container and templates EVAL_BASE_URL from OPENAI_API_BASE, unreachable-from-Modal gateway URLs aside. Enable task_services_use_upstream so the judge gets the real upstream on OPENAI_*, and point the baseline agent at the metered gateway via VERO_AGENT_INFERENCE_* (falling back to OPENAI_* locally).
The Modal app-name commit added a second extra_harbor_args key; YAML last-key-wins silently dropped --no-force-build, which would have force-built the guard Dockerfile instead of pulling the prebuilt corpus image.
Killing the outer harbor process leaves the compose topology and any in-flight Modal sandboxes running (each layer's cleanup lives in the layer above). Cap sandbox idle lifetime at 1h via --ek, and add scripts/cleanup_orphans.sh to tear down task__* containers and terminate sandboxes in the dedicated Modal app.
WIP scaffold: a working agent + build/config skeleton for a SWE-bench-Pro optimization target, mirroring the gaia baseline layout. Two things are stubbed and must be completed before it runs: (1) the task_source digest in baseline/build.yaml is a clearly-marked placeholder that must be pinned to the real SWE-bench-Pro Harbor task package, and (2) the partitions/ files are empty placeholders that must be regenerated from the real task list via scripts/partition_swe_bench_pro.py. The agent wraps responses.create in a retry-with-backoff helper from the start (the unguarded call is what scored the gaia baseline 0.0). See harness-engineering-bench/swe-bench-pro/README.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
swe-atlas-qna has never produced a non-zero score. The 2026-07-25 run
(469 cases, all 0.0) has two independent causes, both visible in the
exported session:
1. The eval model does not exist. `artifacts/inference/usage.json` shows
the evaluation scope at 322 requests / 322 upstream_errors / 0 tokens,
and finalization at 79/79, while the producer scope ran 113 requests
with 0 errors. Every failing request returns:
404 {"code": "DeploymentNotFound", "message": "The API deployment
for this resource does not exist."}
Confirmed directly against the configured resource: of the whole
catalogue, only `gpt-5.3-codex` and `gpt-4o` answer; every
`gpt-5.4-*`, `gpt-5.2-*`, `gpt-5.1*`, `gpt-4.1*`, `o4-mini` and
`gpt-4o-mini` probe returns DeploymentNotFound. `/openai/v1/models`
lists 172 entries, but that is the catalogue, not the deployments.
So the 149 cases that survived infrastructure were scored 0.0 and
labelled `task_failure` when the truth is the agent had no model.
2. Sandbox loss. The other 320 of 469 cases are `transient_infra`:
NotFoundError x314, RuntimeError x102, AddTestsDirError x53. The
AddTestsDirError is harbor wrapping a failed `upload_dir` into a dead
sandbox (harbor/verifier/verifier.py:147-157), so it is the same event
as the NotFoundErrors seen from a different call site, not a separate
tests-directory bug. Harbor's DinD strategy runs each sandbox over one
host-networked gRPC stream and warns about it at startup.
Changes: pin `model` and `inference_gateway.evaluation.allowed_models` to
gpt-4o together (they must move in lockstep or the gateway 403s before the
upstream is reached), and add `--ek modal_vm_runtime=true` to the nested
eval's `extra_harbor_args`.
Note gpt-4o is a non-reasoning model, so this depends on the
`reasoning.effort` guard in #54 — without it every agent call now 400s
instead of 404s. Restore a reasoning model here once one is provisioned.
Refs #51.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| assert config.inference_gateway.evaluation.allowed_models == evaluation_models | ||
| # The gateway allow-list and the agent's model must move together, or every | ||
| # eval-scope request is rejected 403 before it reaches the upstream. | ||
| assert config.model == f"openai/{evaluation_models[0]}" |
There was a problem hiding this comment.
Provider-prefix assumption is implicit
f"openai/{evaluation_models[0]}" hardcodes the openai/ provider prefix. This works for every benchmark today, but the first entry that uses a different provider (e.g., anthropic/…) will appear to pass at the parametrize level — the evaluation_models list would still hold the bare model name — but the assertion would fail with a confusing mismatch. Consider storing the full prefixed form (e.g., "openai/gpt-4o") in evaluation_models and asserting config.model == evaluation_models[0] directly, or at least adding a comment that the openai/ prefix is intentional and must be kept in sync with how agents strip the prefix.
Prompt To Fix With AI
This is a comment left during a code review.
Path: vero/tests/test_v05_harbor_build.py
Line: 81
Comment:
**Provider-prefix assumption is implicit**
`f"openai/{evaluation_models[0]}"` hardcodes the `openai/` provider prefix. This works for every benchmark today, but the first entry that uses a different provider (e.g., `anthropic/…`) will appear to pass at the parametrize level — the `evaluation_models` list would still hold the bare model name — but the assertion would fail with a confusing mismatch. Consider storing the full prefixed form (e.g., `"openai/gpt-4o"`) in `evaluation_models` and asserting `config.model == evaluation_models[0]` directly, or at least adding a comment that the `openai/` prefix is intentional and must be kept in sync with how agents strip the prefix.
How can I resolve this? If you propose a fix, please make it concise.|
Correcting two things in the description above, and adding the control run I should have looked at first. The per-case terminal exception census (exact, one row per case, 469 total)
So my "NotFoundError ×314" above double-counted across categories, and — more importantly — I framed the infrastructure half as the DinD gRPC SPOF. That framing is wrong for this layer. The nested eval reports The control run that settles itGAIA, same laptop, same day, same Modal account, same shared Modal-in-Modal nesting is therefore not broken, and neither is the shared app or the nested strategy. Whatever is killing swe-atlas-qna's sandboxes is specific to that benchmark's task environment — the prime suspect being its prebuilt What this means for this PR
Same run also gives #54 a proper before-measurement: that GAIA run used gpt-4o without the guard and ate 715 HTTP 400s (514 evaluation + 201 finalization) out of 2376 gateway calls — ~30% of its inference wasted on |
The live run says the flag does not help. With it set, swe-atlas-qna still lost 456 of 520 cases to transient_infra (88%), against 320 of 469 (68%) without it. Shipping a config value that a run contradicts is worse than shipping nothing, so it comes out. Two things also became clear about why it was never a good bet: - The nested eval reports `Selected strategy: _ModalDirect` on every trial and emits no DinD host-networking warning. DinD is the outer trial's strategy. The reasoning that motivated this flag applies to a layer this config does not control. - GAIA got 524 of 528 cases through on the same laptop, day, Modal account, shared app and nested strategy. The nesting is not what is broken. The model change stays, and it is proven: eval-scope upstream_errors went from 322/322 to 0/284 with real tokens flowing for the first time. Refs #51. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Live result: model fix proven, infrastructure fix disproven and removed
The model half works
Full request-log census: For the first time this benchmark produced informative samples: 64 cases reached the judge and were scored, against 0 before. The infrastructure half does not, so I removed itI said above that I would drop
The apparent worsening is mostly not a regression — previously 149 cases died early on the model 404 and never got far enough to hit the sandbox problem. Now they proceed and hit it. The honest reading is that essentially every case still dies to infrastructure, and the model fix only changed where. Latest commit removes the flag. This PR is now purely the model pin plus the test that keeps What remains
The open cause is the one filed on #51: |
| model: openai/gpt-4o | ||
| environment_name: modal | ||
| # inner eval sandboxes share a dedicated Modal app instead of the __harbor__ default | ||
| extra_harbor_args: ["--ek", "app_name=harness-engineering-bench", "--ek", "sandbox_idle_timeout_secs=3600"] |
There was a problem hiding this comment.
Claimed DinD fix absent from the diff
The PR description explicitly lists Change 2 as "--ek modal_vm_runtime=true appended to the nested eval's extra_harbor_args", and the PR title reads "off the DinD SPOF". However, extra_harbor_args is unchanged in this diff — it remains ["--ek", "app_name=harness-engineering-bench", "--ek", "sandbox_idle_timeout_secs=3600"]. Cause 2 (sandbox loss on 68% of cases) is therefore not addressed by this PR, even though both the title and description claim it is.
Prompt To Fix With AI
This is a comment left during a code review.
Path: harness-engineering-bench/swe-atlas-qna/baseline/build.yaml
Line: 56
Comment:
**Claimed DinD fix absent from the diff**
The PR description explicitly lists Change 2 as "`--ek modal_vm_runtime=true` appended to the nested eval's `extra_harbor_args`", and the PR title reads "off the DinD SPOF". However, `extra_harbor_args` is unchanged in this diff — it remains `["--ek", "app_name=harness-engineering-bench", "--ek", "sandbox_idle_timeout_secs=3600"]`. Cause 2 (sandbox loss on 68% of cases) is therefore not addressed by this PR, even though both the title and description claim it is.
How can I resolve this? If you propose a fix, please make it concise.ccc7d07 to
ec708e9
Compare
|
Withdrawing this PR's diagnosis. What I claimed: swe-atlas-qna's 456/520 infrastructure losses came from the prebuilt What it actually was, per That explains my census better than my own hypothesis did:
And the decisive evidence is that no registry secret was ever added, yet The model half of this PR is superseded too: Recommend closing this as superseded. Nothing in it survives. The One correction worth carrying forward rather than losing: my |
|
Closing as superseded by |
Refs #51.
swe-atlas-qna has never produced a non-zero score. The 2026-07-25 run scored 0.0 on all 469 cases. There are two independent causes, and the one everybody was chasing is the smaller of the two.
Cause 1: the eval model is not deployed (the one nobody was looking at)
From that run's exported
session/artifacts/inference/usage.json:gpt-5.3-codex)gpt-5.4-mini-2026-03-17)gpt-5.4-mini-2026-03-17)Every one of those 401 failures is the same body:
{"error": {"type": "invalid_request_error", "code": "DeploymentNotFound", "message": "The API deployment for this resource does not exist."}}Confirmed directly against the configured Azure resource — of the entire catalogue, only two deployments answer:
GET /openai/v1/modelsreturns 172 entries includinggpt-5.4-mini-2026-03-17, which is what made this invisible: that endpoint lists the model catalogue, not the resource's deployments.So the candidate agent had no working model. The 149 cases that survived infrastructure were duly scored 0.0 and labelled
task_failure— the harness reporting "the candidate failed the task" when the truth was "there was no model to call".Cause 2: sandbox loss (the 68% everyone was looking at)
The other 320 of 469 cases are
transient_infra:NotFoundError×314,RuntimeError×102,AddTestsDirError×53.AddTestsDirErroris not a separate tests-directory bug.harbor/verifier/verifier.py:147-157wrapsenvironment.upload_dir()in a bare try/except and re-raises anything asAddTestsDirError("Failed to add tests directory to environment."). It is the same dead-sandbox event as theNotFoundErrors, observed from a different call site. Ranking them as separate causes in #51 (36% / 32% / 17%) overcounted the problem's dimensionality.Harbor's DinD strategy runs each sandbox over a single host-networked gRPC stream and warns about it at startup. The same SPOF took out the tau3 optimizer trial (#55).
Changes
model: openai/gpt-4oandinference_gateway.evaluation.allowed_models: [gpt-4o], moved together — the allow-list is enforced before the upstream, so a mismatch turns a 404 into a 403 and nothing gets better. The agent strips the provider prefix (atlas_agent/agent.py:80), so the bare form is what the gateway sees.--ek modal_vm_runtime=trueappended to the nested eval'sextra_harbor_args.modelandallowed_modelsagree, so they cannot drift apart again.Dependency
gpt-4o is a non-reasoning model, so this is only safe on top of #54. Without that guard, every agent call goes from 404 DeploymentNotFound to 400
unsupported_parameter: reasoning.effort. #54 stops being a nice-to-have and becomes load-bearing.Wider blast radius (not fixed here)
gaia,officeqaandtau3all pointmodelandevaluation.allowed_modelsat the same undeployedgpt-5.4-mini-2026-03-17; tau3 additionally setsTAU2_USER_MODELandTAU2_NL_ASSERTIONS_MODELto it. All three are therefore silently producing zeros for the same reason. Onlyswe-bench-prois already on gpt-4o. I have not touched them here because I can only prove one benchmark per live run, and a config change I have not run is exactly the kind of thing that produced this bug. The right permanent fix is provisioning the intended reasoning deployment rather than downgrading four benchmarks to gpt-4o.Verification
A combined live run (#51 + #52 + #53 + #54) is in flight against the same Modal conditions as the failing run. Predicted signal change: eval-scope
upstream_errorsdrops from 322/322 to ~0,transient_infracase count drops well below 320/469, and at least one case scores > 0. Results posted here before merge.Greptile Summary
This PR fixes a silent zero-score bug in swe-atlas-qna caused by the evaluation model (
gpt-5.4-mini-2026-03-17) not being provisioned on the configured Azure resource, swapping it forgpt-4oand keeping the inference-gateway allow-list in lockstep.build.yaml:modelchanged toopenai/gpt-4o;inference_gateway.evaluation.allowed_modelsupdated to[gpt-4o]with a comment mandating they move together.test_v05_harbor_build.py: the canonical-benchmark test is parametrized with per-benchmarkevaluation_modelsand gains a new assertion thatconfig.model == f\"openai/{evaluation_models[0]}\", preventing future model/allow-list drift.--ek modal_vm_runtime=truetoextra_harbor_argsto address the DinD SPOF (Cause 2, sandbox loss on 68% of cases) \u2014 is not present in the actual diff despite being listed in the PR description and title.Confidence Score: 4/5
Safe to merge for the model-provisioning fix, but the DinD SPOF described in the PR title and body is not addressed by the actual diff.
The model swap from an unprovisioned deployment to gpt-4o is correct and the test guard against future drift is well-designed. However, the PR description explicitly enumerates adding --ek modal_vm_runtime=true to extra_harbor_args as a second required change (fixing the 68% sandbox-loss rate), and that change is entirely absent from the diff. Merging as-is leaves Cause 2 unresolved despite the title claiming otherwise.
Files Needing Attention: harness-engineering-bench/swe-atlas-qna/baseline/build.yaml — the extra_harbor_args line needs the modal_vm_runtime flag that the PR description says was added.
Important Files Changed
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "fix: drop the modal_vm_runtime guess, ke..." | Re-trigger Greptile