Skip to content

[Ready for Review] Adapter: SWE-Bench-ProMax - #125

Open
YerbaPage wants to merge 15 commits into
harbor-framework:mainfrom
YerbaPage:swebench-promax-adapter
Open

YerbaPage wants to merge 15 commits into
harbor-framework:mainfrom
YerbaPage:swebench-promax-adapter

Conversation

@YerbaPage

@YerbaPage YerbaPage commented Nov 20, 2026 •

Copy link
Copy Markdown

Adapter for SWE-Bench-ProMax (COLM 2026 paper): 170 large-scale, cross-file code-refactoring tasks across C, C++, Go, Java, Python, Rust and TypeScript.

Claim confirmed by @XiangningLin.

Implementation

Validation

Harbor 0.26.0, local Docker, separate verifier, published digest-pinned images:

  • Oracle: 170/170 tasks with reward 1.0; zero exceptions.
  • NOP: 170/170 tasks with reward 0.0; zero exceptions.

Separate-verifier validation: On mikf__gallery-dl-7872, the reference patch scores 1.0, while an unrelated edit and no changes both score 0.0. An agent-container sitecustomize.py override that makes Python exit successfully also scores 0.0 with the separate verifier.

Oracle / NOP screenshots

Oracle: 170/170, zero exceptions

NOP: 170/170 with reward 0, zero exceptions

Parity

28 tasks (4 per language, fixed seed), mini-swe-agent@2.4.6 + deepseek-v4.1-flash. The original side uses the benchmark's runner (src/inference/run_mini_swe_agent.py) and grader (src/evaluation/test_run.py).

Resolved rate (%), mean ± SEM over three runs:

Side Run 1 Run 2 Run 3 Mean ± SEM
Original 64.3 57.1 53.6 58.3 ± 3.1
Harbor 60.7 50.0 50.0 53.6 ± 3.6

The run ranges overlap.

Parity artifacts: the shared repository is over the Hub's file-count limit, so the raw runs are hosted in our HF repository, linked from parity-experiments#301.

Requested dataset tags: v1.0 (full set), parity (agreed subset).

AI assistance: Claude Code and Codex.

Adapter for SWE-Bench-ProMax (COLM 2026): 170 large-scale, cross-file code refactoring tasks in
C, C++, Go, Java, Python, Rust and TypeScript.

- Runs each instance's published image directly ([environment].docker_image); the official eval
  script is copied verbatim into tests/eval.sh and tests/test.sh reproduces the original pass rule,
  including the retry on known transient failures. Verifier runs with no network.
