refactor: 각 어댑터터별 리펙토링 진행

This commit is contained in:
DongHyeonka
2026-08-24 18:26:40 +09:00
parent e98b56eb03
commit 0137263441
439 changed files with 31935 additions and 4719 deletions
@@ -31,12 +31,19 @@ design package's assumed module layout onto this leaf lives in
## Allowed
- No project dependency at all. The registry entry's `allowed_dependencies` is `[]`, matching what
the build actually uses; `application-core` and `shared-contract` were listed and unused, which is
a permission granted in advance for an adapter nobody has approved yet.
- `runtime_memberships` is `[]` and no composition root depends on this leaf. Property-only
activation switches on a module that is already on the classpath; it does not put one there. A
fork that wants it in a runtime adds the membership and the dependency in the same approved
change.
the build actually uses; `domain-core`, `application-core` and `shared-contract` were listed and
unused, which is a permission granted in advance for an adapter nobody has approved yet.
`verifyCleanArchitectureDependencies` only checks that resolved edges are a subset of the declared
ones, so an unused permission passes every run; `MongoRegistryPermissionParityTest` checks the
other direction and fails when the two sets differ.
- `runtime_memberships` is `["app-bootstrap"]`, and the composition root really does declare
`implementation(project(':adapter:outbound:persistence-mongo'))` — with the reactive starter and
the reactivestreams driver excluded, because there is no reactive port in the shipped Stable
scope. `RuntimeMembershipClasspathAgreementTest` compares the registry against the resolved
runtime classpath, so the membership cannot drift from what the jar carries. Property-only
activation therefore works here: the switch turns on a module that already ships, and shipping it
off is not the same contract as leaving it out, because absence cannot be reversed at deploy time
and hides every gating defect. `sample-portfolio` does not carry it.
- External: `spring-boot-starter-data-mongodb` and `-reactive`, `spring-boot-autoconfigure`,
`micrometer-core`, `slf4j-api`, `spring-boot-configuration-processor` (annotation processor).
Versions come from the shared Spring Boot BOM; never pin the driver directly.
@@ -73,14 +80,19 @@ unsupported rather than silently dropped.
### Public surface
341 public top-level types live in one jar, so `public` means public to every adopter regardless of
which package it sits in. `verifyMongoApiSurface` (in `check`) compares the surface against
`docs/architecture/mongo-api-surface.txt`; growing it takes
Every public top-level type in one jar means `public` is public to every adopter regardless of which
package it sits in. `verifyMongoApiSurface` (in `check`) compares the surface against
`docs/architecture/mongo-api-surface.txt`, which carries the count; growing it takes
`updateMongoApiSurface -PapproveMongoApiSurfaceChange`, which is a review decision.
The architecture rule catalogue (`…mongo.architecture`) is in the **testkit** source set, not
production: it is ArchUnit input, and shipping it put rule text on every consumer's runtime
classpath.
classpath. Release gating is testkit-only for the same reason and is one implementation, not two:
`…mongo.testkit.release` reads the JUnit XML a lane wrote and is what
`scripts/verify-mongodb-platform.sh` and `src/config/mongodb/release-contracts.json` drive. A second
pair on the production classpath — a hand-built set of category names and a gate that checked it —
had no caller outside its own test and no source of truth behind the categories; it is gone rather
than moved.
Still pending, and deliberately not done as part of a review sweep: moving implementation packages
under an `internal` root and lowering visibility inside them. That is a mechanical change over ~200