mash-bench / README.md
lumpenspace's picture
mash-bench: 203 real command-repair scenarios
9cf991c verified
|
Raw
History Blame Contribute Delete
2.21 kB
---
license: mit
task_categories:
- text-generation
language:
- en
tags:
- shell
- command-correction
- benchmark
- terminal
pretty_name: "mash-bench"
size_categories:
- n<1K
---
# mash-bench
203 real-world shell-command **repair** scenarios for evaluating command
correction models — as of Aug 2026, the first benchmark for this task. Each
scenario is a wrong/garbled command as a human actually typed it, the stderr it
produced (187/203 have it), and one or more acceptable corrections.
```json
{"input": "cd..", "stderr": "-bash: cd..: command not found", "expected": ["cd .."], "source": "nofaq"}
{"input": "git brnch", "stderr": "git: 'brnch' is not a git command. See 'git --help'.", "expected": ["git branch"], "source": "thefuck"}
```
## Sources
- **nofaq** (139 scenarios) — the artifact of *NoFAQ: Synthesizing Command
Repairs from Examples* (D'Antoni, Singh, Vaughn; ESEC/FSE 2017),
[MichaelBVaughn/NoFAQ](https://github.com/MichaelBVaughn/NoFAQ), MIT.
Extracted from `Synthesis/RuleRepair/TestExamples.fs`.
- **thefuck** (64 scenarios) — inputs, stderr, and fixes taken verbatim from
the rule *test files* of [nvbn/thefuck](https://github.com/nvbn/thefuck)
(MIT), spanning git typos, missing sudo, cd errors, package managers, and
more.
Scenarios were deduped across sources; entries with fabricated-looking or
machine-state-dependent fixes were dropped; alternate corrections were added
only where genuinely equivalent. Full cleaning log in `PROVENANCE.md`.
## Scoring
Two modes matter:
- **bare input** — the model sees only the typed command. Fair for typo-class
scenarios (most of `thefuck`).
- **with stderr** — the error text is appended to the input. Required for
repair-class scenarios (most of `nofaq`), whose fixes depend on the error
(`cd files``mkdir files; cd files` only given "no such file or
directory").
Report both, per source. Exact match against any entry in `expected`
(whitespace-normalized) is the metric; it is conservative — functionally
equivalent alternative fixes count as misses unless listed.
Runner: [`training/bench.py`](https://github.com/lumpenspace/fash/blob/main/training/bench.py)
in the fash repo.