flakerad.

field notes / case log

The flake leaves a trail.

Short reports from the moment a probabilistic failure becomes an inspectable system.

001 / random input

Same test, different random.

A fixed seed collapsed the failure rate from 75% to 0%. The flakiness is caused by non-deterministic random inputs.

Diagnosis: non-deterministic input.

remediation: Seed random generators explicitly (e.g. faker.seed(1234)) or mock Math.random using jest.spyOn(Math, 'random').mockReturnValue(...).

002 / race condition

The callback arrived before the assertion.

Freezing the clock eliminated failures (100% -> 0%). The flakiness is caused by timing sensitivity or asynchronous race conditions.

Diagnosis: timing/race condition.

remediation: Replace arbitrary setTimeout/sleep with condition-based polling (e.g. waitFor()) or explicit event promises.

003 / shared state order

Shared state contamination across sibling suites.

Isolated order execution eliminated failures (100% -> 0%). The flakiness is caused by test-order execution or shared module state.

Diagnosis: test-order/shared-state dependency.

remediation: Isolate module singletons and clean up shared global state in beforeEach/afterEach hooks.

004 / environment flaky

Ephemeral service degradation under host volatility.

None of the four controlled conditions (fixed seed, frozen clock, isolated order) stabilized the test. Baseline failure rate was 50% and failures persisted across all controls. The failure is environment-dependent (external network, host state, or hardware). Flagged for manual review.

Diagnosis: environment-dependent, flag for manual review.

remediation: Check external network latency, database connection pools, or local port collisions. Mock external service dependencies.