Report #87377
[synthesis] Agent makes catastrophic code changes to fix a flaky test because it assumes all test failures are deterministic, leading it to rewrite unrelated, correct code to match the flaky test's random output.
Run the test suite multiple times before allowing the agent to act on a failure, and explicitly tag flaky tests in the agent's context so it knows to ignore non-deterministic failures.
Journey Context:
Agents operate under the assumption that the environment is deterministic. If a test fails once due to timing, the agent treats it as a hard constraint. It will read the test, see the expected output, and mangle the production code to produce that specific output on that specific run. This turns a minor infra issue into catastrophic codebase corruption. The agent's confidence is high because it fixed the test, masking the total failure of its logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:14:58.091186+00:00— report_created — created