@@ -18,7 +18,20 @@ reviews:
1818 high_level_summary : true
1919 suggested_labels : true
2020 auto_apply_labels : true
21- finishing_touches : true
21+ finishing_touches :
22+ # docstrings: auto-generates Javadoc for functions changed in the PR,
23+ # then opens a follow-up PR containing only the docstring edits.
24+ docstrings :
25+ enabled : true
26+ # unit_tests: suggests unit-test stubs for new/changed methods.
27+ unit_tests :
28+ enabled : true
29+ # simplify: reviews changed code for reuse, quality, and efficiency
30+ # and applies targeted improvements (disabled by default upstream; enabled here).
31+ simplify :
32+ enabled : true
33+ # custom: up to 5 named recipes triggerable via @coderabbitai run <name>.
34+ custom : []
2235 labeling_instructions :
2336 - label : ' ⏱️ <10 Min Review'
2437 instructions : Apply for PRs with <200 lines changed
@@ -218,6 +231,45 @@ reviews:
218231 - Do not expose setters for fields that must not change after construction — use private setters or none.
219232 - `equals` and `hashCode` on entities must be based solely on the persistent identity (primary key).
220233
234+ ### Known Existing Violations — Flag on Every PR That Touches These Files
235+ The following four classes currently reside in the `domain` package but carry
236+ `jakarta.persistence.*` (or `javax.persistence.*`) imports and JPA annotations.
237+ They are in violation of the zero-framework rule above. Any PR that modifies
238+ these files WITHOUT moving the persistence mapping to the infrastructure layer
239+ must be flagged as incomplete:
240+
241+ - `AppSelfServiceUserClientMapping` — contains `@Entity`, `@Table`, `@ManyToOne`,
242+ `@JoinColumn`, and related JPA imports. The persistence mapping must be extracted
243+ into a new infrastructure-layer JPA entity (e.g., `AppSelfServiceUserClientMappingJpaEntity`)
244+ with a dedicated mapper. The domain class must be a plain POJO with only
245+ the business identity and relationship as value fields.
246+
247+ - `AppSelfServiceUser` — extends or embeds JPA-annotated state. Strip all
248+ `jakarta.persistence.*` imports and annotations. Move the `@Entity`/`@Table`
249+ definition to an infrastructure JPA entity. The domain object must express
250+ only user identity, roles, and the invariant that a self-service user is
251+ always linked to exactly one client.
252+
253+ - `SelfServiceRegistration` — carries `@Entity` and column mappings. Extract to
254+ an infrastructure JPA entity. The domain class must contain only the registration
255+ token, expiry invariant logic, and a factory method that validates inputs.
256+
257+ - `SelfBeneficiariesTPT` — annotated with JPA relationship mappings. Extract the
258+ persistence mapping to infrastructure. The domain class must express only the
259+ beneficiary identity, account reference, and the invariant that a transfer limit
260+ must be non-negative.
261+
262+ **Correct remediation pattern for each class:**
263+ 1. Create `<ClassName>JpaEntity.java` in the corresponding `starter` or
264+ infrastructure package, with all `@Entity`, `@Table`, `@Column`, `@Id`,
265+ and relationship annotations.
266+ 2. Create `<ClassName>Mapper.java` (or add to an existing module mapper) with
267+ `toDomain(JpaEntity)` and `toJpaEntity(DomainObject)` methods.
268+ 3. Update repository implementations to use the JPA entity internally and
269+ map to/from the domain object at the boundary.
270+ 4. Remove all `jakarta.persistence.*` and `javax.persistence.*` imports from
271+ the domain class. Verify no Spring imports remain either.
272+
221273 # ── HANDLER LAYER (CQRS) ──────────────────────────────────────────────────
222274 - path : ' src/main/java/**/handler/**/*.java'
223275 instructions : |
0 commit comments