You bought the code. Where are the bug-fixing training tasks?
To train an agent to fix unfamiliar repositories, define delivery around verifiable repair tasks. Repository size, patch count and interaction count do not establish that those tasks can be executed again.
On this page
You want a bug-fixing agent. A supplier offers hundreds of repositories, with complete files, extensive histories and a useful language mix. Your team then has to find issues, restore old versions, install dependencies and build tests. The data may be authentic, yet you have purchased ingredients rather than training tasks. Establish who will turn those ingredients into work whose outcome can actually be assessed.
A code collection and a repair task are different deliveries
A code corpus can support learning about naming, structure and completion. Issue–patch pairs demonstrate a change associated with a problem. An execution environment allows attempts and feedback. A trajectory records the actual sequence of searches, edits and tests. Choose the behavior you want to study before choosing the materials. Step-by-step traces are not required for every training approach; having traces does not establish that their environment can still be reproduced.
| Delivery | What it provides | What may still be missing |
|---|---|---|
| Repository snapshot | Code and file relationships at a version | A task, an assessment rule and an executable environment |
| Issue–patch pair | A problem and a reference change | Starting state and executable tests; actions if process learning is intended |
| Executable repair task | Starting code, requirements, environment and checks | Attempt records and review of whether checks cover the requirement |
| Execution trajectory | Actions, observations and outcome of one attempt | Task-version linkage, reproducibility and evidence for outcome labels |
The official SWE-bench structure separates base_commit, problem_statement, patch, test_patch and two test lists.[1] It is a useful reminder that a repair task contains more than the finished code. Use the fields as inspection prompts; copying their names does not reproduce the dataset’s quality.
Reproduce one bug before discussing ten thousand tasks
Consider a constructed example: a date parser silently rolls February 30 into March. The task is to reject invalid dates while still accepting February 29 in leap years. A fixed file alone cannot establish that the original failure existed. New tests alone can also mislead: failure to install the test framework is not reproduction of the intended bug.
- Pin the pre-fix commit and dependencies. In a clean environment, valid-date cases should pass and the invalid-date case should fail for the intended behavioral reason. Preserve exit codes and failure details.
- Apply the reference patch and rerun in the same environment. Invalid dates should now be rejected as specified; previously valid cases should remain valid.
- Record scope limits such as time zones and accepted input formats. Label anything not covered as untested rather than allowing a single pass label to stand for complete correctness.
A failure becoming a pass checks the repair; an existing pass remaining a pass checks regression. SWE-bench applies model patches and runs tests in containers, retaining reports and execution logs.[2] The useful lesson is a reviewable procedure, not that one container run proves all behavior correct. Tasks involving external services, platforms or hardware also need an account of conditions outside the package.
A passing test can still answer the wrong question
Suppose the requirement says an invalid date must raise an error, while a hidden test insists on one exact message. A valid solution with different wording would fail. Conversely, a test checking only that the program does not crash may accept the silent change to March. Tests can impose extra requirements or omit the behavior that matters.
SWE-bench Verified’s official explanation includes a case in which tests demand warning behavior and text absent from the issue description. It describes human review of issue clarity and test scope.[3] A practical procurement check follows: ask a reviewer to derive reasonable success conditions using only what the agent can see, then inspect whether the tests introduce unstated requirements.
Separate environment startup failures, insufficient task descriptions, mismatched tests and genuine agent mistakes. The first three affect whether the task supplies a sound training signal. Only the last category evaluates an attempt under the agreed conditions. Combining them into one failure count makes both training analysis and supplier discussions harder.
Ask for a task-level delivery record
Task ID: date-parser-001 (constructed example)
Starting state: pre-fix commit, locked dependencies, environment/image version
Requirement: reject nonexistent dates; retain valid parsing in the agreed formats
Reference solution: patch and corresponding commit, stored separately
Checks: pre-fix failing/passing cases; post-fix outcomes; commands and raw logs
Optional process: actions, tool outputs and final patch grouped by attempt
Limits: untested platforms, input formats and external dependencies
Isolation: do not expose reference solutions or scoring-only materials to the evaluated agentSWE-Gym v2 combines natural-language tasks, executable runtimes and unit tests in a software-engineering training environment.[4] It is a research reference for procuring executable tasks, not evidence that the same recipe transfers to every domain, language or private repository. If the objective includes learning search and repair behavior, specify trajectories separately. Do not mix public evaluation answers into training and then use those same tasks as evidence of generalization.
Record where trial tasks stop working
Choose a small set covering different repositories, dependencies and issue types. Track stages separately: environment starts, original failure reproduces, reference patch verifies, and tests match the requirement. Report counts and reasons at every stage. There is no universal acceptance percentage: it depends on the intended use, repair cost and agreed scope. A source-code-only delivery should not be assessed as if it promised complete training environments.
Fix and record the checking environment. If a task works only after a dependency change, retain that change and the rerun evidence. For persistent failures, identify whether packaging needs repair, tests need rewriting or original information is unavailable. When separating training and evaluation, inspect task provenance, repository derivatives and duplicate patches. Randomly splitting files does not automatically separate instances of the same problem.
The useful final deliverable is a gap register: tasks that work now, tasks that can be repaired within the agreed cost, and tasks that should be excluded. Suppliers can then explain environment preparation, task construction and process collection separately. File counts describe inventory; executable tasks and their evidence show how much work remains before training.
