arXiv(opens in a new tab)cs.SEOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.20038

SWE-Nexus: Automated Composition of Software Engineering Tasks from Test Execution

Songwei Yu, Ziqi Miao, Jingxuan Xu, Junhao Fan, Haoyang Huang, Yuan Xiong, Zihang Xu, Weihao Li, Wenqiang Zhu, Yuechen Luo, Xinshun Feng, Yanan Wu, Ken Deng

Abstract

Historical code changes provide convenient task boundaries, but do not identify which production functions selected tests exercise or support composing validated behaviors beyond a single change. We present SWE-Nexus, a fully automated pipeline that constructs repository-level implementation tasks from test execution. Four construction agents select tests, adapt tracing and evaluation protocols to each repository, and generate behavioral specifications. For each selected test file, tracing records an observed execution footprint of production function bodies. A scope is retained only if all expected scoring points pass in the original repository and masking the traced bodies causes at least one failure or error. Compatible scopes are composed deterministically, with shared functions counted once and every constituent test file revalidated under the complete combined mask. The benchmark contains 600 tasks from 105 repositories across six programming languages, including 116 atomic and 484 composite tasks. We evaluate 12 models under three agent scaffolds. The best configuration resolves 37.8% of tasks in one attempt, and scope-weighted scoring measures partial recovery. SWE-Nexus enables task construction from validated behavior beyond individual historical changes.

1 Introduction

Repository-level benchmarks commonly derive tasks from historical pull requests (PRs), combining issue descriptions, code changes, tests, and execution environments (Jimenez et al., 2024; Zan et al., 2025; Badertdinov et al., 2026). As agents solve more established instances, fixed collections become less informative about their capabilities.

(a) Historical PRs

Figure

(b) SWE-Nexus

Figure 1: Task construction from historical PRs (a) and test execution (b). Edges show observed test–function associations. Deterministic composition counts shared functions once. Independent checks before and after composition require all expected points to pass originally (✓) and at least one failure or error per file under the complete mask (×).

(Deng et al., 2026). Public implementations also raise concerns about training data contamination (Badertdinov et al., 2025; Jain et al., 2025a). Informative evaluation and execution-based training therefore require a continuing supply of challenging, verifiable tasks (Pan et al., 2025; Yang et al., 2025; Jain et al., 2025b; Wei et al., 2026). Yet code and tests that appear in the same PR do not reveal which implementation each test exercises. For example, a test may exercise only some modified functions while calling unchanged helpers. Historical patch extraction can also include unrelated tests (Badertdinov et al., 2025). Human review can improve task descriptions and test suites (Deng et al., 2026), while execution tracing directly records the functions each test exercises (Rothermel and Harrold, 1997). A PR or commit captures one historical change, whereas a software

  • Equal contribution.

†^{\dagger} Corresponding author.

requirement may span files and modules.

These challenges motivate a central question:

Can we automatically construct diverse and challenging repository-level tasks beyond individual PR boundaries, with implementation scopes validated through test execution?

We introduce SWE-Nexus, a fully automated, four-agent pipeline that constructs atomic and composite implementation tasks from test execution (Fig. 1). The Selector, Trace, Validation, and Query Agents handle test selection, tracing, protocol adaptation, and specification generation, respectively. The production function bodies recorded for each test file form its observed execution footprint. An independent procedure retains a scope only when all expected scoring points pass in the original repository and masking the recorded bodies causes at least one point to fail or report an error. Each validated scope forms an atomic task. Compatible scopes from the same repository revision and environment are combined deterministically into composite tasks. Composition counts shared functions once and revalidates every constituent test file under the complete combined mask.

The evaluated solver is independent of the construction agents and receives only the behavioral specification and masked repository. Selected scoring tests and construction metadata remain hidden. The benchmark contains 600 tasks from 105 repositories, balanced across six programming languages. We evaluate 12 models under three agent scaffolds using the resolved rate for complete recovery and the scope-weighted score for partial recovery. The best configuration resolves 37.8% of tasks in one attempt. Under Claude Code, mean resolved rates decline from 55.2% on Easy tasks to 7.4% on Hard tasks. Within comparable configurations, resolved attempts generally have lower median counts of tool calls and modified files.

Our contributions are threefold:

• Automated construction. We introduce a fully automated four-agent pipeline that discovers implementation scopes from test execution. Fixed procedures validate each scope and recheck every constituent test file after deterministic composition.

• Compositional benchmark. We construct 600 tasks across six languages: 116 atomic and 484 composite tasks spanning two to nine test files.

• Evaluation. We introduce scope-weighted scoring for partial recovery, evaluate 12 models with three agent scaffolds, and analyze recorded solver activity.

References (12)

  • The distribution and network suites each report 384 passing tests
  • Produce object paths of the form /namespace/name and service DNS names of the form name.namespace.svc
  • Set or clear the appropriate conditions and annotations for configuration resolution, data-plane availability, topic readiness, and probe results
  • Public reverse() must use the active versioning scheme with ordinary reversing as a fallback and preserve query overrides
  • Accept literal or callback option values and apply custom attrs, converting numeric and boolean values to strings
  • Tooltip/dialog markup must include the expected aria-labelledby and aria-describedby links
  • Resolve string selectors and callback targets, binding callbacks to the step
  • Clicking an enabled tab must emit tabClick immediately
  • User interaction must not activate disabled panes
  • Arrow keys must move focus/selection among enabled tabs with wraparound, skipping disabled tabs
  • Preserve declared names, documentation, and namespaces
  • Record builders and datum readers/resolving decoders must supply defaults for added fields, including nested records, maps, unions, enums, bytes, and fixed values