- Re-run the failing test(s) multiple times (and/or with randomized order if supported).
- Determine the flake type: time, concurrency, ordering, shared state, external dependency.
- Stabilize by:
- Removing shared mutable state
- Using deterministic seeds/time control
- Hermetic fixtures/test doubles
- Reducing reliance on network/timeouts
- Add a regression test or harness that reproduces the flake deterministically if possible.
- Re-run the relevant suite and document the root cause + fix in the feature spec Debug log.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.