Fail the build when a repository package is missing from the scan

TestSecurityService
Shipped
August 3, 2026 at 3:16 PM UTC
Author
Kamo
Commit
a2bcf71

This service has @ComponentScan("com.kamo") but an EXPLICIT @EnableJpaRepositories list. The moment a bean here needs a repository outside that list, the repository has no bean, the bean needing it cannot be built, and the context fails to start — the service CrashLoops and takes its whole function with it. It has happened twice. **************** CrashLooped two deploys. Then today com.kamo.z.shared.mfa.repos took EVERY LOGIN on the platform offline. Warning comments were already in SecurityServiceApplication both times; a comment cannot fail a build. Verified by mutation against the real incident: deleting the "com.kamo.z.shared.mfa" entry makes this test fail and name com.kamo.z.shared.mfa.repos. It would have caught today's outage before it shipped. Static rather than a @SpringBootTest deliberately. Booting the context here connects to the PRODUCTION database, so a context test would either migrate production or need infrastructure that does not exist. Worth noting that SecurityServiceApplicationTests nominally exists but sits in package com.retval.SecurityService, cannot find a @SpringBootConfiguration, and therefore asserts nothing — it is the guard everyone assumes is there and it has never run.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing