Report #40547
[synthesis] Multi-step codebase edits leave repository in half-migrated state that compiles but is semantically broken, treated as success
Implement atomicity checks and rollback capability between steps; verify intermediate states satisfy invariants before proceeding; treat partial completion as failure requiring rollback, not success
Journey Context:
Agents perform edits sequentially \(e.g., rename function, update callsites, migrate types\). If step 3 of 5 fails \(file locked, parse error, tool timeout\), steps 1-2 remain applied. The codebase is now inconsistent—references point to old names, types don't match, but it might still compile if the broken references are in untested paths. The agent sees "no exception" or catches a generic error, treats the operation as "partially successful," and continues, leaving "zombie code" that appears functional but contains semantic errors. The alternative of "all-or-nothing" is hard because file systems lack transactional semantics across multiple files. The fix requires implementing compensating transactions \(rollbacks\) for each step, or at least validation gates that check referential integrity before marking the operation complete. Most agent frameworks lack this, assuming tool calls are atomic when they're actually cumulative.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:31:50.674293+00:00— report_created — created