File size: 7,875 Bytes
98d1fcf
 
 
 
 
7f16585
 
 
 
 
 
 
 
98d1fcf
4f65a31
98d1fcf
 
 
 
 
7f16585
98d1fcf
7f16585
98d1fcf
 
4f65a31
98d1fcf
 
 
 
507acb2
98d1fcf
 
 
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
 
 
98d1fcf
7f16585
 
98d1fcf
 
 
 
 
 
 
 
 
 
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
7f16585
98d1fcf
 
 
 
 
7f16585
 
 
 
 
 
98d1fcf
 
 
 
 
 
 
 
c551188
4f65a31
c551188
 
98d1fcf
 
 
 
 
 
 
 
 
 
 
4f65a31
7f16585
 
98d1fcf
7f16585
 
 
98d1fcf
 
 
 
 
 
 
 
 
7f16585
 
 
 
 
 
98d1fcf
 
7f16585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f65a31
 
7f16585
 
98d1fcf
 
 
7f16585
 
98d1fcf
 
7f16585
98d1fcf
 
7f16585
 
98d1fcf
7f16585
 
 
 
 
98d1fcf
7f16585
 
 
 
 
 
 
 
98d1fcf
 
 
7f16585
 
 
 
 
 
 
 
 
 
 
98d1fcf
7f16585
98d1fcf
 
 
 
 
 
 
 
7f16585
 
 
98d1fcf
7f16585
 
 
 
 
 
 
 
 
98d1fcf
 
 
 
 
 
7f16585
 
98d1fcf
 
 
4f65a31
 
 
 
98d1fcf
 
 
 
 
 
7f16585
 
 
 
 
 
 
 
 
 
98d1fcf
 
 
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
---
pretty_name: Goldset
license: cc-by-4.0
language:
  - en
language_creators:
  - found
annotations_creators:
  - found
source_datasets:
  - original
multilinguality:
  - monolingual
task_categories:
  - text2text-generation
  - text-generation
tags:
  - code
  - software-engineering
  - program-repair
  - bug-fixing
  - evaluation
  - benchmark
  - python
size_categories:
  - n<1K
configs:
  - config_name: default
    data_files:
      - split: test
        path: oracles.parquet
dataset_info:
  config_name: default
  features:
    - name: repo
      dtype: string
    - name: unit
      dtype: string
    - name: subject
      dtype: string
    - name: granularity
      dtype: string
    - name: spec_source
      dtype: string
    - name: spec
      dtype: string
    - name: source_before
      dtype: string
    - name: source_after
      dtype: string
    - name: test_file
      dtype: string
    - name: fail_to_pass
      sequence: string
    - name: committed_at
      dtype: string
    - name: parent_at
      dtype: string
    - name: license
      dtype: string
    - name: license_file
      dtype: string
    - name: also_in
      dtype: string
    - name: commit
      dtype: string
    - name: parent
      dtype: string
    - name: commit_url
      dtype: string
    - name: repo_url
      dtype: string
    - name: module
      dtype: string
    - name: units_changed
      sequence: string
    - name: diff_lines
      dtype: int64
    - name: n_tests
      dtype: int64
    - name: fingerprint
      dtype: string
    - name: id
      dtype: string
    - name: language
      dtype: string
    - name: validated_at
      dtype: string
    - name: validator
      dtype: string
    - name: schema_version
      dtype: int64
  splits:
    - name: test
      num_bytes: 24592827
      num_examples: 896
  download_size: 4751353
  dataset_size: 24592827
---

# Goldset

**Verified bug-fix records for evaluating coding agents.**

Every record is a real bug in public software, the fix its author wrote, and the
test that fails before the fix and passes after it. A record is kept only once
both runs have been observed, so what is published is a reproduction rather than
a claim.

896 records from 352 projects, all Python, with
fixes committed between 2010-06-13 and 2026-08-17.


