arXiv:2611.02536cs.AINov 2026

Manuscript Offprint

arXiv:2611.02536

FORGE: Fault-Oriented Rework Code Generation for Executable Interlocking Assembly

Fuqiang Wang, Jiahao Fu, Ren Hefeng, Yining Qian, Chuanting Zhang, Cheng Tan, Yuwen Liu, Jingxuan Wei

ABSTRACT

Large language models have demonstrated strong capabilities in structured reasoning and code generation, yet identifying an assembly fault does not guarantee the ability to generate executable rework programs. In interlocking assemblies, a locally plausible repair program may violate blocking dependencies, omit required recovery operations, or terminate in an incorrect configuration. We identify this challenge as fault-conditioned executable rework generation, where models must jointly reason about structural failures and generate programs that restore constrained assembly states. To benchmark this capability, we introduce FORGE-Bench, containing 4,000 tasks across 26 interlocking assemblies with five assemblies held out for evaluating generalization to unseen structures. We further propose FORGE (Fault-Oriented Rework Code Generation for Executable Interlocking Assembly), a structured state-to-program framework that decomposes rework generation into Rework Structuring and Action Grounding. Rework Structuring captures fault-induced recovery dependencies, while Action Grounding maps these dependencies into state-conditioned executable actions. Experiments show that locally reasonable repair code is insufficient for reliable assembly recovery, and that connecting structural recovery reasoning with executable action realization is essential for verified target restoration.

1 INTRODUCTION

Recent large language models are increasingly extending code generation beyond software development toward structured programs for interacting with complex environments. Recent systems have demonstrated strong capabilities in structured generation, tool use, code synthesis, and long-horizon planning by translating high-level instructions into machine-readable representations and executable actions (Zhang et al., 2025; Liu et al., 2025b; Lei et al., 2025; Zheng et al., 2026). These advances make language models increasingly attractive for physical reasoning tasks, where symbolic states, discrete action interfaces, and structural constraints can be represented in a structured form (Kim et al., 2024; Black et al., 2024; Shukor et al., 2025; Bjorck et al., 2025; Chen et al., 2026). However,

Figure

Figure 1: Motivation of FORGE. Existing methods overlook structural dependencies during assembly rework, while FORGE enables executable recovery through dependency-aware reasoning.

generating a program that appears reasonable does not guarantee that it remains executable when successful execution depends on hidden dependencies among multiple operations.

Interlocking assemblies provide a setting where this limitation becomes explicit. A faulty component is rarely independent of the surrounding structure. Repairing it may require removing blocking parts, releasing locking relations, and restoring temporarily displaced components after the correction. Therefore, a valid rework program must reason not only about the faulty part, but also about the dependency chain that determines when each operation can be executed and how the final assembly state can be restored. Recent assembly-oriented systems have advanced instruction generation, hierarchical scene representation, error correction, and context-aware assistance (Yan & Mu, 2025; Li et al., 2025; Wan et al., 2024; Liu et al., 2025a; Wang et al., 2026a;b). Nevertheless, these methods primarily address forward assembly, operator guidance, or local correction rather than complete dependency-aware recovery.

We call this regime executable rework generation, where models must move beyond isolated fault identification and local repair actions toward dependency-aware programs that execute complete recovery procedures. This regime sits at the intersection of assembly reasoning, program synthesis, and symbolic planning, but none of these directions directly captures the coupled requirements of fault diagnosis, structural dependency reasoning, and target-state restoration. Assembly reasoning methods primarily focus on component relations, assembly sequences, or forward construction, but do not address recovery from faulty states (Pun et al., 2025; Wang et al., 2026a;b). Program generation methods study executable code synthesis, yet typically assume that required operations are already specified or that individual actions can be evaluated independently (Chi et al., 2025; Ahn et al., 2026; Chen et al., 2025b). Symbolic planning approaches provide constraint-aware reasoning, but rarely consider the joint problem of identifying faults and generating state-restoring programs under physical assembly dependencies (Curtis et al., 2024; Cornelio et al., 2025; Pesjak & Žabkar, 2026; Huang et al., 2025; Chen et al., 2024).

To study this gap, we introduce FORGE, short for Fault-Oriented Rework Code Generation for Executable Interlocking Assembly. FORGE formulates interlocking assembly repair as a structured state-to-program generation framework built on vanilla SFT with two complementary algorithmic modules: Rework Structuring, which captures fault-induced recovery obligations among components, and Action Grounding, which maps these obligations into executable actions, parameters, and symbolic state transitions. Given public assembly states and structural constraints, FORGE generates complete recovery programs while avoiding unnecessary intervention on assemblies that are already correct. Unlike benchmarks centered on isolated function calls, FORGE evaluates state-changing action sequences and their final verified outcomes, reflecting the growing emphasis on stateful and multi-step agent evaluation. (Patil et al., 2025; Lu et al., 2025; Chen et al., 2025a; Zheng et al., 2026; Shen et al., 2026). Our main contributions are as follows:

  • We identify and formalize fault-conditioned executable rework generation, a structured task requiring joint fault diagnosis, dependency-aware recovery planning, executable action generation, and target-state verification.

  • We introduce FORGE-BENCH, a benchmark for interlocking-assembly rework with assembly-disjoint splits, controlled fault/no-fault cases, and verifier-based evaluation of structural correctness and target-state restoration.

  • We propose FORGE, a dependency-aware framework that separates recovery into Rework Structuring and Action Grounding, enabling state-conditioned generation of executable restoration programs.