What are fail-to-pass and pass-to-pass tests?
Fail-to-pass tests are tests that fail on the original code and pass once the correct change is applied, which shows the issue was resolved. Pass-to-pass tests already passed before the change and must still pass after it, which shows nothing else was broken. Together they are the standard way to grade a code patch in software engineering benchmarks.
Updated
Fail-to-pass and pass-to-pass tests
How a task uses them
A task ships with a repository at a fixed commit, an issue or feature request, a reference patch, and the two groups of tests. The model writes its own patch. The task counts as resolved only if every fail-to-pass test now passes and every pass-to-pass test still passes.
Fail-to-pass and pass-to-pass tests
Why both groups are needed
Fail-to-pass alone can be gamed by a change that makes the new tests pass while breaking the rest of the codebase. Pass-to-pass alone proves nothing was fixed.
The pair grades behaviour. A patch does not have to match the reference line for line. It has to make the software do the right thing.
Fail-to-pass and pass-to-pass tests
Where they go wrong
Tests that are tied to details of the reference patch reject other correct fixes. Tests that are too narrow accept a fix that only handles the example. Both are found by review, not by running the task once.
In practice
Where this shows up in our work.
Related terms
Read next.
Need this done, not only defined?
Tell us what you are building. We start with a small paid pilot, and you approve on a sample before any volume.