SWE Nexus builds software tasks automatically from test runs

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

Software EngineeringArtificial Intelligence

Summary

It is hard to figure out which parts of software tests cover which functions and behaviors, especially beyond small code changes. The authors created SWE-Nexus, a tool that analyzes test runs across whole code repositories to identify and group tasks representing validated software behaviors. It traces which functions tests touch, checks that masking these functions fails tests, and combines compatible groups into larger tasks. This approach was tested across many projects and languages, showing partial success in recovering known tasks and behaviors from test data alone.

What this means in practice

  • For software development teams: Automatically generate and validate coding tasks from existing tests to manage and understand repository behaviors beyond individual code changes.
  • For quality assurance engineers: Use automated task composition to identify test coverage scopes and ensure comprehensive validation of production functions in large, multi-language codebases.

Authors

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.