- Oracle applies the reference patch the way the original harness does.
- Oracle validation: reward 1.0 on 170/170 tasks; nop: 0.0 on 170/170.
- Parity: pending (48-task subset via --split parity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
@YerbaPage
YerbaPage force-pushed the swebench-promax-adapter branch from c009bf2 to fb4f668 Compare November 20, 2026 23:28
… images; README run order

- [task].name is now registry-safe (lowercase; 13 instance ids had uppercase letters).
- run_swebench_promax.yaml: force_build false, so the published images are used as-is.
- README: list the registry method first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
@YerbaPage YerbaPage changed the title [WIP] Adapter: swebench_promax [WIP] Adapter: SWE-Bench-ProMax Nov 21, 2026
YerbaPage and others added 2 commits November 21, 2026 01:27
…e parity subset

- README / metadata: oracle 1.0 and nop 0.0 on all 170 tasks, one job per agent (-n 4).
- Parity subset: Go is no longer left out; 8 tasks per language across all 7 languages (56).
- README: drop the Go-specific concurrency note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
- [verifier] environment_mode = "separate": the agent's container is not reused for grading.
- [[verifier.collect]] exports everything the agent changed in /testbed relative to the base commit
  (new files and commits included) to /logs/artifacts/model.patch.
- tests/test.sh applies that patch in the fresh container exactly like the original harness
  (`git apply -v`, falling back to `patch -p1`; failure scores 0) before running the eval script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
@YerbaPage
YerbaPage marked this pull request as ready for review November 21, 2026 04:37
b6f4fd6 updates eval.json (21 scripts fail when their build step fails);
swe-bench-promax.json is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
@XiangningLin

Copy link
Copy Markdown
Collaborator

/review-adapter

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Structural validation of commit 587df94 at 2026-11-24 22:01:02 UTC

Adapter contract v1 (docs/adapters.mdx).

✅ Adapter Validation: swebench_promax

✅ 31 passed | ❌ 0 errors | ⚠️ 0 warnings

Passed checks (31)
  • ✅ README.md exists
  • ✅ parity_experiment.json exists
  • ✅ adapter_metadata.json exists
  • ✅ src/swebench_promax/ package exists
  • ✅ src/swebench_promax/adapter.py exists
  • ✅ src/swebench_promax/main.py exists
  • ✅ src/swebench_promax/task-template/ directory exists
  • ✅ src/swebench_promax/task-template/task.toml exists
  • ✅ src/swebench_promax/task-template/instruction.md exists
  • ✅ src/swebench_promax/task-template/environment/Dockerfile exists
  • ✅ src/swebench_promax/task-template/tests/test.sh exists
  • ✅ src/swebench_promax/task-template/solution/solve.sh exists
  • ✅ Template [task].name present
  • ✅ Template [task].authors present
  • ✅ parity_experiment.json is valid JSON array
  • ✅ Parity PR links are non-empty with valid URLs
  • ✅ adapter_metadata.json is valid JSON array
  • ✅ README section Overview present
  • ✅ README section What is present
  • ✅ README section Adapter Features present
  • ✅ README section Generated Task Structure present
  • ✅ README section Run Evaluation present
  • ✅ README section Usage present
  • ✅ README section Parity present
  • ✅ README section Notes & Caveats present
  • ✅ README section Installation / Prerequisites present
  • ✅ README section Citation present
  • ✅ README section Authors & Contributions present
  • ✅ Parity table column count correct
  • ✅ test.sh writes to reward path
  • ✅ No canary strings found

@XiangningLin

Copy link
Copy Markdown
Collaborator

@YerbaPage parity plan looks good, but what model you propose to use?

YerbaPage commented Nov 21, 2026 •

Copy link
Copy Markdown
Author

Thanks for triggering the review, @XiangningLin! I propose:

  • Agent/model: mini-swe-agent@2.4.6 + deepseek-v4.1-flash through the parity gateway, following the setup used in [Ready for Review] Adapter: gitgoodbench #78.
  • Tasks: 28 tasks—four randomly sampled per language with a fixed seed, covering all seven languages. Which size would you recommend?
  • Runs: three per side, with the same agent, model, images, instructions and limits on both sides.

YerbaPage and others added 6 commits November 21, 2026 19:59
…reed model

- make_parity_subset.py defaults to 4 per language (same seed); parity_task_ids.txt regenerated.
- README / metadata: 28 tasks (16.5%), mini-swe-agent@2.4.6 with deepseek-v4.1-flash
  through the Harbor parity API, as agreed with the Harbor team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
ProMax issues are recent and their fixes are public upstream. Like the ProgramBench adapter, the agent
phase uses network_mode = "allowlist" with api.openai.com / api.anthropic.com; other endpoints are added
at run time with --allow-agent-host. Agent setup keeps network. README documents the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
…ttings

Default agent timeout 7200 s (large C/C++ and Rust builds need it). README: parity uses mini-swe-agent's
mini config with a 250-step limit on both sides; original side runs the benchmark's own agent runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
- parity_experiment.json, README parity table and adapter_metadata: mini-swe-agent@2.4.6 +
  deepseek-v4.1-flash on 28 tasks, 3 runs per side (original 56.0 ± 2.4, Harbor 59.5 ± 1.2).
- Tasks pin docker_image to the published <instance_id>-harbor-adapted digests (image_digests.json);
  oracle 170/170 and nop 0/170 with these images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
YerbaPage and others added 2 commits November 23, 2026 23:59
@YerbaPage YerbaPage changed the title [WIP] Adapter: SWE-Bench-ProMax [Ready for Review] Adapter: SWE-Bench-ProMax Nov 24, 2026
@YerbaPage

YerbaPage commented Nov 24, 2026 •

Copy link
Copy Markdown
Author

@XiangningLin Thanks so much for your guidance! We've completed parity with mini-swe-agent@2.4.6 + deepseek-v4.1-flash on 28 tasks, with 3 runs per side.

Resolved rate (%):

Side Run 1 Run 2 Run 3 Mean ± SEM
Original 64.3 57.1 53.6 58.3 ± 3.1
Harbor 60.7 50.0 50.0 53.6 ± 3.6

The README, metadata and parity_experiment.json are updated, and the raw runs are available via parity-experiments#301.

When you have a moment, could you please rerun /review-adapter on the latest revision and take a look? Thanks again for all your help!

@XiangningLin

Copy link
Copy Markdown
Collaborator

/review-adapter

@github-actions

Copy link
Copy Markdown
Contributor

Adapter review of commit 587df94 (applies only to this revision).

swebench_promax: review of PR #125

Verdict: changes requested. I found no fidelity or grading-integrity defect in the code. The adapter is well built, and its grading logic matches the upstream harness. The PR is held back by gaps in the parity evidence and provenance (Findings 1–2), not by the adapter code.

  • Adapter commit reviewed: 587df942924461ac6013a46947cc7bc355f94d10
  • Contract: Adapter contract v1, revision 543861e1ad298c5d94f2480e9cbad74587041864
  • Evidence used: static reading of reviewed-pr/src/swebench_promax/; the upstream test_run.py on GitHub (main, unpinned); dataset PR harbor-datasets#300 (open, 170 tasks); HF parity-experiments discussion #301 (no files pushed); the mirror dataset swe-bench-promax/SWE-Bench-ProMax-harbor-parity (README only).
  • Not done: no code was run, nothing was independently reproduced, and per-task result files were not inspected.
  • Earlier reviews: no review history was available, so I can't say whether earlier findings exist or were resolved.

Provenance

Item Recorded value Status
Upstream data HF swe-bench-promax/SWE-Bench-ProMax at b6f4fd65… (adapter.py#L19-L20) Pinned
Images 170 digests (adapter.py#L22-L24, image_digests.json) Pinned
Upstream harness / runner code https://github.com/key4127/SWE-Bench-ProMax, no commit (parity_experiment.json#L11) Unpinned
Harbor runtime "Harbor 0.26.0" for the oracle run only (README#L178); nothing recorded for parity Unverified for parity
Agent mini-swe-agent@2.4.6, default mini config Recorded; whether both sides used the same config is unverified
Model deepseek-v4.1-flash, behind an unnamed OpenAI-compatible endpoint (parity_experiment.json#L5) No dated ID, no provider

Parity statistics (I recomputed these by hand from the raw run arrays)

Side Runs Mean ± sample SEM Range
Original 53.6, 60.7, 53.6 55.97 ± 2.37 [53.6, 60.7]
Harbor 60.7, 57.1, 60.7 59.50 ± 1.20 [57.1, 60.7]
  • The reported strings (56.0 ± 2.4, 59.5 ± 1.2) match the recomputed values.
  • The two ranges overlap, so ADP-PARITY is met numerically.
  • Each run score corresponds to 15, 16 or 17 tasks resolved out of 28.
  • Coverage is 28 tasks × 3 runs per side. The 28 tasks are a seeded, pre-registered draw of 4 per language (make_parity_subset.py#L42-L48).
  • I did not inspect which tasks each side solved and the other didn't.

Blockers

1. Parity runs mixed two time limits, and there is no attempt ledger (ADP-PARITY; Step 5, checklist #6 and debug step 6).

  • What happened (parity_experiment.json#L10, README#L128-L130):
    • Trials started with a 1 h limit.
    • Nine tasks hit it. They were rerun at 2 h on both sides, and the 2 h results replaced the 1 h results in every run.
    • So each reported run combines 19 tasks at 1 h with 9 tasks at 2 h, and the 9 were chosen because of how they turned out (they timed out).
  • What is missing: the HF mirror README does not say:
    • which 9 tasks were rerun;
    • which side, or which run, timed out;
    • what the 1 h results were before replacement.
  • Reproduction doesn't match the recorded runs: the reproduction commands use 7200 s for every task (README#L143-L151; the Harbor default is also 7200 s, main.py#L23). That does not reproduce the hybrid protocol the scores came from.
  • Consequence: the comparison is probably symmetric, but nobody can audit that, and the reported scores can't be reproduced as recorded.
  • Smallest fix:
    1. Publish a ledger listing, for each task, run and side: the time limit, the original outcome, whether it was replaced, and the artifact path.
    2. Say explicitly in the notes that the cohort uses mixed limits.
    3. Either give reproduction commands for that cohort, or rerun all 28 tasks at 2 h on both sides.

2. Required provenance is missing, and the parity artifacts are not in the required repository (Step 5 checklist #1–#5; Step 7; ADP-README).

  • Provenance: the following aren't recorded:
    • the upstream repo commit for run_mini_swe_agent.py and test_run.py;
    • the Harbor commit/version used for parity;
    • the model provider/endpoint and a dated model ID.
  • Artifacts: HF parity-experiments discussion #301 currently contains no files (+0/−0). The artifacts live only in a third-party mirror (SWE-Bench-ProMax-harbor-parity, commit 8d29eba2), which is linked through an unpinned URL (README#L131-L135).
  • Fix:
    • Record the SHAs and the endpoint in notes.
    • Pin the mirror's commit in the README and JSON.
    • Push the files to #301, or get the team to accept the mirror.

Other findings (fix them or document them)

3. Missing patches are treated as empty and scored 0 instead of being reported as an infrastructure failure (test.sh#L31-L32, task.toml#L48-L50).

  • What happens: the collect step only prints its rc and never fails. If it fails or times out (300 s), model.patch ends up absent or truncated, and the verifier gives reward 0 (PROMAX_NO_PATCH, or APPLY_FAILED).

  • Why it matters: a missing result gets folded into the scored denominator as a 0.

  • Fix: make collection failures visible. Options:

    • write a sentinel file on a non-zero rc;
    • have test.sh exit non-zero with no reward when model.patch is missing.

    Also report the count of PROMAX_NO_PATCH cases in the parity ledger.

4. Isolation depends on recent Harbor features, but no minimum version is documented (ADP-README; task.toml#L35-L43, README#L195-L200).

  • These settings require newer Harbor: the agent allowlist, environment_mode = "separate" and [[verifier.collect]].
  • On a Harbor version that ignores them, the agent could fetch the public upstream fix, and grading would run in the agent's own container. Whether older Harbor ignores or rejects these keys is unverified.
  • The documented compatibility baseline is 99218a4.
  • Fix: state in Installation the minimum Harbor version that is required (≥0.26.0, or whatever is correct).

5. The patch export can't see some changes (task.toml#L45-L49, README#L168-L170, README#L189-L191).

  • The export skips files marked skip-worktree and paths listed in .git/info/exclude. Agent edits to those paths are silently dropped.
  • The README discloses this only for two Bazel images. One of them, bazel-c_2be8c98, is in the parity subset.
  • It is unverified whether the upstream runner builds the patch the same way. If it does, the effect is the same on both sides.
  • Fix:
    • List every image that has skip-worktree entries, or that excludes directory-level patterns.
    • Confirm that upstream builds the patch the same way.

6. Minor: how the parity subset is located (main.py#L28-L31).

  • --split parity finds parity_task_ids.txt through parents[2]. That only works with an editable/source install.
  • It also silently overrides --task-ids.

Disclosed limitations (acceptable as documented)

  • Gold patch not required to pass: upstream counts a model patch as resolved only if the gold patch also passes on the same image. The adapter drops that rule and justifies it with reference patches passing 170/170 (README#L36-L38).
  • Retries run in place: flaky-test retries rerun in the same container rather than a fresh one (test.sh#L45-L70).
  • Grading checks (verified against upstream test_run.py, unpinned): these all match upstream:
    • OMNIGRIL_TEST_PATCH_APPLY_FAILED / OMNIGRIL_EXIT_CODE precedence;
    • eval timeout of 2400 s and apply timeout of 60 s;
    • retry patterns, and the retry count of 2;
    • the apply commands.
  • Patch can affect its own evaluation: the patched code can influence how evaluation runs (e.g. via conftest.py). Upstream has the same exposure, and the README discloses it (README#L181-L186).

Unverified

  • Git history cleanup: the images are said to have refs beyond the base commit removed and unreachable objects pruned. Reflog, stash and packed-refs were not inspected. A nop score of 0/170 does not show that history is clean.
  • Instruction wording: the claim that the instruction matches the upstream runner word for word (instruction.md) was not checked.
  • Oracle and nop results: 170/170 is submitted evidence only; I didn't inspect the job files.
  • Per-task disagreement: not analysed.

Coverage

Dimension Status Evidence Gaps
Harbor standards Mostly met. ADP-CLI, ADP-AUTHORS, ADP-SCRIPTS, ADP-STATS and ADP-COST pass. ADP-README is short on provenance and the minimum Harbor version (F2, F4). pyproject, main.py, task.toml, README sections all present and in order Step 7 upload (F2)
Upstream fidelity Grading checked against upstream; some issues found (F5) test.sh vs test_run.py Upstream SHA and runner config not pinned
Generation Assessed by reading the code adapter.py#L119-L155; placeholders filled; 170 digests No generated output checked
Agent execution Assessed; issues found (F1, F4) task.toml network/collect settings Runtime behaviour unverified
Grading integrity Assessed; issues found (F3, F5) separate no-network verifier, .git/ patch rejected, reward reset at start Git history cleanup unverified
Parity Statistics recomputed; issues found (F1, F2) parity_experiment.json, HF README Ledger and per-task results missing

YerbaPage and others added 2 commits November 25, 2026 20:41
- record provenance: upstream runner/grader commit, Harbor 0.26.0, model source; pin the parity artifact repo commit
- a failed patch collection now ends the verifier without a reward (infrastructure error) instead of scoring 0
- README: minimum Harbor version; skip-worktree / info/exclude audit of all 170 images; same patch command as upstream
- --split parity reads the id list shipped inside the package and rejects --task-ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pu3y6q5zkN1rRseXqkoKMi
@YerbaPage

YerbaPage commented Nov 25, 2026 •

Copy link
Copy Markdown
Author

Thanks for the review. Pushed 472e467:

  • F1 (time limits): parity is now a single setup: 2 h agent limit per trial on both sides, 28 tasks, 3 runs per side. Original 64.3 / 57.1 / 53.6 (58.3 ± 3.1), Harbor 60.7 / 50.0 / 50.0 (53.6 ± 3.6); the run ranges overlap. parity_experiment.json, the README and the parity artifacts are updated.
  • F2: the original runner and grader are at key4127/SWE-Bench-ProMax@70b684dc, Harbor is 0.26.0, and the model is deepseek-v4.1-flash (DeepSeek-V4.1-Flash-1017) from the official DeepSeek API. The parity artifact links are pinned to commit 2b35a078. #301 has no files because the parity-experiments repo is over the Hub's file limit, so the files are in our own HF repo.
  • F3: the collect step now writes model.patch only if git diff succeeds, and test.sh exits without a reward when it is missing. A failed collection therefore shows up as an error, not a 0. harbor-datasets#300 is regenerated accordingly.
  • F4: the README states Harbor ≥ 0.26.0.
  • F5: the patch is built with the same command as the upstream runner, so both sides see the same files. The README lists the image-side exclusions.
  • F6: the parity id list now ships inside the package, and --split parity rejects --task-ids.

@YerbaPage

Copy link
Copy Markdown
Author

@XiangningLin Really appreciate the thorough review, it helped improve both the adapter and the parity documentation.

The latest revision (472e467) addresses all the points above. When you have a moment, could you please take another look or run /review-adapter again? Thanks so much for your help!

Sign up for free to 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.

2 participants