mir-backend-jvm-micronautlisted
Install: claude install-skill anantbhandarkar/make-it-right
# /mir-backend-jvm-micronaut · Make It Right (Micronaut)
Bottom tier of the chain: `mir-backend` (generic gates) → `mir-backend-jvm` (JVM runtime model) → **this** (Micronaut library mechanics). Run the gates first; load the JVM runtime tier for threading, GC, and container-heap concerns; reach for *this* at Gate 5 (design mechanics), Gate 6 (implementation), and Gate 7 review. **Runtime-level concerns (virtual-thread pinning, pool sizing, GC tuning, `-XX:MaxRAMPercentage`, ThreadLocal hygiene, JMM visibility) live in `mir-backend-jvm` — not here.**
**Stack assumed:** Micronaut 4.x · Micronaut Data JPA (Hibernate) or Micronaut Data JDBC · Micronaut Security · Micronaut HTTP Server (Netty) · GraalVM CE / Mandrel for native image.
## The Micronaut footguns AI walks into most
### 1. Compile-time DI — missing bean is a compile error, not a runtime NPE
Micronaut generates all DI glue at compile time via annotation processors (no runtime reflection for injection). This means:
- A missing or ambiguous bean binding fails the **build**, not the first request. This is strictly better than Spring's runtime `NoSuchBeanDefinitionException` — but AI sometimes works around compilation failures by adding `@Nullable` or suppressing errors instead of fixing the missing binding.
- Classes used only via reflection (Jackson mixins, custom TypeConverter, serialization targets for native image) are **not automatically discovered**. Register them explicitly.
```java
// WRONG — assumes runtime