Abstract

A code-repair system cannot reliably choose between alternatives if the context hides the contract that distinguishes them. RepoTwin makes that information boundary testable through paired synthetic repositories.

The Problem

Two repositories can present identical issue text and target code while requiring opposite repairs. A separate file contains the changed contract. Evaluating only the target file can therefore conceal the decisive evidence.

Our Approach

The evaluator generates 72 paired tasks across six Python code families. Each pair shares its visible target and candidate repairs, while a witness file changes which repair is valid.

Technical Execution

The stored replay records 432 top-level original and candidate execution checks across 144 repositories. Target-only, lexical, import-graph and hybrid retrieval policies are compared at four file budgets. Context serialization and side-channel checks control what the selector can observe.

Results

Target-only retrieval has a 50% conditional selection ceiling in this balanced two-candidate setup. At eight files, hybrid retrieval exposes the witness in 83.3% of pairs, giving a 91.7% ceiling. A selector may perform worse even when the witness is visible.

Verification and Limitations

A fresh replay of the extracted benchmark passed all 72 pairs, 144 repositories and 432 top-level execution checks on November 23, 2026. A separately written recorded aggregation audit checks all 20 policy-budget cells using 2,880 observation rows; it shares fixtures and labels with the benchmark. These results measure information visibility, not LLM repair accuracy, production reliability or token efficiency.

Implications

The work provides a controlled foundation for evaluating future planner, implementer and verifier agents. Instrumented model runs, tool traces and real-repository validation remain future extensions.

Supporting Evidence

The downloadable package contains the benchmark and fixture generator, original comparison tables, validation record, sanitized aggregation audit and reproduction instructions. A fresh replay of the extracted bundle passed all 72 pairs, 144 repositories and 432 execution checks on November 23, 2026.

REPRODUCTION PACKAGE

Fresh full replay passed: 72 synthetic pairs, 144 repositories and 432 execution checks. The recorded separate aggregation audit shares benchmark fixtures and labels.

Download evidence ZIP
Verify the download

SHA-256

fcfc5d204a929f4806acae01b7f446ce97eecada80f6d6c64d46c0c3303dee81
CONTINUE EXPLORINGFrom letter banks to a verifiable solutionMeasuring healthcare reform responsiblyExplore commissioned research and engineering