Repository patch tasks: what makes a good one

Short answer. A repository patch task gives an agent a codebase and an issue and checks the proposed change with tests. It is a good task when the issue is clear, the tests accept every valid fix, and nothing in the issue or tests leaks the answer.

By Vision Scale Labs · Updated 2026-11-25

The issue text

The issue should say what is wrong and what correct behaviour looks like, without naming the exact function to edit. If the issue is vague, two reasonable fixes can behave differently and only one passes. If the issue contains the solution, the task measures reading, not engineering.

The tests

Tests that were written for the original change often check names and structure that the issue never mentioned. A correct fix with a different name then fails. Review each test and ask whether it follows from the issue alone.

Split the tests into those that must pass after the fix and those that must keep passing. Both groups should be checked.

Contamination and drift

Public repositories are in many training sets. A model may recall the real fix. Prefer newer or private material, or rewrite the issue and tests so that recall alone does not help. Pin the repository at one commit and its dependencies at fixed versions so reruns match.

Common questions

Why do correct fixes sometimes fail?

Usually the tests check details the issue did not state. A reviewer reading issue and tests side by side finds these quickly.

Can one task be both a patch task and a terminal task?

Parts can overlap, but they measure different things. Keep the scoring rule for each task type separate.

Keep reading