REVIEW 3 major objections 5 minor 30 references
Pull Requests as a Training Signal for Repo-Level Code Editing
T0 review · 3 major / 5 minor · reviewed 2026-08-03 · deepseek-v4-flash
Pith's one-line read Training on 2 million verified pull requests lets a 32-billion-parameter code model outperform larger agent-driven systems at repository-scale bug fixing, without complex inference loops.
desk verdict A well-engineered dataset and training recipe whose central internalisation claim currently hinges on an unproven disjointness between its SFT origins and the SWE-bench test sets. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the Clean-PR corpus in Search/Replace format: each edit is represented by a minimal, unique anchor of contiguous source text (the SEARCH block) and the replacement text (the REPLACE block), plus the linked GitHub issue description that supplies the original problem statement. The verification step is the load-bearing mechanism: a round-trip check applies the generated blocks back to the base repository and requires a bit-wise match to the reconstructed post-merge state, guaranteeing that every training example is deterministic and anchored to a unique context rather than to fragile line numbers. A second mechanism is error-driven augmentation during SFT, which injects d
What would settle it
Take the same Clean-PR-trained checkpoint and evaluate it under a full agentic or retrieval-heavy scaffold (for example, giving it all files or a search tool) versus the simplified protocol: if the 12–13 point gain over the instruct baseline shrinks or disappears when the simplified scaffold is removed or swapped, the capability is not internalised in the weights alone. A simpler companion check: apply the identical training recipe to a substantially smaller base model; if the gains do not appear, the claim that the data pipeline alone internalises the skill is weakened.
Extended reading notes
Core claim
The paper's central claim is that repository-level editing capability can be internalised into model weights through mid-training on verified pull-request data. Concretely, it shows that a 32-billion-parameter code model, after mid-training on 2 million verified Search/Replace pull requests and an agentless-aligned SFT with error-driven augmentation, achieves 24.3% pass@1 on SWE-bench Lite and 30.6% on SWE-bench Verified, outperforming the instruction-tuned baseline by 13.6 and 12.3 absolute points and surpassing two 72B open-source systems at 22.0/30.2. The authors argue this demonstrates that the locate-navigate-edit workflow can be baked into model weights rather than relying on iterative
Load-bearing premise
The central claim assumes that the simplified inference scaffold (top-3 file retrieval, fixed prompts, greedy decoding) contributes little to the measured gains, so the improvement can be attributed to the training data and the model's weights; the paper does not compare the same trained model under a stronger or more complex scaffold.
Editorial extensions
If this is right
- Performing well on repository-level tasks does not require multi-turn agent loops; a linear locate-navigate-edit protocol is enough if the model has been mid-trained on verified editing data.
- Training on verified Search/Replace edits improves general coding ability: the mid-trained model gains +5.7 on HumanEval and +3.6 on LiveCodeBench, while a diff-based baseline suffers catastrophic forgetting (-6.5 on HumanEval).
- Multi-language mid-training adds value beyond Python alone: with similar token budgets, the all-language corpus improves Lite from 22.3 to 24.3 and Verified from 27.8 to 30.6 over the Python-only model.
- Pass@1 substantially understates the model's capability: sampling 10 patches raises resolution to 37.5% Lite and 41.5% Verified, suggesting a lightweight reranker or verifier can unlock further gains without agentic training.
- Error-driven augmentation with hard negatives is necessary for robustness: removing it drops pass@1 from 24.3 to 21.8 (Lite) and 30.6 to 27.4 (Verified).
Reading between the lines
- My inference: if these gains replicate on other base models, data construction and verification could substitute for model scale and test-time compute, making strong repository-editing capability substantially cheaper to produce.
- My inference: the paper's comparison does not isolate the scaffold's contribution—the simplified inference protocol includes top-3 file retrieval and fixed prompts, so part of the measured gain may come from the harness rather than the weights; a same-model ablation with a richer scaffold would settle this.
- My inference: the verified Search/Replace transformation is a general recipe: the same reconstruction-and-round-trip pipeline could turn other noisy edit corpora (commits, merge requests, downstream patches) into verifiable training signal for editing tasks beyond bug fixing.
- My inference: a direct testable extension is to run the same trained weights inside a full agentic environment; the mid-training hypothesis predicts the model should outperform its instruct baseline there too, while the paper explicitly leaves that comparison to future work.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes Clean-PR, a large-scale data-construction pipeline that converts raw GitHub pull requests into verified Search/Replace edit blocks, and a two-stage training recipe (mid-training on Clean-PR, then agentless-aligned SFT with error-driven augmentation). The authors report that a Qwen2.5-Coder-32B model trained with this recipe improves SWE-bench Lite pass@1 from 10.7% (instruct baseline) to 24.3% and SWE-bench Verified from 18.3% to 30.6%, and they interpret these gains as evidence that repository-level editing capability can be internalised into model weights under a simplified, agentless inference protocol.
Significance. If the results hold, the paper makes two useful contributions. First, the Clean-PR corpus is large, verified by round-trip patch application, and the decontamination protocol for the PR corpus is detailed; the Search/Replace format and issue-linkage ablations are informative. Second, the two-stage training recipe is reproducible in principle: exact prompts, hyperparameters, and dataset statistics are given. The central claim — that strong SWE-bench performance can be obtained without heavy agentic scaffolding — is practically important. However, the evidence is currently weakened by a gap in the SFT data provenance: the SFT set is built from benchmark-derived trajectories (SWE-rebench, SWE-Gym, SWE-bench-Live), and no decontamination is reported for those 53k+ instances. This must be resolved before the headline numbers can be interpreted as evidence of general internalisation rather than benchmark-adjacent memorisation.
major comments (3)
- [§2.2 / Table 5 / Appendix A.6] The SFT dataset is built from 'verified trajectories from SWE-rebench ... and SWE-Gym', and Table 5 lists the Origin sources as SWE-bench-Live, SWE-rebench, and SWE-Gym. The detailed decontamination protocol in Appendix A.6 (repo blocklist, SHA-256 exact-file matching, 15-gram overlap, 0.5 Jaccard filtering) is described only for the Clean-PR corpus. No comparable decontamination is reported for the 18,891 + 17,763 + 16,564 Origin SFT instances or the 21,864 error-augmented examples. Since SWE-rebench and SWE-Gym are derived from SWE-bench-style repositories and tasks, any overlap (by instance_id, repository, or gold patch) with SWE-bench Lite/Verified would let the SFT stage train directly on near-test problems, invalidating the 24.3%/30.6% numbers as evidence of internalised capability. The paper must either prove disjointness of the SFT origin data from the evaluation sets or retrain
- [§3.1 / §3.2 / Appendix D] The central claim is that improvements are 'internalised into model weights' under a simplified agentless protocol. The experiments compare training data settings within one fixed scaffold (three prompts, top-3 file retrieval, greedy decoding), so the relative gains over the instruct baseline are attributable to training. But the absolute-level interpretation ('without relying on heavy inference-time scaffolding') is not isolated: there is no comparison of the same trained model under a full Agentless-style scaffold or with retrieval/prompt components removed. For example, top-3 retrieval could be doing much of the localisation work. A concrete ablation — vary top-k (e.g., 1, 3, 5, full repo tree) and compare with a full Agentless baseline on the same checkpoint — would clarify how much of the final pass@1 is weight-internalised versus scaffold-assisted. Without this, the stronger wordin
- [Table 7 / §3.2] Table 7 compares Clean-PR against SWE-Gym, Lingma-SWE, and SWE-Fixer, with results 'copied from the original paper.' These systems use different base models (32B vs 72B), different scaffolds (OpenHands, SWESynInfer, SWE-Fixer), and possibly different sampling/decoding settings. As an external context this is fine, but the text draws a strong conclusion ('outperforms the 72B baselines ... confirms that rigorous mid-training bridges the scaling gap'). To support that claim, the comparison should be made under matched evaluation conditions, or at least the pass@1 settings (greedy vs sampling, number of samples, repository-state handling) should be reported for each external method. Otherwise this is not a controlled comparison and should be framed as indicative rather than confirmatory.
minor comments (5)
- [§3.2] The text says 'Base + SFT ... achieves only 10.3% on Lite and 17.6% on Verified', but Table 6 reports 11.3% on Lite and 17.6% on Verified. The Lite number is inconsistent; please correct.
- [Appendix A.6] The decontamination thresholds (15-gram overlap, 0.5 Jaccard) are stated but not justified. Since these are free parameters, a short sensitivity analysis or a citation to a standard protocol would strengthen the claim that partial-match leakage is excluded.
- [Table 7] Please clarify whether the external baseline numbers are greedy pass@1 or best-of-n pass@1. If they use different inference budgets, the comparison in the text should be adjusted.
- [Table 16] The field 'is use windows' appears to be a typo; presumably it should be 'is_use_windowing' or similar. Also, the release schema does not include the exact date/commit of the crawled base code, which would help reproducibility.
- [Abstract / Table 1] The abstract says 'largest publicly available corpus of 2 million pull requests', while Clean-PR-full contains 3,050,939 and Clean-PR-train 2,015,708. Please be explicit about which corpus is being released and released size.
Circularity Check
No circularity: Clean-PR mid-training signal is independent of SWE-bench and decontaminated; benchmark-derived SFT is a shared control, not a constructed prediction.
full rationale
The paper's claimed derivation chain is not circular. The mid-training corpus is built from raw GitHub PRs with an independent verification pipeline (Algorithm 1), not from SWE-bench labels; Section 2.1 and Appendix A.6 explicitly blocklist SWE-bench repositories and apply content-based decontamination (SHA-256 file matching, 15-gram overlap, Jaccard filtering) to the PR corpus. The SFT stage uses benchmark-derived trajectories (Table 5: SWE-bench-Live, SWE-rebench, SWE-Gym), but this SFT set is applied identically to the Base+SFT and StarCoder2-style baselines, so the reported 13.6/12.3 point gains isolate the Clean-PR mid-training variable rather than reducing to a fitted benchmark label. The simplified Agentless scaffold is a fixed, deterministic evaluation protocol, not a fitted parameter or a predicted quantity; aligning SFT to it is a standard train/evaluation distribution choice, not a circular reduction. No load-bearing self-citation was found: citations to Qwen-Coder, Agentless, SWE-Gym, and SWE-rebench are external works, not prior results by the same authors invoked to force the paper's conclusion. The only noteworthy caveat is an omitted proof rather than circularity: Appendix A.6 does not state that the 53,218 Origin SFT instances were decontaminated against SWE-bench Lite/Verified, and SWE-Gym/SWE-rebench are SWE-bench-adjacent. If such overlap existed it would threaten attribution of the absolute Pass@1 numbers, but it would not make the Clean-PR-versus-baseline comparison circular, and the central data-construction claim remains supported by the independently decontaminated open-source PR signal.
Assumptions & free parameters
free parameters (6)
- Core-extension and Allowed-file rules (12 languages) =
Defined in Table 12
- PR length heuristics (title >= 10 chars, description >= 20 chars)
- Repository sampling cap: max 2,000 PRs per repo =
2000
- Max core files <= 5 for Clean-PR-train =
5
- Top-3 file retrieval in SFT/evaluation scaffold =
3
- 15-gram overlap and 0.5 Jaccard decontamination thresholds =
15-gram, 0.5
assumptions (5)
- domain assumption GitHub PR merge status and bot heuristics are reliable proxies for data quality.
- domain assumption The raw PR patch, when applied via git apply with fallback flags, correctly reconstructs the true 'after' repository state.
- domain assumption Uniqueness of a Search/Replace block within a file is sufficient to guarantee unambiguous application during model training and evaluation.
- domain assumption Qwen2.5-Coder-32B-Base is a representative base model for repository-level editing.
- domain assumption SWE-bench Lite and Verified are contamination-free with respect to the Clean-PR corpus after the described decontamination.
Cite this review
Pith. "Pith review of Pull Requests as a Training Signal for Repo-Level Code Editing." pith.science (2026). https://pith.science/paper/VTPOX5ZN
@misc{pith2026260207457,
author = {Pith},
title = {Pith review of: Pull Requests as a Training Signal for Repo-Level Code Editing},
year = {2026},
howpublished = {\url{https://pith.science/paper/VTPOX5ZN}},
note = {Machine review of arXiv:2602.07457}
}
read the original abstract
Repository-level code editing requires models to understand complex dependencies and execute precise multi-file modifications across a large codebase. While recent gains on SWE-bench rely heavily on complex agent scaffolding, it remains unclear how much of this capability can be internalised via high-quality training signals. To address this, we propose Clean Pull Request (Clean-PR), a mid-training paradigm that leverages real-world GitHub pull requests as a training signal for repository-level editing. We introduce a scalable pipeline that converts noisy pull request diffs into Search/Replace edit blocks through reconstruction and validation, resulting in the largest publicly available corpus of 2 million pull requests spanning 12 programming languages. Using this training signal, we perform a mid-training stage followed by an agentless-aligned supervised fine-tuning process with error-driven data augmentation. On SWE-bench, our model significantly outperforms the instruction-tuned baseline, achieving absolute improvements of 13.6% on SWE-bench Lite and 12.3% on SWE-bench Verified. These results demonstrate that repository-level code understanding and editing capabilities can be effectively internalised into model weights under a simplified, agentless protocol, without relying on heavy inference-time scaffolding.
Figures
Figures from the paper (1 more)
Reference graph
Works this paper leans on
-
[1]
Automation and Bot Filtering.We exclude PRs cre- ated by automated tools or where the only activity comes from bots. A user is classified as a bot if their username matches any of the following regular expressions: •Suffix Patterns:bot$, bot$,-bot$ •Prefix Patterns:ˆbot • Specific Services: dependabot, renovate, github-actions, travis-ci, circleci, covera...
-
[2]
Jiang, Z., Ren, X., Yan, M., Jiang, W., Li, Y ., and Liu, Z
URL https://openreview.net/forum? id=7evvwwdo3z. Jiang, Z., Ren, X., Yan, M., Jiang, W., Li, Y ., and Liu, Z. Issue localization via llm-driven iterative code graph searching, 2025. URL https://arxiv.org/abs/ 2503.22424. Jimenez, C. E., Yang, J., Wettig, A., Yao, S., Pei, K., Press, O., and Narasimhan, K. R. SWE-bench: Can language models resolve real-wor...
arXiv 2025
-
[3]
We exclude PRs that: • Missing Base Code or Diff:PRs with empty base code files or missing diffs are filtered out
Structural Integrity Checks.We strictly enforce that the PR represents a clean, in-place modification of existing code. We exclude PRs that: • Missing Base Code or Diff:PRs with empty base code files or missing diffs are filtered out. • Mismatched Files:Have a discrepancy between the set of files in the base state and the files in the diff (i.e., bijectiv...
-
[4]
The dividing line:=======
-
[5]
Wei, J., Durrett, G., and Dillig, I
URL https://openreview.net/forum? id=OJd3ayDDoF. Wei, J., Durrett, G., and Dillig, I. Coeditor: Leveraging con- textual changes for multi-round code auto-editing, 2024a. URLhttps://arxiv.org/abs/2305.18584. 10 Pull Requests as a Training Signal for Repo-Level Code Editing Wei, Y ., Wang, Z., Liu, J., Ding, Y ., and Zhang, L. Magi- coder: Empowering code g...
arXiv 2020
-
[6]
Association for Computational Linguistics. ISBN 979-8-89176-256-5. doi: 10.18653/v1/2025.findings-acl
-
[8]
URL https://openreview.net/forum? id=MhBZzkz4h9. Zeng, Y ., Cao, J., Li, Z., Yu, W., Ye, Z., Xiang, D., Hua, T., Liu, X., Gao, S., and Yu, T. Hyperedit: Un- locking instruction-based text editing in llms via hyper- networks, 2025. URL https://arxiv.org/abs/ 2512.12544. Zhang, J., Panthaplackel, S., Nie, P., Li, J. J., and Gligoric, M. Coditt5: Pretraining...
arXiv 2025
-
[10]
• Title Blocklist:We remove maintenance PRs containing keywords: bump, dependencies, dependency,depend,release
Metadata and Quality Constraints.We filter PRs based on status and textual content to ensure semantic rele- vance: • Status:The PR must be marked as MERGED or APPROVED. • Title Blocklist:We remove maintenance PRs containing keywords: bump, dependencies, dependency,depend,release. • Description Blocklist:We remove descriptions con- tainingqwiet(indicating ...
Show all 30 references
-
[12]
Ground-Truth Reconstruction (Fake Git Apply).We reconstruct the “After” state using a git sandbox to handle context fuzzy-matching
-
[13]
Initialise a temporary git repository with the base code
-
[14]
Added check
Apply the diff hunk using git apply with fallback strategies: •--verbose 14 Pull Requests as a Training Signal for Repo-Level Code Editing RAW INPUT: PR #456 (Developer) Title: Fix null pointer exception Description: Fix issue #42. Added check. Files: src/main.py Comment: Agre...
-
[15]
If success- ful, the result defines theexpected content
If the application fails, the PR is discarded. If success- ful, the result defines theexpected content
-
[16]
Minimal Unique Context Search.We identify edit spans by computing the difference between the base and the reconstructed target files. To generate SEARCH blocks that are both concise and unambiguous, we employ an iterative expansion strategy: • Edit Merging:Adjacent edits (sepa...
-
[17]
round-trip
Round-Trip Verification.We validate the generated blocks by performing a strict “round-trip” application using simple string replacement, independent of git. A training instance is retained only if it passes three integrity checks:
-
[18]
Uniqueness:Each generated SEARCH block must be found exactly once in the base file
-
[19]
Non-Overlapping:Multiple edit blocks within the same file must not have overlapping search regions
-
[20]
Exact Reconstruction:Applying the Search/Replace blocks to the base file via string replacement must yield a file that isbit-wise identicalto the ground- truthtarget contentderived in Step 1. A.5. Context Windowing Strategy For files exceeding the token limit (e.g., 100k token...
-
[21]
Identify Ranges:Extract line ranges [start, end]cov- ered by verified Search/Replace blocks
-
[22]
Expand:Extend each range by N= 20 lines to cap- ture local definitions
-
[23]
This ensures the model sees the necessary context for the 15 Pull Requests as a Training Signal for Repo-Level Code Editing edit without processing the entire file
Merge & Reconstruct:Merge overlapping ranges and concatenate them, inserting markers for omitted sections. This ensures the model sees the necessary context for the 15 Pull Requests as a Training Signal for Repo-Level Code Editing edit without processing the entire file. A.6. ...
-
[24]
Any Pull Request originating from or targeting these repositories is structurally discarded
Repository-Level Exclusion.As a primary defence, we strictly blocklist all repositories present in the SWE-bench Lite and Verified metadata. Any Pull Request originating from or targeting these repositories is structurally discarded
-
[25]
depen- dency
Content-Based Decontamination (Addressing Code Movement).Relying solely on repository names is insuf- ficient due to the prevalence of code cloning and vendored directories. To mitigate this, we implement content-aware filtering: • Exact File Matching:We compute SHA-256 hashes...
2023
-
[26]
The start of search block:<<<<<<< SEARCH
-
[27]
A contiguous chunk of lines to search for in the existing source code
-
[29]
The lines to replace into the source code
-
[30]
If you would like to add the line ’ print(x)’, you must fully write that out, with all those spaces before the code! Wrap the *SEARCH/REPLACE* edit in blocks‘‘‘python...‘‘‘
The end of the replace block:>>>>>>> REPLACE Here is an example: ‘‘‘python ### mathweb/flask/app.py <<<<<<< SEARCH from flask import Flask ======= import math from flask import Flask >>>>>>> REPLACE ‘‘‘ Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If...
-
[62]
findings-acl.62/
URL https://aclanthology.org/2025. findings-acl.62/. Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K. R., and Press, O. SWE-agent: Agent- computer interfaces enable automated software engineer- ing. InThe Thirty-eighth Annual Conference on Neural Infor...
2025
-
[2024]
Kocetkov, D., Li, R., allal, L
URL https://openreview.net/forum? id=VTF8yNQM66. Kocetkov, D., Li, R., allal, L. B., LI, J., Mou, C., Jernite, Y ., Mitchell, M., Ferrandis, C. M., Hughes, S., Wolf, T., Bahdanau, D., Werra, L. V ., and de Vries, H. The stack: 3 TB of permissively licensed source code.Transac-...
2023
-
[2025]
Golzadeh, M., Legay, D., Decan, A., and Mens, T
URL https://openreview.net/forum? id=nMpJoVmRy1. Golzadeh, M., Legay, D., Decan, A., and Mens, T. Bot or not? detecting bots in github pull request activ- ity based on comment similarity. InProceedings of the IEEE/ACM 42nd International Conference on Soft- ware Engineering Wor...
2020
-
[8856]
Li, Z., Lu, S., Guo, D., Duan, N., Jannu, S., Jenks, G., Majumder, D., Green, J., Svyatkovskiy, A., Fu, S., and Sundaresan, N
URL https://openreview.net/forum? id=pxpbTdUEpD. Li, Z., Lu, S., Guo, D., Duan, N., Jannu, S., Jenks, G., Majumder, D., Green, J., Svyatkovskiy, A., Fu, S., and Sundaresan, N. Automating code review activi- ties by large-scale pre-training. InProceedings of the 30th ACM Joint ...
2022
Reviewed August 3, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.