File size: 5,593 Bytes
cb0011e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
license: mit
language:
- en
tags:
- swe
- dockerless
configs:
- config_name: swe
  data_files: "SWE-DockerLess.jsonl"
---
# SWE-DockerLess

A SWE-bench-shaped benchmark that needs **no Docker, no network and no prebuilt
image**. Every row carries its own repo snapshot, so an instance is reproduced by
writing files to a temp directory, `git init`, `git apply` and running pytest.

Rows are byte-for-byte SWE-bench compatible: same field names, same
`FAIL_TO_PASS` / `PASS_TO_PASS` JSON-string encoding, same "resolved" rule. One
extra `dockerless` object carries the snapshot and the test command.

```
SWE-DockerLess.jsonl   4 instances, 62.9 KiB (~16k tokens total)
build_dataset.py       rebuilds the jsonl from repos/ + fixed/ + newtests/ and
                       derives F2P/P2P by actually running pytest
run_harness.py         scoring harness (--gold, or --predictions preds.jsonl)
repos/                 the four buggy base repos (the source of the snapshots)
fixed/                 gold-fix versions of the touched files
newtests/              the tests that become test_patch
tools/validate.py      schema, patch-application and budget checks
tools/make_controls.py generates empty / cross / partial negative controls
reports/               harness output for gold and the three controls
```

## Instances

| instance_id | repo | the bug | F2P | P2P | gold patch |
| --- | --- | --- | --- | --- | --- |
| `swedl__miniconf-1` | swedl/miniconf | `${k}` interpolation recurses on cycles (no `CircularReferenceError`) and `$$` never escapes | 9 | 15 | 41 added lines |
| `swedl__ttlcache-1` | swedl/ttlcache | LRU order ignores reads and overwrites; `len()` counts expired rows | 5 | 12 | 12 added lines |
| `swedl__cronlite-1` | swedl/cronlite | `5/15` collapses to `{5}`; day-of-week `7` rejected | 8 | 21 | 11 added lines |
| `swedl__semverlite-1` | swedl/semverlite | prerelease ordering is lexicographic; prereleases satisfy release ranges | 7 | 19 | 23 added lines |

29 FAIL_TO_PASS tests, 67 PASS_TO_PASS tests. Difficulty is SWE-bench-like rather
than toy-like: each fix needs a behaviour change in a real algorithm (recursive
descent with cycle detection, an LRU invariant, cron field expansion, semver
precedence), and the hidden tests pin exact semantics — error message text, the
0-6 weekday scale, the "prerelease must opt in" range rule — that a shallow
patch misses. The `partial` control below scores 5/9, 2/5, 6/8 and 3/7 F2P
without resolving a single instance.

## Row schema

| field | notes |
| --- | --- |
| `instance_id` | `swedl__<repo>-1` |
| `repo` | `swedl/<repo>` |
| `base_commit` | real 40-char sha of the snapshot commit (deterministic) |
| `patch` | gold fix, `git diff` unified diff against `base_commit` |
| `test_patch` | adds test files only, never touches source |
| `problem_statement` | issue-style report; states the contract, never names a test |
| `hints_text` | `""` |
| `created_at`, `version` | `2026-10-30`, `1.0` |
| `environment_setup_commit` | equals `base_commit` |
| `FAIL_TO_PASS`, `PASS_TO_PASS` | JSON-encoded strings, as in SWE-bench |
| `dockerless.files` | `{path: content}` snapshot of the repo at `base_commit` |
| `dockerless.test_cmd` | `python -m pytest -v --tb=no -p no:cacheprovider {tests}` |
| `dockerless.test_files` | the node-id prefixes to run |

## Running it

```bash
python -m pip install pytest          # the only dependency
python build_dataset.py               # regenerate + re-verify the jsonl
python run_harness.py --gold          # sanity check, expect 4/4
python run_harness.py --predictions predictions/partial.jsonl --out reports/partial.json
```

A predictions file is JSONL of `{"instance_id", "model_name_or_path",
"model_patch"}` — the SWE-bench format. `resolved` requires **all** F2P and
**all** P2P to pass.

## Verified results

```
$ python run_harness.py --gold
instance               resolved  F2P     P2P     note
swedl__miniconf-1      yes       9/9     15/15   ok
swedl__ttlcache-1      yes       5/5     12/12   ok
swedl__cronlite-1      yes       8/8     21/21   ok
swedl__semverlite-1    yes       7/7     19/19   ok
resolved 4/4 (100.0%) in 10.3s

$ python run_harness.py --predictions predictions/empty.jsonl     -> 0/4
$ python run_harness.py --predictions predictions/cross.jsonl     -> 0/4
$ python run_harness.py --predictions predictions/partial.jsonl   -> 0/4
```

`build_dataset.py` is the ground truth for F2P/P2P: it materialises a clean
checkout, applies `test_patch`, runs pytest, applies `patch`, runs pytest again,
and classifies every test by observed outcome. It refuses to write a row if the
gold patch leaves any failure behind, if F2P is empty, or if a test disappears.

## Budget

Measured for `max_tokens = 2048`, `context = 240000`:

- prompt per instance: ~2.0k–2.6k tokens (problem statement + snapshot)
- gold patch: 11–41 added lines, ~200–700 tokens — comfortably inside 2048
- whole dataset: ~16k tokens, so all four rows fit in one context if you want

## Deliberate deviations from SWE-bench

- **Synthetic repos.** These are four purpose-built Python packages, not real
  GitHub projects, so there is no `repo` clone step and no upstream history.
- **Snapshot in the row** instead of a Docker image. `base_commit` is a genuine
  commit sha of that snapshot, so `git apply` and `git diff` behave normally.
- **No install step.** Packages are importable from the repo root, so
  `dockerless.install` is empty and pytest runs with the repo as rootdir.
- **Python only**, single language, to keep the harness to `python + git + pytest`.