arXiv:2610.17224cs.LGOct 2026

Manuscript Offprint

arXiv:2610.17224

CodeLift: Your Test Suite Is Secretly a Dense SWE Curriculum

Junjielong Xu, Huachao Zhu, Alyssa Wu, Zhichao Hu, Pinjia He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

The pass-all-test binary reward has become a standard recipe for training software engineering agents, but its sparsity eliminates difference of partially correct patches. The test pass-rate is a natural alternative. However, we find that it is not a reliable indicator of patch quality. A functionality being tested can be covered by either one challenging test or one hundred trivial tests, where the majority might be already satisfied pass-to-pass tests. We introduce CodeLift, a reinforcement learning method that dynamically calibrates pass-rate rewards, turning the test suite into an adaptive curriculum. At each iteration, CodeLift groups tests that kill the same patches and patches that pass the same tests, then gives more weight to test groups that fewer patch groups pass. This reduces the impact of majority simple tests and focuses more on what is still challenging. Within each rollout, CodeLift applies the same scoring rule to repository snapshots, assigning credit to useful actions even when later ones introduce regressions. Experiments on SWE benchmarks show that CodeLift consistently improves pass@1/2/4/8 over binary and pass-rate baselines. Analyses show that CodeLift provides dense, stable learning signals and unlocks the inherent curriculum in the test suite.

1 INTRODUCTION

Large language model (LLM) agents have made notable progress in software engineering (SWE) (Jimenez et al., 2024; Jain et al., 2025), where reinforcement learning with verifiable rewards (RLVR) served as a key contributor (Zeng et al., 2026; Xu et al., 2026). To solve an issue, the SWE agents typically navigate the repository, edit code, and run tests, where the final patches are used as the final answer to be verified. The standard recipe uses pass-all-test as a verifier, providing binary reward based on whether the final patch passes all hidden tests. While it is sound, its binary value is too sparse to distinguish the patches that partially resolve the issue from those that break existing functionality. Thus, on challenging problems where all patches in a rollout group for the same issue fail, there is no learning signal from relative advantage, making training inefficient.

The test pass-rate is a natural denser alternative. However, a higher pass-rate does not always mean a better patch. In competitive programming, recent studies show that the pass-rate does not achieve a higher performance ceiling than the binary reward, as it may reinforce shortcuts (e.g., brute-force heuristics) (Li et al., 2026). In SWE agentic coding, we find it even worse, as the pass rate may eventually lead to collapse (Figure 3). We identify three test-weighting imbalances behind such miscalibration. (1) Multiplicity imbalance: In practice, different test cases may check the same functionality and fail together when it is violated. A patch with a higher pass rate may fix only a few functionalities covered by many tests, while breaking many others covered by fewer tests. Thus, such test multiplicity can introduce reward biases, as a patch satisfying fewer functionalities might get more rewards. (2) Progress-regression imbalance: Most repository tests are regression tests that already pass and protect existing functionality (Rothermel & Harrold, 1997) (pass-to-pass, P2P), while only a few hidden tests initially fail and check the requested progress (fail-to-pass, F2P). Under pass-rate rewards, the penalty for introducing P2P regressions can outweigh the reward for progress on F2P tests, discouraging agents from making changes. (3) Difficulty imbalance: Pass

∗^{*}Work was done in Tencent HY.

rate assigns equal weight to tests of different difficulty. When easy tests dominate the suite, a patch can get a high reward while still failing the challenging ones. In contrast, the progress on the hard tests can only affect a small proportion of the total reward.

Figure

Figure 1: Overview of CodeLift. [Top] Behavior balancing: groups tests and patches by their outcomes, weights test groups by the patch groups they kill, and scores patches using these weights. [Bottom] Snapshot slicing: uses self-tests to select candidate checkpoints, scores intermediate snapshots and combines the snapshot deltas Δi\Delta_i with final advantage AfinalA_{\text{final}} to obtain slice advantage AiA_i.

We introduce CodeLift, a reinforcement learning method that dynamically calibrates pass-rate through behavior balancing at each training step. The core idea is to use observed behavior of tests and patches to reduce pass-rate's weighting imbalance by grouping tests killing the same patches and patches passing the same tests. Inspired by mutation testing theory (DeMillo et al., 1978), CodeLift uses different patch groups as empirical contrast sets, and estimates each test group's current difficulty by the fraction of patch groups they kill. After that, it normalizes these weights across test groups, and then computes each patch's reward as the sum of the weights of the groups it passes. This process naturally introduces an adaptive curriculum: all-pass tests and all-fail tests are classified to two distinct groups, while tests with distinguishable behaviors are classified into separate groups. As the policy improves during training, CodeLift updates the groups and their weights, giving less weight to easier groups and more to harder ones. For example, all-pass tests receive zero weight, with the remaining weights renormalized to keep scores in [0, 1] and keep weight sum to 1. If some patches later regress, the affected tests regain weight, rewarding patches that still pass and lowering the relative advantages of those that fail.

CodeLift further refines credit assignment through snapshot slicing, applying the same scoring rule used for final patches to intermediate repository states. The intuition is: when agents test their edits, they might be checking whether current changes work, making self-testing a natural checkpoint for evaluating the progress so far. If a rollout ended at that point, its cumulative edits would form a candidate final patch. CodeLift compares the snapshot's score with the final patch's score, adding the relative difference to the final advantage for the corresponding slice. Thus, it can assign credit to intermediate actions with progress even when later steps introduce regressions.

We evaluate CodeLift on SWE-bench Verified (Jimenez et al., 2024) and SWE-bench Pro (Deng et al., 2025) Python subset, using Qwen3-30B-A3B-Instruct-2507 (Qwen3) (Team, 2025) trained on R2E-Gym (Jain et al., 2025). CodeLift consistently outperforms binary and enhanced pass-rate reward baselines across pass@1/2/4/8, with gains ranging from 2.75 to 7.40 on Verified and from 0.22 to 4.51 on Pro. Our analyses show that CodeLift provides denser learning signals, more balanced rewards, and adaptive curriculum driven by the policy's test behavior at each training step.

Our contributions are as follows:

  • We identify three potential sources that miscalibrate pass-rate rewards for SWE agents: (1) multiplicity imbalance, (2) progress–regression imbalance, and (3) difficulty imbalances.

  • We introduce CodeLift with two key components: (1) behavior balancing and (2) snapshot slicing, which turns test results into dense rewards with adaptive curriculum and credit assignment.

• We show CodeLift’s consistent gains over binary and enhanced pass-rate baselines on SWE benchmarks, and provide detailed analysis for its characteristics.