Translate or Replay? Two AI-Assisted Rewrites Compared — ggblab version 1 → version 2 (n = 1) and Bun Zig → Rust: what each kept, what served as the oracle, what escaped, and what code volume measures
Abstract
Technical report comparing two software rewrites carried out with AI coding agents in 2026. Bun, a JavaScript runtime, was translated from 535,496 lines of Zig into about 780,000 lines of Rust in eleven days by about 64 concurrent agents, gated by the existing test suite; the vendor reports 19 known regressions introduced by the rewrite, since fixed, four of them described (the vendor's own account, bun.com, 8 July 2026). ggblab, a GeoGebra–Jupyter bridge written for a university course, was replayed from a corrected origin along a numbered sequence of example notebooks by one agent under the author's direction between 3 and 30 September 2026; 23,331 lines of version 1 became 6,437 lines of version 2, of which 29 % are instruments (probes and tests), and an 8-gram overlap of 0.0023 between version 2's construction type and parser (330 lines) and the version-1 parser files, in the band of the negative controls, finds no verbatim overlap for this core (the measure detects token overlap, not provenance; the rest of version 2 was not measured, and one layer was carried over by design). The report names the two methods translation (structure preserved, language changed) and replay (specification preserved, structure changed) and compares them along seven axes: what is preserved, code volume, the oracle, what escaped the oracle, parallelism and time, the human's position, and reversibility. A survey with stated inclusion predicates sets the two beside thirteen other documented AI-assisted rewrites of 2024–2026 (four translations, three replays, six framework or runtime upgrades); only one of them, Ladybird's C++ to Rust port of its JavaScript front end, publishes both the size of its oracle and its regression count. Three observations follow: code volume is a dependent variable of the method and must be reported with the predicate that defines the counted set; translation keeps what the old code did silently, which is where its regressions came from, while replay does not carry the silent behaviour of the code it does not copy, and its heaviest review finding lived in the one layer it carried over and in a new adapter written for that layer; and the choice between the two is decided by whether an oracle for 'the output has not changed' exists and whether a failure is reversible. The comparison is descriptive; no ranking of the two methods is intended. The ggblab side is a single case by the author; every number is traceable to a dated record and, where it was computed, to a script named in the report. Section 2.2 defines the copy-distance measure (directed n-gram containment with a planted-derivative calibration) and gives its pseudocode. The text was reviewed against its sources by two AI reviewers of different families (Claude Opus 5.5, then GPT-6 Sol) and revised after each, then revised once more by the author, before deposit; the two reviews, the three records of changes, and the figure scripts with their outputs are deposited with the report. An AI usage disclosure is included.