arXiv cs.CL· Yuling Shi, Mingchu Zhong, Zhensu Sun, Weihan Peng, Zhi Chen, Shilin He, Chengcheng Wan, Kai Cai, Hongyu Zhang, David Lo, Xiaodong Gu·· 12 小时前AI 评分31
SpecBuild:用推测性分叉把环境搭建的等待变成并行探索
Speculative Forking: Turning Idle Wait into Parallel Exploration for Repository Environment Setup
AI 导读
SpecBuild 是一个基于 LLM 的环境搭建系统,通过推测性分叉并行探索候选搭建分支,返回首个成功提交的环境并丢弃其余分支。它在策略级和命令级两个粒度上分叉,在覆盖 40 个仓库、9 种编程语言共 334 个任务的 Multi-Docker-Eval 上,三个骨干模型的成功率比最强基线提升 6.4 至 12.0 个百分点,平均搭建时间缩短 22.4% 至 41.6%。
正文
Authors:Yuling Shi, Mingchu Zhong, Zhensu Sun, Weihan Peng, Zhi Chen, Shilin He, Chengcheng Wan, Kai Cai, Hongyu Zhang, David Lo, Xiaodong Gu
Abstract:Before developers can use a software project, they must first get it to run. This often requires installing the right language runtime, system packages, build tools, and test commands. Recent LLM-based agents automate environment setup by inspecting a repository, writing setup scripts, running them, and repairing the resulting errors. However, these agents still follow a sequential trial-and-error loop: they try one setup route, wait for slow commands to finish, observe the failure, and only then decide what to try next. Because environment commands often take long to run, this sequential workflow makes setup slow and limits exploration to one route at a time.
We present SpecBuild, an LLM-based environment setup system designed to be both faster and more successful through speculative forking. SpecBuild explores candidate setup branches in parallel, returns the first committed environment, and discards the rest. It applies this design at two granularities: strategy-level forking explores alternative setup routes, such as different base images and dependency policies, while command-level forking predicts failures of running commands and prepares repair branches before those failures are observed.
We evaluate SpecBuild on Multi-Docker-Eval, covering 334 tasks from 40 repositories and 9 programming languages. Across three backbone models, SpecBuild improves the success rate by 6.4 to 12.0 percentage points over the strongest baseline, while reducing average setup time by 22.4% to 41.6%. These results show that LLM-based environment setup need not trade speed for reliability: parallel speculative exploration can make agents both faster and more successful.
| Subjects: | Software Engineering (cs.SE); Computation and Language (cs.CL); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.33129 [cs.SE] |
| (or arXiv:2610.33129v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2610.33129 arXiv-issued DOI via DataCite |
Submission history
From: Yuling Shi [view email]
[v1]
Fri, 23 Oct 2026 13:13:56 UTC (720 KB)
来源:arXiv cs.CL · arxiv.org