Report #96861
[synthesis] Agent makes micro-patches to fix a failing test while ignoring architectural drift because other tests pass
When a test fails, require the agent to verify the failing test against the original requirement, not just the codebase. If the fix requires patching more than 2 distinct files to make one test pass, halt and force a step-back architectural review.
Journey Context:
Agents treat test suites as the absolute ground truth. If 9 out of 10 tests pass, the agent assumes the architecture is 90% correct and the 1 failure is an edge case. However, in agent-generated code, passing tests often only prove the agent successfully overfitted to the test harness, while the failing test indicates a fundamental invariant violation. Agents will loop trying to patch the symptom, leading to spaghetti code. The synthesis is that high test pass rates in agent workflows are often inversely correlated with architectural soundness if the agent wrote both the code and the tests.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:09:53.146459+00:00— report_created — created