[Website](https://goldset.dev) · [Code and verifier](https://github.com/andysalvo/goldset) · [Datasheet](DATASHEET.md)

## Quick start

```python
from datasets import load_dataset

ds = load_dataset("goldsetdev/goldset", split="test")

# Single-function records whose fix postdates a model's training cutoff.
subset = ds.filter(lambda r: r["granularity"] == "function"
                             and r["committed_at"] > "2025-01-01")

r = subset[0]
print(r["spec"])            # what the code was meant to do
print(r["source_before"])   # the bug
print(r["source_after"])    # the author's fix
print(r["fail_to_pass"])    # the test that tells them apart
```

## Supported tasks

**Defect repair.** Give a model `source_before` and `spec`, ask for a fix, and
run `fail_to_pass` against the result. The test is the reward signal, so scoring
needs no human and no judge model.

**Defect detection.** Ask whether `source_before` contains a bug, using
`source_after` as ground truth.

**Harness and scaffolding evaluation.** Because the reward is executable, the
same records measure how much of a score comes from the agent around the model
rather than the model itself.

## Dataset structure

One row per record. 355 isolate a single changed function
together with its docstring, and 541 keep the whole changed
file and use the commit message as the specification. Filter on `granularity` for
the tighter kind.

| field | meaning |
|---|---|
| `repo`, `repo_url` | the project the record came from |
| `unit`, `module`, `units_changed` | the function or class under test, its importable path, and every unit the commit touched |
| `subject` | the author's own commit message, unedited |
| `granularity` | `function` for one isolated function, `file` for a whole changed file |
| `spec`, `spec_source` | what the code was meant to do, from its docstring or from the commit message |
| `source_before`, `source_after` | the code before and after the fix |
| `test_file`, `fail_to_pass` | the test file and the exact pytest node ids that flip |
| `commit`, `parent`, `commit_url` | the fix and the state it was broken in, permanently linkable |
| `committed_at`, `parent_at` | dates of both, for filtering against a training cutoff |
| `license`, `license_file`, `also_in` | the licence, the file it was read from, and any project the identical code also ships from |
| `fingerprint`, `id` | stable identity, addressed by content |
| `diff_lines`, `n_tests` | size of the change and how many tests flip |
| `validated_at`, `validator` | audit trail |

## How a record is made

1. Find commits that changed source and tests together, in permissively licensed
   projects only.
2. Run the author's test against the code as it stood before the fix. It must fail.
3. Run the same test against the fix. It must pass.
4. Keep the changed function with its docstring, or the whole file when it does
   not isolate cleanly.

About one candidate in ten survives. No language model is used at any stage.

## Verifying it

The corpus is meant to be checked rather than trusted.

```bash
git clone https://github.com/andysalvo/goldset
cd goldset && python3 verify.py --sample 20
```

`verify.py` shares no code with the pipeline that produced the corpus. It
re-clones each project, checks out both commits, re-applies the fix commit's tests
and runs them again, so it would catch a mistake the pipeline made rather than
agreeing with it.

## Limitations

- **A passing test does not mean a fix is correct.** It means the recorded test
  passes. That is the property this corpus guarantees, and it is a narrower claim.
- **Not a random sample of defects.** It is the subset of real fixes that shipped a
  regression test in the same commit and could be reduced to one unit or one file.
- **Python only.**
- **We tested whether these bugs are harder for models than generated ones and the
  result did not replicate.** The claim is not made here.
- **Contamination is possible.** Every record comes from a public repository and may
  already sit in a model's pre-training data, which is why every record is dated.
  Report the window you evaluated on.

## What is not in this release

A further set of records is held back and not published. Projects are assigned
whole to one side or the other, so nothing here can be used to work out what is
withheld. A public evaluation set is contaminated the moment it is public, which is
the reason for keeping a disjoint one.

What is published here stays published. The CC BY 4.0 grant on this release is
permanent and nothing is ever withdrawn.

## Licence and attribution

Source excerpts remain under the licence of the project they came from. The full
text of each project's licence, as it stood at the commit cited, ships in
`licenses/`, because MIT, BSD and Apache-2.0 condition redistribution on the notice
travelling with the code rather than on a link to it. Per-project credit is in
`ATTRIBUTION.md`.

| licence | records |
|---|---|
| MIT | 629 |
| Apache-2.0 | 117 |
| BSD-3-Clause | 81 |
| BSD-2-Clause | 64 |
| PSF-2.0 | 4 |
| ISC | 1 |

The added layer, meaning the validation results, schema and arrangement, is
released under CC BY 4.0. Nothing in this corpus was authored by us.

## Citation

```bibtex
@misc{goldset2026,
  title  = {Goldset: verified bug-fix records for evaluating coding agents},
  author = {Salvo, Andrew},
  year   = {2026},
  url    = {https://goldset.dev}
}
```

**Maintainers:** if your project appears here and you would rather it did not, open
an issue and it will be removed, no questions asked.