Skip to content

Latest commit

 

History

History
62 lines (55 loc) · 3.37 KB

bundle-format.md

File metadata and controls

62 lines (55 loc) · 3.37 KB

Bundle format

A bundle is one self-contained directory. It carries everything a run needs except the container image itself, which the manifest points at.

my-task/
  task.json         # the manifest (strict, schema-validated)
  description.md    # the problem statement; the only task text the solver sees
  patch.diff        # the golden fix, replayed by the golden solver
  Dockerfile        # only for dockerfile-mode bundles
  tests/
    fail2pass       # declared fail-to-pass test ids, one per line
    pass2pass       # declared pass-to-pass test ids, one per line

task.json

The manifest is validated at load. Unknown fields are rejected, referenced files must exist, and the flat files under tests/ must agree with the inline lists. A bundle that fails its own invariants never constructs, so no downstream component re-checks it. Annotated example (from bundles/example-mini):

{
  "schema_version": 1,
  "instance_id": "instance_bundlebench__forum-mini-...",   // unique task id
  "repo": "bundlebench/forum-mini",
  "language": "python",
  "base_commit": "917294fb...",                      // where the solver starts
  "fix_commit": "9f03505a...",                       // where the hidden tests live
  "image": {
    "mode": "dockerfile",              // "prebuilt" (registry ref) or "dockerfile" (local build)
    "reference": null,                 // prebuilt image reference, when mode is "prebuilt"
    "dockerhub_tag": "bundlebench-example-mini:local",
    "platform": "linux/amd64",
    "dockerfile": "Dockerfile"
  },
  "network": {
    "solve": "none",                   // solver isolation; "none" by default
    "test": "none"                     // some tasks need network at test time
  },
  "test": {
    "extractor": { "name": "script", "junit_path": null },  // junitxml | script | regex
    "test_cmd": "python run_tests.py",
    "selected_test_files": ["test_forum.py"],
    "setup_cmds": ["git reset --hard bundlebench-base", "git clean -fd"],
    "inject_cmd": "git checkout bundlebench-fix -- test_forum.py",
    "strict_test_hiding": false
  },
  "fail_to_pass": ["test_forum.py | test_rejects_a_blank_title"],
  "pass_to_pass": ["test_forum.py | test_creates_post_with_a_valid_title", "..."],
  "artifacts": {
    "problem_statement": "description.md",
    "golden_patch": "patch.diff",
    "source_row": null                 // the raw dataset row, for ingested bundles
  }
}

Points worth knowing:

  • Language and framework knowledge is data, not code. The test command, the extractor choice, and the network policy are manifest fields. There are no per-repository branches anywhere downstream, which is what keeps the harness portable across languages and test frameworks.
  • Test ids are matched verbatim. fail_to_pass and pass_to_pass entries are the literal strings the test framework prints (a pytest node id, a mocha title). The extractor normalizes observed output into the same vocabulary; the ids themselves are never parsed.
  • Hidden tests are not stored in the bundle root. The graded test content lives in the image's git history at fix_commit and is injected by inject_cmd at eval time, after the solver's patch is applied. The solve container never contains it.
  • task init --from-dataset writes this format. An ingested SWE-bench Pro row becomes a bundle with image.mode: "prebuilt" and the source row preserved under artifacts.source_row.