arXiv:2610.27784cs.SEOct 2026

Manuscript Offprint

arXiv:2610.27784

RELAY: Scaling Historical Build Restoration through Rule Reuse and Agentic Repair

Olivier Nourry, Yoshiki Higo

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

OLIVIER NOURRY, The University of Osaka, Japan

YOSHIKI HIGO, The University of Osaka, Japan

Vulnerability benchmarks and software engineering research depend on rebuilding historical software. Yet builds rely on external resources, such as base images and packages, that change independently of the source code. In this study, we examine this environment decay on 14,159 OSS-Fuzz cases. We find that 69.7% no longer complete reconstruction and verification, and that most failures share a small number of recurring failure symptoms. A recurring failure can therefore be diagnosed once and its repair reused. We present RELAY, a hybrid framework that uses an LLM to derive and validate deterministic repair rules from representative failures, reuses them without model calls, and escalates cases unresolved by rules to a per-case agent. We evaluate RELAY in human-guided and fully automated rule-derivation campaigns and compare it with a per-case agent approach. We find that rule derivation can be fully automated, and that reusable rules restore as many builds as per-case agents with fewer build executions. However, agents restore cases that the rules cannot. Our results show that a hybrid approach that applies rules first and escalates the remaining cases to an agent restores more builds than either approach alone and at a lower cost than using agents alone.

CCS Concepts: • Software and its engineering → Software evolution; Maintaining software; Software maintenance tools; • Computing methodologies → Intelligent agents; • Security and privacy → Software security engineering.

Additional Key Words and Phrases: Build repair, environment decay, build reproducibility, software benchmarks, LLM agents, AI for software engineering (AI4SE), OSS-Fuzz

1 Introduction

Rebuilding an earlier version of a software system is necessary for reproducing reported bugs, bisecting regressions, and evaluating tools on historical defects. This need is especially visible in vulnerability research. For instance, ARVO reconstructs vulnerable and fixed versions of OSS-Fuzz projects [Mei et al. 2026] and benchmarks such as CyberGym and SEC-bench depend on executable historical software [Lee et al. 2025; Wang et al. 2026]. If a case no longer builds, its vulnerability and any proposed repair cannot be evaluated through execution. Researchers must instead exclude the case or rely on indirect measures such as code similarity, which may not reflect whether a patch actually fixes the vulnerability [Zhang et al. 2026].

Rebuilding historical software is often much harder than checking out its source code. Build instructions may remain available, but they depend on resources that change independently of the target project. Base images are retired, package repositories remove old versions, toolchain installers move, and third-party download URLs disappear [Malka et al. 2026; Mei et al. 2026; Nourry et al. 2025]. A build can therefore fail years later even though its target source revision has not changed. We refer to failures caused by such changes as environment decay. Developers generally maintain the current version of a project rather than restore every historical release, leaving this work to the researchers and benchmark maintainers who depend on those releases.

Existing approaches repair build environments through reusable operations, such as Shipwright's Dockerfile repairs [Henkel et al. 2021], or through per-case language-model agents [Bouzenia and Pradel 2025; Hu et al. 2025b]. Per-case agents are flexible, but they repeat the diagnosis, patch generation, and validation process for every build. This is inefficient when the same environment failure affects many builds, since each case requires new model calls and one or more build

Authors' Contact Information: Olivier Nourry, The University of Osaka, Osaka, Japan, nourry@ist.osaka-u.ac.jp; Yoshiki Higo, The University of Osaka, Osaka, Japan, higo@ist.osaka-u.ac.jp.

Olivier Nourry and Yoshiki Higo

executions. Moreover, external dependencies continue to change, so a restored build may fail again later. A scalable approach should therefore reuse previously validated repairs where possible, while retaining per-case reasoning for failures that cannot be handled by existing rules.

In this study, we use historical OSS-Fuzz cases to examine whether reusable rules and per-case agent escalation can restore build environments efficiently at scale. These cases cover different projects, languages, dependency managers, and toolchains. Their recorded crashing inputs also let us evaluate whether a repaired environment preserves the expected historical behavior, rather than measuring build completion alone.

We investigate a hybrid approach to historical build restoration. We implement RELAY, a framework built around ARVO's historical reconstruction pipeline. RELAY converts build logs into normalized failure observations, groups related failures, and selects representative cases. An LLM uses evidence from these cases to propose a repair rule. The framework checks the permitted repair scope, applies the rule, and validates it by rebuilding the affected cases. Validated rules are stored in a registry and reused whenever their conditions hold. When a repair exposes a different failure, RELAY records the new evidence and continues from the updated build state. Cases that remain unresolved are escalated to a per-case agent.

We aim to produce rules that recognize recurring failures and express repairs that can apply across cases. A rule may pin a stable version when that version addresses a recurring compatibility or availability problem, but it should not simply encode a one-off change for a single project. The model proposes both the conditions under which a rule applies and the changes it makes. For example, several builds may fail because they refer to a retired source archive. A rule should recognize the relevant download failure and redirect the request to a supported mirror or archive without reasoning about every affected case separately.

Our study separates the prevalence of environment decay from the evaluation of repair. We first examine 14,159 historical OSS-Fuzz cases with recorded execution outcomes and find that 9,868 do not complete reconstruction and verification. We characterize the failures using the 4,513 cases for which we collected detailed failure logs. We then evaluate whether rules derived from representative failures transfer to other cases and whether their derivation can be automated. We compare rules, per-case agents, and their rule-first combination on the same failures. Finally, we test agent escalation on a separate set of cases where deterministic repair had stopped.

The paper addresses four questions:

(1) RQ1: How prevalent is build decay, and how are historical build failures distributed? Reconstruction failed for 69.7% of the 14,159 cases we executed. The failures were concentrated: 161 groups contained at least five cases and represented 71.0% of the failure-analysis dataset. We found no consistent relationship between build age and repair outcome, but outcomes varied substantially across projects.

(2) RQ2: Can deterministic repair rules repair decayed builds, and can their derivation be automated? LLM-derived rules contributed to 469 restored builds. The automated campaign contributed 238 recoveries in two weeks, compared with 231 during three months of human-guided work.

(3) RQ3: How do reusable rules and per-case agents compare in recovery, cost, and the cases they restore? Rules and per-case agents restored similar numbers of builds, but the agents used 2.3 to 3.6 times as many build executions per recovery. They also restored different cases. Combining their recorded outcomes restored 37 to 39 of the 50 cases.

(4) RQ4: Where does deterministic repair stop, and what does escalating to a per-case agent recover beyond it? Rules stopped when their edits did not fit a project’s build files or when derivation repeated variations of an unsuccessful strategy. On a subset of 57 cases that remain unresolved after rule-based repair, agents restored 17.5 to 28.1%.

This paper makes the following contributions:

  • We conduct a large-scale investigation of environment decay in 14,159 historical OSS-Fuzz cases and show that build decay is widespread and that failure causes tend to recur across unrelated cases.

  • We present RELAY, a scalable framework that derives reusable deterministic repair rules from representative failures, validates them through execution, and escalates unresolved cases to a per-case agent. It also extends historical build verification beyond C and C++.

  • We show that the framework can derive and validate reusable repair rules without human intervention and use them to restore historical builds.

  • We compare rule-based and per-case agentic build repair and show that a hybrid strategy combining the cost-efficiency of reusable rules with the flexibility of per-case agentic repairs is effective for large-scale build restoration.

  • We provide a replication package with the rule registry, failure observations, repair records, prompts and model responses, and analysis scripts. We provide a partial version for review and will release the full package upon publication.

References (34)