WEAVE:将真实世界的代码演化编织为依赖结构任务以用于代码智能体的基准测试与训练
WEAVE: Weaving Real-World Code Evolution into Dependency-Structured Tasks for Benchmarking and Training Code Agents
AI总结:
WEAVE是将真实世界多PR代码演化转化为依赖结构任务的框架,可实现更准确的代码智能体进度测量,为其训练提供有效监督与可验证奖励。
摘要:
真实世界的软件工程很少由孤立的变更构成,功能、迁移和系统性修复往往会跨越多个拉取请求(PR)展开,需要在代码仓库中进行协调修改。然而,大多数可执行的仓库级基准测试仍将单个问题或PR作为任务单元,而现有的多PR设置则依赖于粗略的聚合和与结构无关的评估。这种不匹配会模糊变更之间的依赖关系,限制对长程代码智能体的进度测量和学习信号。我们引入WEAVE,一个将已验证的PR历史转化为可执行的、依赖结构任务的框架。WEAVE利用仓库校准的类型化变更位点,将相关PR组织为有界有向无环图(DAG),并将每个DAG实例化为统一的可执行任务。我们还引入Graph Credit,一种确定性的、基于测试的指标,用于测量与依赖一致的部分进度,并为强化学习提供密集的、可验证的奖励。在任务构建、智能体评估、监督微调以及强化学习上的实验表明,WEAVE能生成连贯的可执行任务,比平面评分实现更忠实的进度测量,并为训练代码智能体提供有效的监督和可验证的奖励。
英文摘要:
Real-world software engineering rarely consists of isolated changes. Features, migrations, and systematic fixes often unfold across multiple pull requests (PRs), requiring coordinated modifications across a repository. Yet most executable repository-level benchmarks retain a single issue or PR as the task unit, while existing multi-PR settings rely on coarse aggregation and structure-agnostic evaluation. This mismatch obscures dependencies among changes and limits progress measurement and learning signals for long-horizon code agents. We introduce WEAVE, a framework that transforms verified PR histories into executable, dependency-structured tasks. WEAVE leverages repository-calibrated typed change loci to organize related PRs into bounded DAGs and instantiate each as a unified executable task. We further introduce Graph Credit, a deterministic, test-grounded metric that measures dependency-consistent partial progress and supports dense, verifiable rewards for reinforcement learning. Experiments on task construction, agent evaluation, supervised fine-tuning, and reinforcement learning show that WEAVE yields coherent executable tasks, enables more faithful progress measurement than flat scoring, and provides effective supervision and verifiable rewards for training code agents.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。