A factory namespace under autoload-dev, referenced by a seeder, referenced by a console command that shipped.
# the deploy runs this, correctly
composer install --no-dev --optimize-autoloader
# and the command fails
$ php artisan data:seed-demo
PHP Fatal error: Class "DatabaseFactoriesOrderFactory" not found
# which is the right failure, four months late — the command
# should never have been registered in production at all.
The failure is correct and the timing is the problem: a class that only exists in development will resolve happily on every developer machine and in CI, because both install dev dependencies. The check that catches it is running the production install in the pipeline and booting the application against it, which is one extra job and finds this entire category — including the debug-only service provider we had registered unconditionally since 2020.