Datasets:
|
Download README.md from goldsetdev/goldset: direct link, hf CLI and curl.
- Browser
- Download file 7.88 kB
-
https://huggingface.co/datasets/goldsetdev/goldset/resolve/main/README.md
- Command line
-
hf download hf://datasets/goldsetdev/goldset/README.md
-
curl -L -o README.md https://huggingface.co/datasets/goldsetdev/goldset/resolve/main/README.md
7.88 kB
| 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. | |