Home / Companies / Factory / Blog / Post Details
Content Deep Dive

Finding the cause of flaky tests with coding agents

Blog post from Factory

Post Details
Company
Date Published
Author
Factory
Word Count
614
Company Posts That Month
50
Language
English
Hacker News Points
-
Post removed?
No
Summary

Flaky test triage should treat intermittent failures as a distinct engineering problem rather than repeatedly rerunning jobs until they pass, since reruns can erase valuable evidence. Coding agents can support investigations by preserving the original failing run’s logs, environment details, seeds, artifacts, and timestamps; conducting bounded, hypothesis-driven reproduction efforts; and producing reviewable changes. Effective diagnosis varies one condition at a time, such as test order, worker count, timezone, database state, or network latency, while examining common causes including shared mutable state, inadequate cleanup, fixed ports, timing assumptions, unordered data, and eventually consistent systems. Recommended fixes address the underlying causal issue through observable waits, isolated records, frozen time, deterministic cleanup, or removal of order dependence rather than merely increasing timeouts. Pull requests should document the symptom, root cause, verification commands, and repeated-run results where practical, while avoiding unrelated refactoring; temporary quarantines should have clear ownership and exit conditions. Scheduled automated checks and browser-based QA can provide additional evidence and detect recurring failures, but automation should preserve failures for investigation rather than retrying until successful.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Coding Assistant 1 341 115 55 -77%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.