A test that queries for data it did not create

A test calling first() depends on whatever happens to be in the database, which is an ordering dependency nobody wrote down.

// passes only if something else created a gold customer
$customer = Customer::where('tier', 'gold')->first();

// states its own world
$customer = Customer::factory()->gold()->create();

# and the grep that finds them all
$ grep -rn '::first()|::latest()' tests/ | grep -v 'factory()'

The failure only appears under a randomised order or in parallel, which is why these survive for years in a suite that runs sequentially. The grep is the whole audit and produces a finite list; each one is a two-minute fix and the result is a suite whose failures mean something.