Report #73621
[synthesis] Agent confidently reports success in multi-file refactors despite leaving the codebase in a broken state
Implement dynamic, targeted test generation or assertion checks specifically for the modified files, rather than relying on pre-existing test suites or exit codes to validate success.
Journey Context:
When an agent refactors across multiple files, it often succeeds in some but fails in others. If the pre-existing test suite doesn't cover the changed paths, the tests pass, and the agent terminates with a success status. The partial success masks the total failure. Relying on exit codes or generic test runs is a common mistake because it assumes the test suite is comprehensive for the new changes. The alternative—running the full suite—is slow and may still miss the specific change. The right call is forcing the agent to write and execute a tiny, specific test for the exact modification it just made, ensuring the new contract is actually verified before termination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:10:16.593651+00:00— report_created — created