8000 DeepSWE through Harbor: the hub's 113 tasks, graded as DeepSWE grades them by illusoryw · Pull Request #139 · Infini-AI-Lab/hermit · GitHub
[go: up one dir, main page]

Skip to content

DeepSWE through Harbor: the hub's 113 tasks, graded as DeepSWE grades them - #139

Open
illusoryw wants to merge 1 commit into
Infini-AI-Lab:mainfrom
illusoryw:feat/deepswe
Open

illusoryw wants to merge 1 commit into
Infini-AI-Lab:mainfrom
illusoryw:feat/deepswe

Conversation

@illusoryw
@illusoryw illusoryw commented Dec 1, 2026 •
Copy link
Copy Markdown
Contributor

Change

Adds examples/deepswe/: DeepSWE v1.1 by Datacurve, 113 original,
long-horizon engineering tasks on 91 open-source repositories (tasks in Python 34, TypeScript 35, Go 34, JavaScript 5,
Rust 5), from the Harbor hub's datacurve/deep-swe-1-1
at revision 1, each task in its own Harbor environment. It is packaged as
swebench_verified/ is: a utils/benchmark.yaml whose dataset: block
(ref: datacurve/deep-swe-1-1@1) python -m hermit.harbor.dataset prepare reads, the committed dataset.lock and
image_sizes.json, splits, Codex and Claude Code baseline configs, task-info and README. DeepSWE is held-out
evaluation data, so nothing trains: like SWE-bench Verified, the protocol is a transfer, a frozen adapter evolved
elsewhere (Terminal-Bench 2.0's final AHE adapter) tested against the same acting agent with no adapter.

DeepSWE grades the agent's commits, as published, which Harbor 0.25.0 runs as it is: the instruction asks the agent to
work on a new branch and commit everything; once the agent stopped, a [[verifier.collect]] command writes git diff --binary <base commit> HEAD as /logs/artifacts/model.patch; the verifier runs in a container of its own
(environment_mode = "separate", the task's verifier image with the hidden tests, no network), applies the patch to the
pristine repository and runs the tests. Two things are the example's own:

  • utils/patches.py (the block's dataset.patch, recorded in the lock): each collect command gets a pathspec that
    leaves out what Hermit's deployment of an adapter writes at the repository's root (hermit/, AGENTS.md,
    CLAUDE.md, .codex/, .claude/, .mcp.json, .hermit-deploy.json, the hooks' .hermit-hooks/,
    tool-calls.jsonl); a test deploys AHE's template as a run does and fails if any entry it writes there is not
    left out. An agent that commits everything, as the
    instruction asks, commits those too, and an arm with an adapter would be graded on a tree holding them and an arm
    with none without them. No task's reference solution or test patch touches any of them (checked on all 113).
  • utils/judge.py (the configs' judge, as AlgoTune's are): DeepSWE's test.sh writes reward -1 when its grader
    crashed before grading any test (its "infrastructure error"). The environment judge would score that as the agent's
    -1, pulling every mean down. The judge records it as no score (Unscored), which python -m hermit.harbor.report
    counts as infra, apart from the trials its pass@1 is over. The run does not retry it by itself (the README says how
    to run it again).

No core code changes. tests/core/test_harbor_examples.py adds deepswe to its Harbor benchmarks.

Docs: the example's README.md and utils/task-info/README.md, examples/README.md (Harbor benchmarks, the hand-off
table, the disk note, the sign-in's network: this task set's agents reach only the model's hosts), docs/framework/task.md (the example list), CHANGELOG.md (Added).

Differences from DeepSWE's own runs:

DeepSWE Here
Runner Pier (Harbor-compatible) Harbor 0.25.0, local Docker
Agents the reported models' harnesses Hermit's Codex or Claude Code agent
Grading the agent's commits, in a separate verifier container the same, without Hermit's deployment files
A grader crash (-1) an infrastructure error no score, counted as infra
Attempts pass@1 averaged over several attempts per task (the count differs between reports) once per task (eval.repeats to match a report)

Validation

On 1f99d91 (this PR's commit), Python 3.12, Linux, Docker, Harbor 0.25.0:

  • python -m pytest --changed --base main, with every dependency group installed (pip install -e '.[test]' --group all; the core group, with every example's own tests): 1,427 passed, 116 skipped, 6 failed. The same 6 fail the same
    way on main in this environment: test_codex_in_a_tasks_environment_keeps_the_runners_256k_instruction_allowance
    (the task environment's own Python lacks jsonschema), test_round_6_hermit_side, and the sandbox's four venv tests
    (test_a_granted_venvs_*, test_a_venv_under_*, test_a_linked_venv_*), whose interpreter path differs in this test
    environment's venv.

  • python -m pytest examples/deepswe --durations=0: 10 passed in 1.28 s (the slowest, the deployment guard, deploys
    AHE's template twice). With the prepared tasks moved away (as on CI), the example's tests and
    tests/core/test_harbor_examples.py: 108 passed.

  • bash docs/build.sh: built, no warnings. pre-commit run --all-files: all hooks passed.

  • The offline walkthrough of CONTRIBUTING.md: hermit check exit 0, every item [ok] (one warning, the
    walkthrough config's best_effort sandbox); hermit train exit 0, completed all epochs, 2 steps; hermit eval --adapter final exit 0, mean_score 1.0 on 2 tasks, 0 errors.

  • hermit check --no-probe on both baseline configs: only what every Harbor baseline reports (the eval-only
    placeholder Evolver, no hard budget); the Claude Code config also reports that CLAUDE_CODE_OAUTH_TOKEN is not set
    here.

  • python -m hermit.harbor.dataset prepare examples/deepswe/utils/benchmark.yaml: 113 rows, matching the lock,
    image_sizes.json for all 113 images (about 111 GB compressed).

  • Harbor's oracle (the reference solution, committed) and nop on the patched smoke tasks (harbor run -a oracle /
    -a nop), the reward and the tests the change must make pass (f2p) and keep passing (p2p):

    Task Reference solution No change
    mashumaro-flattened-dataclass-fields (Python) 1 (f2p 66 / 66) 0 (f2p 0 / 66; p2p 30,014 / 30,014)
    tengo-callable-instance-isolation (Go) 1 (f2p 23 / 23) 0 (f2p 0 / 23; p2p 122 / 122)
  • Through Hermit's own Harbor environment (hermit.environment.harbor; a scripted agent's commands in the task's
    container), with the files Hermit's deployment of an adapter writes left at the repository's root (hermit/ahe/,
    AGENTS.md, .codex/config.toml, tool-calls.jsonl, .hermit-deploy.json naming a workspace path,
    .hermit-hooks/hook-calls.jsonl) and git add -A && git commit of everything: the reference solution on
    tengo-callable-instance-isolation scored 1, the graded model.patch holding the solution's four files (call.go,
    objects.go, script.go, vm.go) alone; on mashumaro-flattened-dataclass-fields the deployment alone scored 0,
    with an empty model.patch.

  • Smoke, hermit eval --config examples/deepswe/baseline/codex.yaml --adapter none data.test=../utils/splits/smoke.txt
    (config): mean_score 0,
    errors 0, 688 s, 0 of 2 resolved (python -m hermit.harbor.report: 2 scored, 0 infra, 0 failed). Codex committed
    its work on a branch of its own as the instruction asks, its patch applied in the verifier's container, and DeepSWE's all-or-nothing
    reward scores each 0. The records (baseline/runs/<run>/eval/none/, git-ignored as
    CONTRIBUTING.md asks), one row each:

    Task Status Reward f2p passed p2p passed Tokens Agent's time Trial (jobs_dir)
    mashumaro-flattened-dataclass-fields ok 0 66 / 66 30,013 / 30,014 1,386k 316 s mashumaro-flattened-dataclass-fields_0__777e3c19
    tengo-callable-instance-isolation ok 0 4 / 23 122 / 122 3,395k 526 s tengo-callable-instance-isolation_0__a6f56598
    The smoke's records: summary.json and each record of results.jsonl (without its output, the agent's final message, and with the judge's feedback cut to its first line)
    {"adapter": "none", "commit": null, "tasks": 2, "repeats": 1, "mean_score": 0.0, "solved_once": 0.0, "cost_usd": null, "unknown_cost_tasks": 2, "errors": 0, "wall_s": 687.7}
    {"id": "mashumaro-flattened-dataclass-fields#0", "status": "ok", "error": null, "judge": {"score": 0.0, "feedback": "reward 0", "extra": {"status": "ok", "passed": false, "rewards": {"reward": 0, "f2p_total": 66, "f2p_passed": 66, "p2p_total": 30014, "p2p_passed": 30013, "f2p": 1.0, "p2p": 0.9999666822149663, "partial": 0.9999667553191489}}}, "tokens": 1385700, "wall_s": 316.0, "trial": "mashumaro-flattened-dataclass-fields_0__777e3c19"}
    {"id": "tengo-callable-instance-isolation#0", "status": "ok", "error": null, "judge": {"score": 0.0, "feedback": "reward 0", "extra": {"status": "ok", "passed": false, "rewards": {"reward": 0, "f2p_total": 23, "f2p_passed": 4, "p2p_total": 122, "p2p_passed": 122, "f2p": 0.17391304347826086, "p2p": 1.0, "partial": 0.8689655172413793}}}, "tokens": 3394849, "wall_s": 525.8, "trial": "tengo-callable-instance-isolation_0__a6f56598"}

    trial is the record's judge.extra.trial_dir under jobs_dir.

  • Not verified: baseline/claude.yaml has not been run (no Claude subscription token here; its config loads and passes
    the Harbor environment's checks in the tests). No full run of the 113 tasks. A real grader crash (-1) was not met;
    the judge's handling of it is tested on the verdict Hermit's Harbor environment gives.

Review

  • Tests and documentation cover the affected behavior, where applicable. Tests:
    examples/deepswe/utils/tests/test_collected_commits.py, examples/deepswe/utils/tests/test_crash_sentinel.py
    and the deepswe entry of tests/core/test_harbor_examples.py. Documentation: as in Change.

  • Commands, defaults, and public interfaces are consistent. No command, default or interface changes.

  • Agents follow the agent layers. No new agent: the configs use the Codex and Claude Code Base Agents in each
    task's Harbor environment (environment.harbor).

  • Shared logs and examples contain no credentials or private data. No run records are committed; the prepared
    tasks are git-ignored (utils/tasks, utils/tasks.jsonl).

  • Documentation-only: not applicable.

  • Core changes. None under hermit/.

  • Implementation correctness and failures. Traced: the benchmark file's settings to Harbor's trial (the
    model's hosts as extra_allowed_hosts, each task's own timeouts), seen in the smoke trials' config.json; the
    patched collect command on a real git repository in the tests and on the real images; the judge through the
    rollout's own _judged and hermit.harbor.report. A patch that does not apply is DeepSWE's
    apply_failed, reward 0; uncommitted work is not graded (DeepSWE's protocol, stated in the README); a grader crash
    is no score; an infra trial is infra as for every Harbor benchmark.

  • Real execution paths and tests. The smoke goes through hermit eval with real Codex sessions; the end-to-end
    run through Hermit's Harbor environment and Harbor's oracle use the real tasks and images. The judge's test loads
    the baseline config (Config.load), its judge as the run loads it (hermit.isolate.judge_for), calls it
    through the rollout (hermit.trainer.rollout._judged) on verdicts from HarborEnvironments.verdict, and reads
    the rows with hermit.harbor.report.

  • Documentation. As in Change.

  • This description. Read end to end against the code at 1f99d91 and the records.

  • Independent review (post-PR audit). An agent in a separate session audited the published PR against the
    general, benchmark, test and sandbox checklists: nothing blocking. Its confirmed findings are fixed in this
    commit: the README and the judge's docstring said to grade a crashed trial by running hermit eval again on its
    row, which under the eval's run name writes over the eval's results.jsonl and summary.json (they now give a
    run name and jobs folder of the rerun's own); the 113 images are about 111 GB compressed, not 105 GB. Left as
    minor: a -1 the agent's own patch caused (an early exit in a task's test section) would also be no score;
    the judge's test calls hermit.trainer.rollout._judged, the function run_tasks calls a judge through; some
    added prose lines run past 120 characters.

  • Task directories. The hub's Harbor task directories, through python -m hermit.harbor.dataset prepare
    (ref: datacurve/deep-swe-1-1@1) and one dataset.patch (reason above). Run in Harbor's environments.

  • Public and private halves. No data.view. A row holds the instruction, the task's settings (image,
    resources, network modes, timeouts) and its metadata (titles, category, language, repository URL, base commit).
    The hidden tests, the grader and the reference solution are only in the task's tests/ (baked into the
    verifier's image) and solution/, never in the agent's container (the probe below). The judge's feedback is the
    verdict and the verifier output's tail (test names and output); no learner reads it in these eval-only configs.

  • What a task asks. Each task.toml: agent no-network (the run adds its model's hosts), verifier
    no-network in its own container, 2 CPUs and 8 GB each, which the configs do not override; the configs run 4
    tasks at a time. Effective timeouts:

    | | `task.toml` | The run |
    |---|---|---|
    | Agent | 5,400 s | the task's own (`agent_timeout_sec: null`); Hermit ends the session 60 s before, 5,340 s |
    | Collect (agent's container) | 300 s | 300 s |
    | Verifier (its own container) | 1,800 s | 1,800 s |
    | Environment build (each) | 1,800 s | 1,800 s |
    
  • Parity, for a moved benchmark. Not applicable: a new benchmark.

  • A real run. The smoke above, through hermit eval, no infrastructure error.

  • Group and selection. The example's tests are in its own examples/deepswe/utils/tests/ (the core group by
    tests/selection.py, which --changed selects). The file names are unique among the examples' tests (pytest
    imports them by basename).

  • Names. e.g. test_an_agent_that_commits_everything_is_graded_on_its_own_change_alone,
    test_a_grader_that_crashed_is_no_score_and_the_report_counts_it_apart.

  • Docstrings. Each file opens with the code under test, its stand-ins (a git repository under tmp_path;
    Harbor's command stood in for by this interpreter) and "no network, no Harbor, no Docker" / "no environment
    starts".

  • What it asserts. What a caller sees: the collected patch's files, the row's status and error,
    hermit.harbor.report's classification and summary; the deployment guard deploys AHE's template for both CLIs
    and checks every root entry. Checked to fail without each fix: the collect command without the exclusion; the
    old exclusion list (the guard and the extended commit-all test); the judge without its -1 check (the
    environment judge's score of -1).

  • Real entry points and stand-ins. As under Real execution paths; the collect command runs as the trial runs it
    (bash -c, paths rewritten to tmp_path).

  • Isolation. tmp_path only, git's global config a file of its own, no network, sign-in or agent CLI; the lock
    and split test reads committed files only and passes without prepared data.

  • Time and order. No dates, sleeps or shared state.

  • Cost. 10 tests, 1.28 s together.

  • Hygiene. No unused imports; each git subprocess ends with its test.

  • Reuse the framework's sandbox. The agent runs in its task's Harbor environment, the verifier in its own
    container (DeepSWE's separate mode); the judge runs on the host and only reads the verdict Harbor recorded. No
    process runs Local. Evidence: the smoke trials (judge.extra.trial_dir, under the config's jobs_dir), whose
    config.json carries extra_allowed_hosts: ["chatgpt.com", "auth.openai.com"]; and the check below, run through
    Hermit's Harbor environment with that allowlist on tengo-callable-instance-isolation (a copy of the prepared task
    whose test.sh runs the probe; the agent's file committed): in the agent's phase only the model's hosts answer
    and neither /tests nor /solution exists; the verifier's container is another host, reaches nothing, holds the
    collected model.patch and none of the agent's files (the probe's test.sh applies nothing).

    <details><summary>The check's output</summary>
    
    ```text
    == agent phase, root@<agent's container>
    https chatgpt.com (model host)     exit 0: 200
    https auth.openai.com (model host) exit 0: 200
    https example.com                  exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to example.com:443  000
    https github.com                   exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443  000
    https 1.1.1.1 (direct IP)          exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 1.1.1.1:443  000
    http example.com (plain HTTP)      exit 52: curl: (52) Empty reply from server 000
    ls /tests                          exit 2: ls: cannot access '/tests': No such file or directory
    ls /solution                       exit 2: ls: cannot access '/solution': No such file or directory
    ls /logs/artifacts                 exit 0: total 8 drwxrwxrwx 2 root root 4096 <date> . drwxr-xr-x 5 root root 4096 <date> ..
    agent's marker (/root/agent-marker) exit 1: cat: /root/agent-marker: No such file or directory
    agent's file in repo (probe-agent.txt) exit 1: cat: /app/probe-agent.txt: No such file or directory cat: /testbed/probe-agent.txt: No such file or directory
    write /app                         exit 0: writable
    agent left its files: 0
    == verifier phase, root@<verifier's container>
    https chatgpt.com (model host)     exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to chatgpt.com:443  000
    https auth.openai.com (model host) exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to auth.openai.com:443  000
    https example.com                  exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to example.com:443  000
    https github.com                   exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443  000
    https 1.1.1.1 (direct IP)          exit 35: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 1.1.1.1:443  000
    http example.com (plain HTTP)      exit 52: curl: (52) Empty reply from server 000
    ls /tests                          exit 0: config.json grader.py probe.sh test.patch test.sh
    ls /solution                       exit 2: ls: cannot access '/solution': No such file or directory
    ls /logs/artifacts                 exit 0: total 12 drwxrwxrwx 2 root root 4096 <date> . drwxr-xr-x 4 root root 4096 <date> .. -rw-r--r-- 1 1000 1000  157 <date> model.patch
    agent's marker (/root/agent-marker) exit 1: cat: /root/agent-marker: No such file or directory
    agent's file in repo (probe-agent.txt) exit 1: cat: /app/probe-agent.txt: No such file or directory cat: /testbed/probe-agent.txt: No such file or directory
    write /app                         exit 0: writable
    ```
    
    The probe (`probe.sh`, the phase as its argument), run in the agent's phase by the scripted agent and in the
    verifier's as the task copy's `test.sh` (`bash /tests/probe.sh verifier`, then reward 1):
    
    ```bash
    #!/bin/bash
    # What this phase can reach and see. Each line: the probe, then what came back.
    phase=$1
    try() { printf "%-34s " "$1"; shift; out=$(timeout 15 "$@" 2>&1); rc=$?; echo "exit $rc: $(printf "%s" "$out" | head -c 150 | tr "\n" " ")"; }
    echo "== $phase phase, $(id -un)@$(hostname)"
    try "https chatgpt.com (model host)"    curl -sS -o /dev/null -w '%{http_code}' https://chatgpt.com/
    try "https auth.openai.com (model host)" curl -sS -o /dev/null -w '%{http_code}' https://auth.openai.com/
    try "https example.com"                 curl -sS -o /dev/null -w '%{http_code}' https://example.com/
    try "https github.com"                  curl -sS -o /dev/null -w '%{http_code}' https://github.com/
    try "https 1.1.1.1 (direct IP)"         curl -sS -k -o /dev/null -w '%{http_code}' https://1.1.1.1/
    try "http example.com (plain HTTP)"     curl -sS -o /dev/null -w '%{http_code}' http://example.com/
    try "ls /tests"                         ls /tests
    try "ls /solution"                      ls /solution
    try "ls /logs/artifacts"                ls -la /logs/artifacts
    try "agent's marker (/root/agent-marker)" cat /root/agent-marker
    try "agent's file in repo (probe-agent.txt)" bash -c 'cat /app/probe-agent.txt 2>&1 || cat /testbed/probe-agent.txt'
    try "write /app"                        bash -c 'touch /app/.probe-w && echo writable && rm -f /app/.probe-w'
    ```
    </details>
    
  • Sandbox changes are core changes. No sandbox change.

@illusoryw
illusoryw force-pushed the feat/deepswe branch 3 times, most recently from d1c780f to 30dd7a2 Compare December 1, 2026 22:36
… them

examples/deepswe/ packages DeepSWE v1.1 (datacurve/deep-swe-1-1@1 on the
Harbor hub, 113 tasks of 91 repositories) as the other Harbor benchmarks
are: a benchmark file whose dataset block prepare reads, the lock of the
113 tasks and the images' sizes, splits (every task a test task: DeepSWE
is held-out evaluation data, so the protocol is SWE-bench Verified's
transfer), baseline configs for both CLI profiles the other benchmarks
have, task-info and README.

DeepSWE grades the agent's commits in a verifier container of their own,
which Harbor 0.25.0 runs as published. Two things are the example's own:

- utils/patches.py: each task's [[verifier.collect]] diff leaves out
  everything Hermit's deployment of an adapter writes at the repository's
  root (the adapter's folder, the context file, the CLI's places, the
  deployment's record, the hooks' audit). The instruction asks the agent
  to commit everything, so without this an arm with an adapter would be
  graded on a tree holding those files and an arm with none without them;
  a test deploys AHE's template as a run does and fails if any entry it
  writes there is not left out.
- utils/judge.py: DeepSWE's test.sh writes reward -1 when its grader
  crashed before grading any test; the judge records that as no score
  (Unscored, counted as infra by hermit.harbor.report) instead of a -1.

This branch has not been deployed

No deployments
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.

1 participant

0