Coding agents use generated tests to decide whether a proposed patch satisfies an issue's requirements. A suite that fails on the buggy program and passes after applying the reference patch can still accept an incorrect patch or reject a correct patch. We introduce SWEPATCHTEST, a test-generation benchmark with 619 tasks from SWE-bench Pro, SWE-bench Multilingual, and DeepSWE and 82,579 candidate patches collected from coding-agent trajectories. By replaying each suite on the buggy and patched codebases, \benchmark jointly measures issue reproduction, acceptance of correct patches, and rejection of incorrect patches. Joint Validation Rate (JVR), which requires all three criteria on the same task, exposes failures hidden by single-reference evaluation: the best-performing configuration achieves only 9.21% JVR despite reproducing the reference transition on 59.29% of tasks. We further use validation scores to select and scale demonstrations for supervised fine-tuning (SFT). The resulting training recipe approximately triples JVR and improves downstream repair across three SWE-bench benchmarks. Patch discrimination thus provides both a diagnostic measure of test quality and an execution-based signal for curating agent training data.
Figures & tables
Benchmark
F2P
Correct pool
Incorrect pool
Joint Validation
Tasks
Test scale
Multilingual
TestEval
✗
✗
✗
✗
210
Function
✗
TestGenEval
✗
✗
✓
✗
1,210
File
✗
CLOVER
✗
✗
✗
✗
845
Block/file
✗
MultiFileTest
✗
✗
✗
✗
60
Multi-file
3
SWT-Bench
✓
✗
✗
✗
1,983
Repo.
✗
TDD-Bench Verified
✓
✗
✗
✗
449
Repo.
✗
Table 1: Comparison of test-generation benchmarks.
Figure 1: Patch-discrimination profiles of coding-agent configurations on SWEPatchTest .
Figure 2: Overview of test generation, benchmark construction, and SFT in SWEPatchTest .
Model
Reference
Patch-level
Complete-task
GRR
WDR
CAR
F1
CT-WDR
CT-CAR
CT-F1
JVR
GPT-5.6-sol
59.29
88.57
50.20
64.08
47.66
28.59
35.74
9.21
Claude-Fable-5.1
65.11
83.74
62.19
71.37
34.89
30.37
32.47
7.92
Claude-Opus-5
68.17
85.91
66.76
75.13
32.47
31.34
31.89
7.11
Kimi-K3
33.12
80.24
40.64
53.95
49.43
22.94
31.34
5.98
Qwen3.8-max
49.60
84.69
61.68
71.38
32.47
30.21
31.30
5.17
Table 2: Patch-discrimination performance of representative coding agents on SWEPatchTest .
Figure 3: Patch-discrimination case study for Caddy’s default_bind option.
Configuration
SWEPatchTest
Verified
Multilingual
Pro
GRR
WDR
CAR
F1
CT-WDR
CT-CAR
CT-F1
JVR
AVG
Pass
AVG
Pass
AVG
Pass
SWE SFT
8.89
20.75
25.28
22.79
9.21
19.39
12.49
1.29
67.53
79.20
55.08
72.00
46.56
60.05
+ TestGen Supervision
39.26 +30.37
59.00 +38.25
43.98 +18.70
50.39 +27.60
13.73 +4.52
28.11 +8.72
18.45 +5.96
2.26 +0.97
69.47 +1.94
80.00 +0.80
62.05 +6.97
76.25 +4.25
48.97 +2.41
60.47 +0.42
+ Validation-guided TestGen
40.39 +31.50
64.37 +43.62
50.27 +24.99
56.45 +33.66
25.69 +16.48
31.50 +12.11
28.30 +15.81
3.23 +1.94
70.24 +2.71
80.60 +1.40
63.02 +7.94
76.33 +4.33
49.18 +2.62
60.68 +0.63
+ Scaled TestGen Supervision
41.20 +32.31
72.14 +51.39
51.62 +26.34
60.18 +37.39
31.34 +22.13
32.96 +13.57
32.13 +19.64
3.88 +2.59
71.84 +4.31
82.00 +2.80
63.30 +8.22
78.00 +6.00
50.70 +4.14
61.70 +1.65
Table 3: Test-generation and downstream repair performance across SFT configurations.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Source
Initial
Removed
Retained (%)
SWE-bench Pro
731
389
342 (46.8)
SWE-bench Multilingual
300
133
167 (55.7)
DeepSWE
113
3
110 (97.3)
Overall
1,144
525
619 (54.1)
Appendix
Table 4: Task-level curation by benchmark source.
Figure 4: Simplified system prompt for the task-curation judge.