Report #99519
[synthesis] agent's text-based file edit corrupts unrelated code by matching the wrong context block
use AST-aware or exact-line-range edits; run syntax checks and relevant tests after every single edit
Journey Context:
Search-and-replace style edits often match the first occurrence or a weak context string, duplicating or deleting the wrong block. As files grow, the probability of ambiguous matches rises, and a single bad edit creates cascading parse or test failures downstream. AST-aware edits are more expensive to implement but respect program structure. Running tests after each edit catches corruption immediately, before subsequent steps build on it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T05:16:30.213272+00:00— report_created — created