refactor: 리펙토링 진행중 의존성 gradle은 얇게 유지, 각 모듈에서 처리하고 있는 부분에 대해서 리펙토링

This commit is contained in:
donghyeon-ka
2026-09-23 17:27:09 +09:00
parent 60b6a319e7
commit 9da00eb782
2485 changed files with 56091 additions and 23550 deletions
+41 -1
View File
@@ -43,6 +43,15 @@ jobs:
exit 1
fi
- uses: ./.github/actions/setup-gradle-java
- name: Export the live Gradle verification task map
working-directory: src
run: ./gradlew tasks --group verification --console=plain > ../verification-tasks.txt
- name: Upload the Gradle verification task map
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # actions/upload-artifact@v7.0.1
with:
name: gradle-verification-task-map
path: verification-tasks.txt
if-no-files-found: error
# `ci`, not `check`. A leaf's `check` is that leaf's — compile, its tests, Spotless, Checkstyle
# and Error Prone — and the repository-wide gates are named tasks of their own:
# ci = every leaf check + architectureCheck + qualityCheck + configContractCheck + qualificationCheck
@@ -60,6 +69,8 @@ jobs:
- name: Qualify opt-in inbound transports without skips
working-directory: src
run: ./gradlew :conditionalTransportQualification --stacktrace
- name: Verify Compose profile contracts render exactly as declared
run: bash scripts/verify-compose-profile-contracts.sh
build-logic:
# Included-build tests are independent of the main project task graph. Running them as a
@@ -72,6 +83,29 @@ jobs:
working-directory: src
run: ./gradlew -p build-logic test --stacktrace
build-tools:
# build-tools is an included build, so its verifier tests are not reached by the main :ci task.
# These tests protect env/JPA/messaging/Mongo/notification evidence parsers; a broken verifier
# must fail the pull-request gate rather than silently bless bad evidence.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Test the build-time verifier plugins
working-directory: src
run: ./gradlew -p build-tools test --stacktrace
sample-portfolio:
# The sample is excluded from production architecture/runtime membership policy, but it is still
# the reference implementation adopters copy. Compile/test/OpenAPI drift must therefore block PRs.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Verify the standalone sample application
working-directory: src
run: ./gradlew :sample-portfolio:check --stacktrace
redis-sdk:
# Milestone A of the Redis wrapper/typed API plan: policy catalog, typed API parity, permit
# provenance, connection isolation, and the executor guard. There is no real-server lane yet.
@@ -83,7 +117,7 @@ jobs:
# `configContractCheck`, which the quality-gates job covers.
uses: ./.github/workflows/_reusable-gradle.yml
with:
tasks: ":shared-contract:edgeRateLimitContractTest"
tasks: ":shared-contract:test --tests '*EdgeRateLimitProviderNeutralContractTest'"
optional-platforms:
runs-on: ubuntu-latest
@@ -156,6 +190,8 @@ jobs:
needs:
- quality-gates
- build-logic
- build-tools
- sample-portfolio
- redis-sdk
- jpa-candidate-evidence
- optional-platforms
@@ -169,6 +205,8 @@ jobs:
env:
QUALITY_RESULT: ${{ needs.quality-gates.result }}
BUILD_LOGIC_RESULT: ${{ needs.build-logic.result }}
BUILD_TOOLS_RESULT: ${{ needs.build-tools.result }}
SAMPLE_RESULT: ${{ needs.sample-portfolio.result }}
REDIS_RESULT: ${{ needs.redis-sdk.result }}
JPA_CANDIDATE_RESULT: ${{ needs.jpa-candidate-evidence.result }}
OPTIONAL_PLATFORMS_RESULT: ${{ needs.optional-platforms.result }}
@@ -178,6 +216,8 @@ jobs:
for result in \
"${QUALITY_RESULT}" \
"${BUILD_LOGIC_RESULT}" \
"${BUILD_TOOLS_RESULT}" \
"${SAMPLE_RESULT}" \
"${REDIS_RESULT}" \
"${JPA_CANDIDATE_RESULT}" \
"${OPTIONAL_PLATFORMS_RESULT}" \
+1 -1
View File
@@ -50,7 +50,7 @@ jobs:
run: >-
./gradlew
:application-core:test
:app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*' --tests '*Fileserver*'
:app-bootstrap:architectureTest --tests '*Fileserver*'
--stacktrace
+76
View File
@@ -230,3 +230,79 @@ jobs:
- name: Run the real-PostgreSQL integration contracts
working-directory: src
run: ./gradlew :app-bootstrap:integrationTest --stacktrace
# Container contracts moved out of the default `test` source sets must remain executed after the
# ownership split. One step per lane keeps a failure attributable to the capability that broke.
moved-container-contracts:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: RabbitMQ transport contract
working-directory: src
run: ./gradlew :messaging:messaging-rabbit:integrationTest --stacktrace
- name: Inbox PostgreSQL contract
working-directory: src
run: ./gradlew :messaging:messaging-inbox-jdbc-postgresql:integrationTest --stacktrace
- name: Outbox PostgreSQL contract
working-directory: src
run: ./gradlew :messaging:messaging-outbox-jdbc-postgresql:integrationTest --stacktrace
- name: Messaging starter Kafka round trip
working-directory: src
run: ./gradlew :messaging:messaging-spring-boot-starter:integrationTest --stacktrace
- name: Object storage MinIO contract
working-directory: src
run: ./gradlew :adapter:outbound:objectstorage:integrationTest --stacktrace
- name: Standalone sample PostgreSQL contract
working-directory: src
run: ./gradlew :sample-portfolio:integrationTest --stacktrace
# These six PostgreSQL contracts moved from app-bootstrap into persistence-jpa. They are named
# directly instead of relying on readiness-card membership: provider ownership and evidence
# grading are different questions, and CI execution must not disappear when a card changes.
jpa-provider-ownership-contracts:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Distributed lock contract
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlDistributedLockIntegrationTest --stacktrace
- name: Idempotency unique-scope contract
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlIdempotencyUniqueScopeIntegrationTest --stacktrace
- name: Integer lock migration compatibility
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlIntLockMigrationCompatibilityIntegrationTest --stacktrace
- name: Legacy outbox transactional append
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlLegacyOutboxAppendTransactionalIntegrationTest --stacktrace
- name: Legacy outbox concurrent relay
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlLegacyOutboxConcurrentRelayIntegrationTest --stacktrace
- name: Legacy outbox row lifecycle
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlLegacyOutboxRowLifecycleIntegrationTest --stacktrace
# Dynamic half of the compose-profile contract. All 15 blocking lanes run on main/nightly; a
# partial lane run is reproduction only and cannot satisfy this job.
compose-runtime-smoke:
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- name: Run every blocking Compose runtime lane
run: bash scripts/run-compose-runtime-smoke.sh --matrix src/config/runtime/compose-profile-contracts.json
- name: Publish sanitized runtime-smoke evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
with:
name: compose-runtime-smoke-evidence
path: src/app-bootstrap/build/evidence/runtime-smoke
if-no-files-found: warn
+6 -13
View File
@@ -46,25 +46,18 @@ concurrency:
cancel-in-progress: false
jobs:
# The architecture-wide verification, once. Each of the four release workflows this file replaces
# ran `verifyCleanArchitectureDependencies` on its own runner, and three of them also ran the
# bootstrap architecture suite; the answers were identical because the input was one commit.
# The repository release contract, once. releaseCheck contains the PR gate plus provenance,
# stale-archive hygiene and the public path snapshot, so those tasks are no longer merely
# registered/documented — the tag workflow executes them before any image can publish.
architecture-and-surface:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 90
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Verify architecture boundaries and the published surfaces
- name: Run the repository release contract
working-directory: src
run: >-
./gradlew
:verifyCleanArchitectureDependencies
:verifyPublicPathSnapshot
:app-bootstrap:verifyEnvKeys
:app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*'
--stacktrace
run: ./gradlew :releaseCheck --stacktrace
# Every web lane that `check` cannot reach. webCrossStackParityTest depends on `test`,
# webJettyCompatTest and webFluxContractTest, so naming it runs all four — which is what
+6 -35
View File
@@ -2,7 +2,7 @@
## 프로젝트 정체성
이 저장소는 단순한 예제 블로그 애플리케이션이 아니라, Java 21 + Spring Boot 4.0.0 + Gradle 멀티모듈 기반의 Clean Architecture 템플릿이다.
이 저장소는 단순한 예제 블로그 애플리케이션이 아니라, Java 21 + 버전 카탈로그에 고정된 Spring Boot 4.x + Gradle 멀티모듈 기반의 Clean Architecture 템플릿이다.
기본 패키지는 `dev.caskeleton`이며, 예시 도메인은 production 모듈이 아니라 `sample-portfolio` 모듈(WorkLog 엔지니어링 작업 기록 게시판)에 격리한다. 새 프로젝트를 시작할 때는 도메인 이름, 패키지, 엔티티, 유스케이스를 교체할 수 있지만, 모듈 경계와 의존성 방향은 유지해야 한다.
@@ -12,7 +12,7 @@
동작하는 코드라도 HARD-STOP 조건을 하나라도 위반하면 완료된 작업이 아니다.
다음 HARD-STOP 8개 항목이 이 저장소의 정본(canonical) 로컬 정책 권위이자 SSOT다.
다음 HARD-STOP 7개 항목이 이 저장소의 정본(canonical) 로컬 정책 권위이자 SSOT다.
1. `domain-core`가 framework, transport, database, cloud 의존성을 가진다.
2. controller가 repository, Spring Data interface, persistence entity를 직접 사용한다.
@@ -21,7 +21,6 @@
5. 프로젝트 의존성이 `src/config/architecture/modules.json` 또는 Gradle 의존성 검증을 위반한다.
6. 관련 검증 없이, 또는 실행하지 못한 이유를 밝히지 않고 완료를 주장한다.
7. 결론의 범위와 위험에 맞는 증거 없이 repository/corpus 전체 결론을 내린다.
8. 의미 있는 작업을 필수 LLM Wiki capture 또는 명시한 capture 차단 사유 없이 종료한다.
root `CLAUDE.md`는 이 목록의 동기화된 요약이다. 두 문서가 어긋나면 이 `AGENTS.md` 목록이
우선한다. 자동 강제 범위는 아래 Gradle 정책 권위와 ArchUnit/Test가 담당한다.
@@ -50,12 +49,12 @@ root `CLAUDE.md`는 이 목록의 동기화된 요약이다. 두 문서가 어
## Gradle 정책 권위
- `src/config/architecture/modules.json`: 등록된 모든 leaf의 ID, repository-relative 소스 경로,
Gradle path, 허용 production project dependency edge, 두 composition root의 실제 runtime
membership. leaf 목록과 그 개수의 SSOT는 registry다. 문서는 개수를 복제하지 않는다 —
Gradle path, 허용 production project dependency edge. runtime membership은 실제 resolved
runtimeClasspath에서 검증하며 registry에 별도 membership 목록을 복제하지 않는다. leaf 목록과 그 개수의 SSOT는 registry다. 문서는 개수를 복제하지 않는다 —
산문에 적힌 숫자는 leaf가 추가되는 순간 drift하기 때문이다. 이제 이걸 강제하는 태스크는 없다:
`verifyDocumentedLeafCount`는 삭제됐다. 문서에 적힌 수가 틀린 것은 결함이지만 빌드를 실패시킬
사유는 아니고, 그 태스크는 모든 `CLAUDE.md`와 `build.gradle`을 정규식으로 훑는 파서였다.
- `src/settings.gradle`: 16줄. `ca.architecture-registry` 설정 플러그인이 registry를 읽어
- `src/settings.gradle`: `ca.architecture-registry` 설정 플러그인이 registry를 읽어
project를 include/mapping 한다. registry가 project 목록이 될 수 없는 경우(중복 ID, 저장소 밖
경로, 없는 디렉터리)만 여기서 실패한다. 허용되지 않는 edge 같은 아키텍처 규칙은
`verifyCleanArchitectureDependencies`가 답한다 — settings에서 죽으면 실행할 수 있는 태스크가
@@ -73,31 +72,6 @@ root `CLAUDE.md`는 이 목록의 동기화된 요약이다. 두 문서가 어
commit 정책은 모든 플랫폼에서 `human-only`이며 agent는 stage/commit/amend/push하지 않는다.
## LLM Wiki 캡처 워크플로우
구현, 아키텍처, 빌드, 테스트, 런타임, 문서 워크플로우 변경처럼 의미 있는 작업을 끝낸 뒤에는 최종 응답 전에 LLM Wiki 기록을 갱신한다.
기준 vault:
```text
/home/donghyeon/workspace/ai-tool/llm-wiki-private/
```
에이전트는 해당 vault의 `AGENTS.md`, `CLAUDE.md`, `rules/`, `.agents/`, `.claude/`, `.codex/` 지침을 확인한 뒤 작성한다.
필수 순서:
1. `/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/<branch-name>.md`를 생성하거나 갱신한다.
2. 구현 내용, 변경 파일, 의사결정, 검증 명령, 실패/차단 사항, 증거 등급을 branch-note에 기록한다.
3. 실제로 파생 자료가 있으면 다음 raw 문서를 생성하거나 갱신한다.
- `raw/errors/`: 오류, 실패한 테스트, 샌드박스/도구 문제, 재발 가능한 트러블슈팅
- `raw/interviews/`: 이 작업에서 정직하게 뽑을 수 있는 면접 질문
- `raw/blog-topics/`: 채용공고가 아닌 구현·설계·트러블슈팅 기반 블로그 글감
4. 파생 문서는 `## Parent`에서 branch-note로 upward link하고, branch-note의 `## Cluster / 묶음`에는 파생 문서 wikilink를 되돌려 적는다.
5. canonical 추출 요청이 없는 한 `wiki/blog/`, `wiki/interview/`, `wiki/portfolio/`, `wiki/concepts/`, `wiki/projects/`를 바로 만들지 않는다.
파생 문서가 필요 없을 때도 그냥 생략하지 말고, branch-note의 cluster 섹션에 "없음" 또는 "추출할 별도 글감 없음"처럼 판단 결과를 남긴다.
## 강제 수준
이 문서는 에이전트와 개발자가 따라야 할 작업 규칙을 정의하지만, 그 자체로 빌드나 테스트를 실패시키는 자동 강제 장치는 아니다.
@@ -159,8 +133,6 @@ Gradle 의존성 검증도 같은 registry를 읽는다. root 문서나 기억
8. 외부 연동은 registry가 가리키는 `adapter:outbound:*` leaf에서 port 구현으로 추가한다.
9. endpoint는 마지막에 해당 `adapter:inbound:*` leaf에서 얇게 연결한다.
10. focused test를 먼저 돌리고, 가능한 경우 전체 Gradle test를 돌린다.
11. LLM Wiki branch-note와 필요한 파생 raw 문서를 갱신한다.
12. 완료 응답에는 변경 파일, 검증 결과, Wiki capture 결과를 포함한다.
## 테스트 전략
@@ -187,7 +159,7 @@ cd src
./gradlew check # 모든 leaf의 check
./gradlew architectureCheck # 의존 방향·런타임 멤버십·application-core 순수성
./gradlew qualityCheck # SpotBugs + FindSecBugs (leaf check에는 없다)
./gradlew ci # PR 게이트 = 위 셋 + configContractCheck
./gradlew ci # PR 게이트 = leaf check + architecture + quality + config + qualification
./gradlew verifyPublicPathSnapshot
./gradlew :app-bootstrap:verifyEnvKeys
```
@@ -256,7 +228,6 @@ cd src
- 핵심 변경 내용
- 실행한 검증 명령
- 실패하거나 실행하지 못한 검증
- LLM Wiki branch-note와 파생 문서 캡처 결과
- 남은 위험 또는 후속 작업
짧은 작업이라도 검증 여부는 생략하지 않는다.
+9 -16
View File
@@ -4,7 +4,7 @@ Repository guidance for the Java 21 + Spring Boot 4.0.8 Clean Architecture templ
## Prime Directive
Preserve architecture before optimizing for speed. The following eight HARD-STOP conditions are a
Preserve architecture before optimizing for speed. The following seven HARD-STOP conditions are a
synchronized summary of the canonical local policy in `AGENTS.md`:
1. `domain-core` gains framework, transport, database, or cloud dependencies.
@@ -15,7 +15,6 @@ synchronized summary of the canonical local policy in `AGENTS.md`:
gate.
6. Completion is claimed without the relevant verification or a named reason it could not run.
7. A repository/corpus conclusion is made without evidence proportional to its scope and risk.
8. Non-trivial work closes without the required LLM Wiki capture or a reported capture block.
If this summary drifts from `AGENTS.md`, `AGENTS.md` wins and this summary must be resynchronized.
@@ -66,14 +65,14 @@ that the exception is stated rather than inferred from a directory. It is a vend
own `*-api` leaves are its ports, its broker leaves are its adapters, its starter is its composition
root — and the messaging module review (`docs/reviews/2026-08-14-messaging-module-code-review.md`
MSG-023 §6.2) chose that layout deliberately over folding it into `adapter:outbound:*`. This
application is supposed to reach it the way it reaches any library: through an application-owned port
satisfied by an anti-corruption bridge in `adapter:outbound:messaging`. That bridge does not exist
yet (MSG-015), so today the composition root wires the starter directly; `src/messaging/CLAUDE.md`
holds the detail.
application reaches it through the application-owned anti-corruption bridge in
`adapter:outbound:messaging` (MSG-015). The canonical bridge exists; legacy outbox/realtime cutover
still has explicitly documented seams in `src/messaging/CLAUDE.md`.
Never infer an individual leaf's Gradle path, allowed dependency, or test command from this table.
Read its `gradle_path`, `allowed_dependencies`, and `runtime_memberships` from
`src/config/architecture/modules.json`; derive the focused test from that Gradle path.
Read its `gradle_path` and `allowed_dependencies` from `src/config/architecture/modules.json`; runtime
composition is established by actual Gradle dependencies/auto-configuration, not a registry
`runtime_memberships` field that does not exist.
## Layer workflow
@@ -107,7 +106,7 @@ Architecture-wide commands:
```bash
./gradlew architectureCheck --console=plain
./gradlew :app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*' --console=plain
./gradlew :app-bootstrap:architectureTest --console=plain
./gradlew verifyPublicPathSnapshot --console=plain
./gradlew :app-bootstrap:verifyEnvKeys --console=plain
```
@@ -116,7 +115,7 @@ A leaf's `check` covers that leaf only — compile, its tests, Spotless, Checkst
Repository-wide questions have their own names: `architectureCheck` (dependency direction, runtime
membership, application-core purity, Git-carryable sources), `qualityCheck` (SpotBugs, FindSecBugs),
`configContractCheck` (the environment contract), `integrationCheck` (the declared strict test
lanes). `ci` is check + architectureCheck + qualityCheck + configContractCheck; `releaseCheck` adds
lanes). `ci` is leaf checks + architectureCheck + qualityCheck + configContractCheck + qualificationCheck; `releaseCheck` adds
provenance, archive hygiene and the public-path snapshot.
Use public-path and env-key checks only when their surfaces changed. Full `test`, `check` or `ci`
@@ -133,9 +132,3 @@ Citation verification is profile-based: none for `review-lite`, blocking citatio
`review-standard`, and all material citations for `audit-deep`/`regulated`. Durable reports are
triggered by high risk, at least 3 blocking findings, an architecture decision, explicit user request,
or the regulated profile. Otherwise a concise result is allowed.
## LLM Wiki capture
For non-trivial implementation or workflow changes, use the exact vault path and capture sequence in
`AGENTS.md`. If the controller explicitly excludes wiki writes for a dispatched task, report the
handoff instead of writing outside scope.
+9 -14
View File
@@ -1,6 +1,6 @@
# ca-skeleton — Clean Architecture Spring Boot 템플릿
ca-skeleton은 Java 21, Spring Boot 4.0.0, Gradle 멀티모듈 기반의 Clean Architecture 백엔드 템플릿입니다. fork해서 도메인·패키지·엔티티·유스케이스만 교체하면 새 서비스를 시작할 수 있고, 모듈 경계와 의존 방향은 그대로 유지합니다. 기본 패키지는 `dev.caskeleton`이며, 예시 도메인은 production 모듈이 아니라 `sample-portfolio` 모듈(WorkLog 작업 기록 게시판)에 격리합니다.
ca-skeleton은 Java 21과 버전 카탈로그에 고정된 Spring Boot 4.x, Gradle 멀티모듈 기반의 Clean Architecture 백엔드 템플릿입니다. fork해서 도메인·패키지·엔티티·유스케이스만 교체하면 새 서비스를 시작할 수 있고, 모듈 경계와 의존 방향은 그대로 유지합니다. 기본 패키지는 `dev.caskeleton`이며, 예시 도메인은 production 모듈이 아니라 `sample-portfolio` 모듈(WorkLog 작업 기록 게시판)에 격리합니다.
이 문서는 전체 구조와 첫 실행만 다룹니다. 모듈별 상세 규칙과 설계 근거는 각 모듈의 README와 `CLAUDE.md`가, 빌드·환경 변수 상세는 [src/README.md](src/README.md)가 소유합니다.
@@ -28,7 +28,7 @@ family 수준의 책임은 다음과 같습니다.
| `app-bootstrap` | Spring Boot entrypoint와 composition root |
| `sample-portfolio` | WorkLog 예시 도메인(fixture/reference). production이 의존하지 않음 |
정확한 19개 leaf 목록과 각 leaf의 Gradle path·소스 경로·허용 production 의존 edge는
등록된 leaf 목록과 각 leaf의 Gradle path·소스 경로·허용 production 의존 edge는
[src/config/architecture/modules.json](src/config/architecture/modules.json)이 SSOT입니다. focused
test는 해당 Gradle path에서 `./gradlew <gradle-path>:test --console=plain` 형태로 파생하며, root
문서나 기억에서 개별 leaf edge를 추론하지 않습니다.
@@ -54,7 +54,7 @@ curl -fsS http://localhost:8080/api/healthcheck
docker compose -f docker-compose.yml -f docker-compose.local.yml down
```
`src/.env`는 커밋된 안전 기본값이라 별도 `.env.example`을 만들지 않습니다. 전체 환경 변수 목록과 조정 시점은 [src/README.md](src/README.md)와 [docs/registries/env-keys.yaml](docs/registries/env-keys.yaml)에 있습니다.
`src/.env.example`은 배포 환경 변수의 추적 가능한 복사/검증 계약이고 `src/.env`는 로컬 실행 입력입니다. 전체 환경 변수 목록과 조정 시점은 [src/README.md](src/README.md)와 [docs/registries/env-keys.yaml](docs/registries/env-keys.yaml)에 있습니다.
### 프로파일별 데이터스토어
@@ -98,7 +98,7 @@ cd src
```bash
cd src
./gradlew :app-bootstrap:test
./gradlew :app-bootstrap:sampleOffTest
./gradlew :sample-portfolio:check
./gradlew architectureCheck
```
@@ -117,7 +117,7 @@ cd src
- 비즈니스 정책은 mapper·filter·config·settings·controller에 두지 않습니다.
- 새 외부 시스템 연동은 domain/application port와 adapter 모듈로 표현합니다.
이 규칙은 두 축으로 자동 강제합니다. ArchUnit `CleanArchitectureTest`가 컴파일된 소스 의존성을,
이 규칙은 두 축으로 자동 강제합니다. `:app-bootstrap:architectureTest`의 분할된 ArchUnit 규칙들이 컴파일된 소스 의존성을,
`verifyCleanArchitectureDependencies` 게이트가 JSON registry의 허용 Gradle project edge를
검사합니다.
@@ -142,7 +142,6 @@ Markdown 명령 파서였고, 그 결과 "README에 무엇을 쓸 수 있는가"
cd src
./gradlew :grpc:grpc-testkit:grpcPerformanceTest
./gradlew :sample-portfolio:openapiCheckSnapshot -PapproveOpenApiChange
./gradlew :app-bootstrap:sampleOffCompile
```
- `grpcPerformanceTest` — latency percentile·saturation·drain budget을 **측정**한다. 공유 CI
@@ -152,17 +151,13 @@ cd src
`OpenApiDriftContractTest`는 `:sample-portfolio:test`의 일부이고, 그건 `check` 안이며 stage 1에서
실행된다. 이 태스크의 고유한 역할은 `-PapproveOpenApiChange`로 **커밋된 스냅샷을 다시 만드는 것**
— 의도된 API 변경을 사람이 승인하는 지점이다. 자동으로 돌리면 승인이 승인이 아니게 된다.
- `sampleOffCompile` — `sampleOffTest` 소스셋을 **컴파일만** 한다. CI가 돌리는
`:app-bootstrap:sampleOffTest`(stage 1, `ci-quality-gates.yml`의 `sample-off` 잡)는 같은 소스셋을
컴파일한 뒤 실행까지 하므로, CI에 따로 넣으면 진부분집합을 한 번 더 도는 것이다. 남겨 둔 이유는
sample 제거 작업 중 테스트를 기다리지 않고 컴파일만 빠르게 확인하는 로컬 루프가 실재하기 때문이다.
## 더 알아보기
- 빌드·검증 게이트·환경 변수 상세: [src/README.md](src/README.md)
- 모듈 레지스트리(19개 leaf SSOT): [src/config/architecture/modules.json](src/config/architecture/modules.json)
- 모듈 레지스트리(등록 leaf SSOT): [src/config/architecture/modules.json](src/config/architecture/modules.json)
- 에이전트·기여자 작업 규칙: [AGENTS.md](AGENTS.md) · [CLAUDE.md](CLAUDE.md)
- 빌드·릴리스 공급망 파이프라인은 현재 Mode B 복구 범위에 포함되지 않았다. 현재 저장소가
제공하는 canonical workflow는 품질·의존성 취약점·링크 검사이며, release/publish 자동화는 별도
설계와 권한 검토 후 추가한다.
- release/publish 자동화는 `.github/workflows/release.yml`이 소유하며, release provenance·SBOM·
이미지 build/push를 해당 workflow의 명시적 권한과 게이트 아래에서 수행합니다.
- 모듈별 설계 결정: [domain-core](src/domain-core/README.md) · [application-core](src/application-core/README.md) · [adapter:inbound:web](src/adapter/inbound/web/README.md) · [adapter:outbound:persistence-jpa](src/adapter/outbound/persistence-jpa/README.md) · [shared-contract](src/shared-contract/README.md) · [app-bootstrap](src/app-bootstrap/README.md)
+18 -2
View File
@@ -56,7 +56,7 @@ services:
profiles:
- local-mongo
- all-adapters
image: mongo:7
image: mongo:8.0.16
command: ["mongod", "--replSet", "rs0", "--bind_ip_all"]
volumes:
- type: volume
@@ -75,7 +75,7 @@ services:
profiles:
- local-mongo
- all-adapters
image: mongo:7
image: mongo:8.0.16
depends_on:
mongo:
condition: service_healthy
@@ -122,6 +122,22 @@ services:
retries: 12
start_period: 30s
# ---- Redis — local compose contract for the shipped Redis runtime ----------------
redis:
profiles:
- local-redis
- all-adapters
image: redis:7.4
command: ["redis-server", "--appendonly", "no", "--save", ""]
networks:
- caskeleton-infra
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 12
start_period: 5s
# ---- Mailpit — the reference SMTP provider for notification serving ----------
mailpit:
profiles:
@@ -1,4 +1,4 @@
# ADR-JPA-006 — `audit` is the canonical technical audit model; `auditing` stays a frozen candidate
# ADR-JPA-006 — `audit` is the sole technical audit model
- Status: Accepted
- Date: 2026-08-24
@@ -24,17 +24,15 @@ first, and column names, actor lengths and capture lifecycles then diverge per t
## Decision
`audit/AuditableEntity` is canonical. `auditing` stays in the tree as a candidate and is excluded
from the Stable capability report.
`audit/AuditableEntity` is canonical and the unused `auditing/*` implementation is removed.
The candidate is not deleted and not promoted. Deleting it would discard a working Spring Data
integration that a deployment preferring declarative auditing would want. Promoting it would mean
either renaming `modified_*` to `updated_*` and widening the actor column — a schema migration of
every audited table to gain nothing a caller asked for — or moving the sample entities onto
`modified_*`, which is the same migration in the other direction.
Keeping a complete, incompatible implementation as a dormant candidate created exactly the
ambiguity the review warned about: a new entity could choose a package by autocomplete and silently
change column names, actor bounds and capture lifecycle. A future move to Spring Data auditing is a
migration of the canonical model, not activation of a second model that has drifted beside it.
Neither is worth doing now. What the divergence actually needed was not consolidation but a rule
that an entity cannot straddle the two, and that rule is cheaper than either migration.
That future migration must preserve `created_*`/`updated_*`, the 256-character actor contract,
`AuditContextPort`, and the shared `Clock`; listener wiring and entity conversion land atomically.
## Consequences
@@ -10,7 +10,7 @@ Advanced Tasks 9–13 add STOMP 1.2 alongside the platform's own protocol, plus
relay and cross-node user destinations.
This leaf already ships an older STOMP-over-SockJS channel (`stomp`, gated on
`ca-skeleton.websocket.enabled`). Two `@EnableWebSocketMessageBroker` configurations in one context
`app.websocket.enabled`). Two `@EnableWebSocketMessageBroker` configurations in one context
do not conflict loudly — both contribute a configurer, both call `configureMessageBroker`, and the
broker that results is whichever ran last. Nothing errors and nothing logs.
+1 -8
View File
@@ -5,7 +5,7 @@
# split into capability artifacts.
# Update only after review with:
# ./gradlew :adapter:inbound:graphql:updateGraphQlApiSurface -PapproveGraphQlApiSurfaceChange
# types: 408
# types: 401
dev.caskeleton.adapter.inbound.graphql.HealthGraphqlController
dev.caskeleton.adapter.inbound.graphql.advanced.admin.GraphQlAdminPrincipal
dev.caskeleton.adapter.inbound.graphql.advanced.admin.GraphQlPersistedOperationAdminAuthorization
@@ -141,13 +141,6 @@ dev.caskeleton.adapter.inbound.graphql.advanced.subscription.GraphQlSubscription
dev.caskeleton.adapter.inbound.graphql.advanced.subscription.GraphQlSubscriptionSource
dev.caskeleton.adapter.inbound.graphql.advanced.subscription.GraphQlSubscriptionState
dev.caskeleton.adapter.inbound.graphql.advanced.subscription.GraphQlSubscriptionTermination
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketAdmission
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketConnectionId
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketHandlerFactory
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketLifecycle
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketProperties
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketProtocol
dev.caskeleton.adapter.inbound.graphql.advanced.websocket.GraphQlWebSocketProtocolException
dev.caskeleton.adapter.inbound.graphql.api.GraphQlClientProfile
dev.caskeleton.adapter.inbound.graphql.api.GraphQlClientProfileName
dev.caskeleton.adapter.inbound.graphql.api.GraphQlOperationId
@@ -0,0 +1,23 @@
# Supported production adopter surface for the JPA persistence leaf.
# Language-level public implementation types are not compatibility promises.
# Adding an import outside this list requires an explicit review of the adopter contract.
dev.caskeleton.adapter.outbound.persistence.api.capability.CapabilitySupport
dev.caskeleton.adapter.outbound.persistence.api.capability.JpaCapability
dev.caskeleton.adapter.outbound.persistence.audit.AuditContextPort
dev.caskeleton.adapter.outbound.persistence.audit.AuditableEntity
dev.caskeleton.adapter.outbound.persistence.config.PersistenceJpaConfig
dev.caskeleton.adapter.outbound.persistence.config.PersistenceVendorSettings
dev.caskeleton.adapter.outbound.persistence.failure.SqlStateErrorMapping
dev.caskeleton.adapter.outbound.persistence.fileserver.FileserverSchemaActivation
dev.caskeleton.adapter.outbound.persistence.hibernate.HibernateProviderPolicy
dev.caskeleton.adapter.outbound.persistence.idempotency.IdempotencyClaimRepository
dev.caskeleton.adapter.outbound.persistence.migration.FlywaySchemaPolicy
dev.caskeleton.adapter.outbound.persistence.outbox.OutboxClaimRepository
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlIdempotencyClaimRepository
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlLocalTimeoutConfigurer
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlOutboxClaimRepository
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlPersistenceConfig
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlSqlStateErrorMapping
dev.caskeleton.adapter.outbound.persistence.security.DatabasePrivilegeReport
dev.caskeleton.adapter.outbound.persistence.security.PostgreSqlRuntimeRoleVerifier
dev.caskeleton.adapter.outbound.persistence.transaction.TransactionLocalTimeoutConfigurer
@@ -62,12 +62,10 @@ All commands ran from `src/` and completed with `BUILD SUCCESSFUL`:
The final combined legacy focused suites completed in 27 seconds. Deprecation-for-removal warnings
are expected evidence that legacy consumers remain visible; they are not suppressed.
## LLM Wiki capture
## documentation update
The canonical vault required by repository policy,
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/`, and its parent
`/home/donghyeon/workspace/ai-tool/` do not exist in this environment. Therefore the required
`raw/branch-notes/codex-objectstorage-production-capability.md` could not be created or updated.
No similarly named non-canonical clone was used. This exact access block is recorded in both the
plan and design headers and here at the Batch A boundary.
@@ -86,12 +86,10 @@ RED/fix cycles:
The final combined application/objectstorage checkpoint completed in 23 seconds. The focused
Clean Architecture suite and dependency verification also passed.
## LLM Wiki capture
## documentation update
The canonical vault required by repository policy,
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/`, and its parent
`/home/donghyeon/workspace/ai-tool/` do not exist in this environment. Therefore the required
`raw/branch-notes/codex-objectstorage-production-capability.md` and any derived raw documents could
not be created or updated. No similarly named non-canonical clone was used. This exact access block
is recorded in the plan/design status and at this Batch B boundary.
@@ -67,11 +67,9 @@ bash ../.github/scripts/verify-gate-matrix.sh
The gate matrix reports 22 gates: 21 verified and the protected AWS qualification gate explicitly
`delegated-pending`.
## LLM Wiki capture
## documentation update
The canonical vault `/home/donghyeon/workspace/ai-tool/llm-wiki-private/` and its parent
`/home/donghyeon/workspace/ai-tool/` do not exist in this environment. The required
`raw/branch-notes/codex-objectstorage-production-capability.md` and derived raw documents could not
be created or updated. No similarly named non-canonical clone was used.
## Remaining risks
@@ -96,9 +96,7 @@ Tasks 20–24 remain blocked until the user explicitly approves scanner ownershi
first publication profile, the additive asynchronous API/status contract, and digest transport.
No scan/publication/sample endpoint implementation was started.
## LLM Wiki capture
## documentation update
The canonical vault `/home/donghyeon/workspace/ai-tool/llm-wiki-private/` and its parent
`/home/donghyeon/workspace/ai-tool/` do not exist in this environment. The required
`raw/branch-notes/codex-objectstorage-production-capability.md` and derived raw documents could not
be created or updated. No similarly named non-canonical clone was used.
@@ -85,10 +85,7 @@ deletion of its Poster row.
- No readiness card was promoted. Local/MinIO ceilings and unsupported conditional behavior remain
unchanged.
## Wiki capture
## documentation update
At this isolated-branch checkpoint, the then-selected private vault
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/` was absent, so capture was blocked. The final
main integration was later captured in the user-designated public vault at
`raw/branch-notes/chore-main-worktree-capability-integration.md`, with the derived error note
`raw/errors/multi-worktree-contract-drift-2026-07-31.md`.
+1 -1
View File
@@ -16,7 +16,7 @@ cd src
./gradlew :adapter:outbound:httpclient:httpClientPerformanceTest \
-Pperformance.assertions.enabled=true --console=plain
./gradlew verifyCleanArchitectureDependencies --console=plain
./gradlew :app-bootstrap:test --tests '*CleanArchitectureTest' --console=plain
./gradlew :app-bootstrap:architectureTest --console=plain
python3 ../scripts/verify-httpclient-docs.py
```
+3 -3
View File
@@ -26,8 +26,8 @@ Therefore the design's 19 library modules become **package boundaries inside the
| Design module | Repository home | Reason |
|---|---|---|
| `httpclient-spring-boot-starter` | `:app-bootstrap` (`dev.caskeleton.bootstrap.autoconfigure.httpclient`) | This repository's composition root owns wiring and canonical activation; an adapter leaf must not auto-configure itself. |
| `httpclient-testkit` | `:adapter:outbound:httpclient` `src/testkit/java/**/testkit` | The design forbids production modules depending on the testkit; a source set whose dependencies are declared only on the test configurations gives the same guarantee without a new Gradle project. It is its own source set rather than part of `test` because three lanes consume it — `test`, `httpClientPerformanceTest` and `jmh` — and reaching into `sourceSets.test.output` from `jmh` compiled under Gradle but could not be modelled by an IDE, which classifies a source set as test source only when a `Test` task runs its output and forbids main source from reading test source. `PlatformClasses` excludes the source set's output so the boundary rules keep meaning production classes. |
| `httpclient-spring-boot-starter` | `:adapter:outbound:httpclient` (`dev.caskeleton.adapter.outbound.httpclient.autoconfigure`) | Capability-specific Spring composition is owned with the reusable HTTP client platform; `app-bootstrap` only selects/includes the capability and runtime activation remains `app.httpclient.enabled`. |
| `httpclient-testkit` | `:adapter:outbound:httpclient` `src/testFixtures/java/**/testkit` | The design forbids production modules depending on the testkit. Gradle `testFixtures` publishes the reusable test support only to test consumers; ordinary tests, integration/performance lanes, and JMH opt into that surface explicitly without exposing it to production. `PlatformClasses` excludes test-fixture output so the boundary rules keep meaning production classes. |
The package boundary is enforced by ArchUnit rules (`PublicApiArchitectureTest`,
`HttpClientModuleBoundaryTest`) that reproduce the design's module dependency table.
@@ -55,7 +55,7 @@ Root package: `io.backend.skeleton.httpclient` → `dev.caskeleton.adapter.outbo
| `httpclient-resttemplate-migration` | `…httpclient.migration` | `…outbound.httpclient.migration` |
| `httpclient-spring7-service-groups` | `…httpclient.spring7` | `…outbound.httpclient.spring7` |
| `httpclient-jetty-http3-experimental` | `…httpclient.http3` | `…outbound.httpclient.http3` |
| `httpclient-spring-boot-starter` | `…httpclient.autoconfigure` | `dev.caskeleton.bootstrap.autoconfigure.httpclient` |
| `httpclient-spring-boot-starter` | `…httpclient.autoconfigure` | `dev.caskeleton.adapter.outbound.httpclient.autoconfigure` |
| `httpclient-testkit` | `…httpclient.testkit` | `…outbound.httpclient.testkit` (`testkit` source set) |
## 3. Other deliberate substitutions
+64
View File
@@ -0,0 +1,64 @@
# JPA batch write configuration
`HibernateJpaBatchExecutor` is an advanced opt-in. The template does not enable Hibernate batch
write settings globally because statistics and statement reordering add runtime cost even in
applications that never perform bulk writes.
## What the executor owns
A `JpaBatchProfile` owns the JDBC batch size for one batch run. Before the first item is written,
the executor applies `profile.jdbcBatchSize()` to the current Hibernate `Session`. The previous
Session value is restored in `finally`, including failed runs.
The executor does **not** open a transaction. The application service must enter a
`TransactionPort.inWrite(...)` boundary first.
## What the application must configure
If a profile requests insert or update ordering, the matching Hibernate setting must already be
enabled on the SessionFactory:
```yaml
spring:
jpa:
properties:
hibernate:
order_inserts: true
order_updates: true
generate_statistics: true
```
`hibernate.generate_statistics=true` is required because `BatchExecutionResult` reports measured
flush and prepared-statement deltas. A disabled statistics registry would turn those values into
convincing zeros.
The `HibernateStatisticsCollector` must also receive an instrumented `JdbcBatchCounter`.
`HibernateStatisticsCollector.of(sessionFactory)` is intentionally insufficient for this executor:
Hibernate statistics do not expose actual JDBC batch executions.
`hibernate.default_batch_fetch_size` is unrelated to this write executor. It affects association
fetching and belongs to query/fetch tuning instead.
## Entity identifier constraint
When `JpaBatchProfile.batchingRequired()` is true, an entity using
`GenerationType.IDENTITY` is rejected by `HibernateBatchConfigurationGuard`. Hibernate must issue
each INSERT immediately to obtain the generated identifier, so JDBC insert batching cannot satisfy
that profile.
Prefer a sequence-based identifier when a workload requires insert batching. Keep the sequence
allocation size aligned with the database migration.
## Failure behavior
Configuration is checked before the persister receives the first item:
- missing `hibernate.order_inserts=true` when the profile requests insert ordering: fail;
- missing `hibernate.order_updates=true` when the profile requests update ordering: fail;
- disabled Hibernate statistics: fail;
- missing JDBC batch instrumentation: fail;
- no caller-owned transaction: fail.
These failures are deliberate. A batch API that silently degrades to one statement per row produces
correct data but false performance evidence, which is harder to detect than a startup or invocation
failure.
+1 -1
View File
@@ -105,7 +105,7 @@ Docker-dependent lanes fail closed rather than skipping, matching the existing
| Per-task `git add` + `git commit` | `AGENTS.md`: commit policy is `human-only`; agents do not stage, commit, amend, or push | Implementation is delivered unstaged. This is the only plan step intentionally not executed, and it is recorded here. |
| Querydsl as an optional module dependency | Querydsl is not part of this repository's dependency set | `querydsl` is implemented against the plan's contracts with the Querydsl types kept behind `compileOnly`, so the Stable runtime classpath never carries Querydsl and a deployment opting in adds the artifact itself. |
| Hibernate Envers as a module dependency | Envers is not part of this repository's dependency set | Same treatment as Querydsl: `compileOnly` + explicit opt-in, matching the plan's "Envers is opt-in and never enabled by a global base class". |
| `build-logic/src/test/kotlin/JpaModuleBoundaryTest.kt` | There is no `build-logic` project and no Kotlin source set; module boundaries are enforced by the registry itself | `verifyCleanArchitectureDependencies` plus `:app-bootstrap:test --tests '*CleanArchitectureTest'` assert the same property against `src/config/architecture/modules.json`, which is the authority the plan's test would have had to duplicate. |
| `build-logic/src/test/kotlin/JpaModuleBoundaryTest.kt` | There is no `build-logic` project and no Kotlin source set; module boundaries are enforced by the registry itself | `verifyCleanArchitectureDependencies` plus `:app-bootstrap:architectureTest` assert the same property against `src/config/architecture/modules.json`, which is the authority the plan's test would have had to duplicate. |
| `PostgreSqlRuntimeRoleVerifierIntegrationTest` (Task 45) | The security lane is one suite in this leaf rather than a per-module `integrationTest` | `PostgreSqlSecurityContractTest` (tag `jpa-security`) exercises `PostgreSqlRuntimeRoleVerifier.verify` and `.requireSafe` against a real restricted role on a real server. |
| `JpaSafetyProperties`, `JpaDataSourceProperties` | `NamingConventionTest` requires every `@ConfigurationProperties` type to end in `Settings` or `Policy` | Renamed to `JpaSafetySettings` and `JpaDataSourceSettings`. The bound property prefixes and every field are unchanged; only the class names move to this repository's convention. |
-1
View File
@@ -97,7 +97,6 @@ the difference visible instead of asserting a constant against itself. See
| Hibernate second-level cache | Advanced |
| Hibernate Envers | Advanced |
| Technical auditing — `audit/AuditableEntity` | Stable (canonical) |
| Technical auditing — `auditing/AuditMetadata` | Candidate, not composed |
| Multi-tenancy (column, RLS, schema, database) | Experimental |
| Consistency-aware read replica | Experimental |
@@ -90,6 +90,8 @@ app:
order-events-dlq:
broker: kafka-primary
kind: WORK_QUEUE
guarantees:
delivery: AT_MOST_ONCE # terminal DLQ: another DLQ is not required
physical:
topic: order.events.v1.dlt
schema:
@@ -121,6 +123,12 @@ app:
| metric dimension 상한 | 200 | cardinality 폭발 방지 |
`schema.codec`은 `application/json`, `schema.compatibility`는 `BACKWARD_TRANSITIVE`,
> **현재 강제 범위:** `schema.compatibility` 값은 현재 정책 선언이며 runtime/CI에서 schema registry를
> 조회해 호환성을 차단하지 않는다. Avro 비교기는 독립 utility/test로만 존재한다. 따라서 이 값을
> 설정했다고 breaking schema가 자동 거부된다고 해석하면 안 된다. 실제 registry gate가 wiring되기
> 전까지 호환성은 adopter의 schema CI가 소유한다.
`guarantees.delivery`는 `AT_LEAST_ONCE`, `retry.mode`는 `NONE`이 기본값이다. 자동 retry가 기본으로
꺼져 있는 이유는 순서를 흐트러뜨리거나 비멱등 side effect를 두 번 실행하는 retry가 눈에 보이는
실패보다 나쁘기 때문이다.
+15 -2
View File
@@ -88,10 +88,23 @@ consumer recovery가 동시에 나빠지고, 유계·검증 가능한 실패가
## DB 마이그레이션
```text
V1__messaging_outbox.sql
V2__messaging_inbox.sql
V1001__messaging_outbox.sql
V1002__messaging_outbox_lease_fencing.sql
V1003__messaging_admin_operation_journal.sql
V1004__messaging_outbox_canonical_metadata.sql
V1101__messaging_inbox.sql
```
Messaging owns Flyway versions `1000..1999`. The starter assembles both JDBC reliability modules,
so their migrations deliberately share `classpath:db/migration/messaging` but must never reuse a
version. Keeping them in this reserved range also prevents collisions with the application's
ordinary `db/migration/postgresql` stream, whose low-numbered versions are independent.
When adopting outbox/inbox persistence, add `classpath:db/migration/messaging` to the deployment's
Flyway locations together with its normal application migration location. Do not copy or renumber
these files into the application's low-numbered stream; the reserved range is the namespace
boundary.
Outbox row는 business transaction과 같은 transaction에서 쓴다.
Inbox reservation은 handler side effect와 같은 transaction에서 쓴다.
별도 transaction이면 각 패턴이 닫으려던 창이 그대로 열려 있다.
+16
View File
@@ -9,6 +9,22 @@
**둘 다 필요하다.** Outbox만으로는 exactly-once가 되지 않는다.
## 채택할 때 먼저 적용할 DB migration
Outbox/Inbox JDBC 모듈의 DDL은 `classpath:db/migration/messaging`에 있다. Messaging은
Flyway version `1000..1999`를 예약해서 애플리케이션의 일반적인 저번호 migration과 버전이
겹치지 않게 한다.
배포에서 이 JDBC 구현을 채택할 때는 기존 Flyway location에 다음 location을 **추가**한다.
```text
classpath:db/migration/messaging
```
현재 순서는 `V1001..V1004`(outbox/admin)와 `V1101`(inbox)이다. starter 테스트가 두 JDBC
모듈을 실제 combined classpath로 올려 version 중복과 예약 대역 이탈을 검사한다. 개별 DDL의
의미와 전환 순서는 [migration-guide.md](migration-guide.md)를 따른다.
## Outbox
business transaction과 **같은 transaction**에서 row를 쓴다. 둘 다 commit되거나 둘 다 안 된다.
+25 -6
View File
@@ -20,18 +20,17 @@
> `FOR UPDATE SKIP LOCKED`, `ON CONFLICT`, `TIMESTAMPTZ`)이므로, 그 이름은 쓰지 않는 기술을
> 광고하고 vendor 중립 port(`messaging-reliability-api`)의 위치를 가렸다 (MSG-023).
>
> 또한 registry의 messaging leaf는 모두 `runtime_memberships`가 비어 있다. 이는 **build-only /
> incubating** — 어느 composition root에도 편입되지 않았다는 뜻이며, 아래의 등급과는 다른 축이다.
> 등급은 "무엇이 증명되었는가", membership은 "무엇이 실행되는가"를 말한다. 애플리케이션에 배선하려면
> registry를 먼저 바꾸고 `verifyRuntimeModuleMembership`을 통과시켜야 한다. 자세한 규칙은
> `src/messaging/CLAUDE.md`가 소유한다.
> `modules.json`은 messaging leaf의 `gradle_path`와 허용 의존성을 관리하지만
> `runtime_memberships` 필드는 없다. 실제 런타임 편입은 `app-bootstrap`의 Gradle 의존성과 starter /
> auto-configuration 경로가 결정한다. 아래 등급은 "무엇이 증명되었는가"를 말하며 런타임 편입 여부와
> 같은 축이 아니다. 자세한 composition/cutover 상태는 `src/messaging/CLAUDE.md`가 소유한다.
## 브로커 등급
| 브로커 | 등급 | 인증 기준 | Stable 기능 | 제한 |
|---|---|---|---|---|
| Kafka | Stable | 4.1.x | producer idempotence, consumer group, batch, pause/resume, replay, transaction capability | Share Group은 Experimental |
| RabbitMQ | Experimental | 4.3.x | exchange/routing, publisher confirm, mandatory return, manual ACK, quorum queue, retry queue, DLQ | 장애 시나리오 레인 미실행 — 증거 없음. stream 및 특수 plugin 미지원 |
| RabbitMQ | Experimental | 4.3.x | exchange/routing, publisher confirm, mandatory return, manual ACK, quorum queue, retry queue, DLQ | **현재 starter에서 선택 불가** — production `RabbitChannelPublisher`/transport bridge가 없어 `app.messaging.broker=rabbit`은 startup에서 거부된다. 장애 시나리오 증거도 아직 없음 |
| Pulsar | Experimental | 4.0 LTS + 4.2 | typed publish/consume, Shared, Key_Shared, schema | transaction 미승격, 기본 비활성 |
| NATS JetStream | Experimental | 2.14.x | stream, durable consumer, explicit ACK, dedupe, replay | native DLQ 없음(플랫폼이 대행), 기본 비활성 |
| Artemis/JMS | Extension | 범위 밖 | adapter SPI만 | 별도 ADR + Contract Suite 통과 필요 |
@@ -153,3 +152,23 @@ delivery timeout으로 나타난다. 이를 `REJECTED`로 보고하는 것은
- 운영 application에서의 topology 파괴 작업
- 일반 애플리케이션에 raw broker client 반환
- DLQ publish 확인 전 source ACK
## R1 compiler status
`adapter:outbound:messaging`의 contract/catalog/envelope compiler 군은 현재 **의도적으로 미배선**이다.
`DISABLED` + 빈 catalog/binding이 zero-resource 상태이며, 이 R1 compiler를 legacy
`MessagingConfig`에 연결해 Kafka ACK, wire compatibility, `ACTIVE_READY`, R2 qualification을
주장하지 않는다. 코드는 다음 세대 계약을 보존하지만 현재 채택 경로가 아니며, 실제 활성화는 별도 R2
composition/cutover에서 명시적으로 이뤄져야 한다.
### Optional mapping / bridge utilities
- `messaging-cloudevents`는 starter runtime에 자동 편입되지 않는 **opt-in mapping utility**다.
내부 envelope와 CloudEvent 객체 사이의 제한된 profile mapping을 제공하지만 binary/structured
CloudEvents wire mode 전체를 구현하거나 임의 CloudEvents producer와의 1.0 interoperability를
인증하지 않는다.
- `messaging-spring-cloud-stream-bridge`는 현재 `ChannelSend` seam과 publish-evidence 판단을 제공하는
framework-neutral bridge contract다. Spring Cloud Stream `StreamBridge` dependency/auto-configuration은
제공하지 않으므로 shipped Spring Cloud Stream integration으로 분류하지 않는다.
@@ -0,0 +1,27 @@
# Example only. This file is not loaded by Spring Boot.
# Copy the relevant block into deployment configuration and replace the secret reference.
ca-skeleton:
persistence-mongo:
enabled: true
active-profile: primary
platform:
profiles:
primary:
uri-secret: secret://mongodb/primary
topology: REPLICA_SET
production: true
stable-api-strict: true
consistency-default: PRIMARY_MAJORITY
server-selection-timeout: 3s
connect-timeout: 2s
socket-read-timeout: 5s
operation-timeout: 3s
pool-min-size: 2
pool-max-size: 40
pool-max-wait-time: 500ms
uuid-representation: STANDARD
decimal-representation: DECIMAL128
runtime-auto-create-indexes: false
tls-required: true
authentication-required: true
+6 -8
View File
@@ -90,7 +90,7 @@ otherwise. Being on the classpath is not being enabled.
| Design assumption | Repository reality | Adaptation |
|---|---|---|
| Gradle Kotlin DSL under `modules/mongodb*` | Groovy DSL, root `build.gradle` conventions, `LockMode.STRICT` locking | Dependencies declared in `src/adapter/outbound/persistence-mongo/build.gradle`; `gradle.lockfile` regenerated. |
| `mongodb-spring-boot-starter` is a separate module the app depends on | `modules.json` gives `adapter-outbound-persistence-mongo` `runtime_memberships: []` and does **not** list it among `app-bootstrap`'s allowed dependencies | The `autoconfigure` package stays inside the leaf and registers through the leaf's own `META-INF/spring/…AutoConfiguration.imports`. This differs from the httpclient precedent, where the starter moved to `:app-bootstrap`; here the registry forbids that edge. |
| `mongodb-spring-boot-starter` is a separate module the app depends on | `modules.json` gives `adapter-outbound-persistence-mongo` an explicit project boundary; runtime membership is derived from resolved runtime classpaths rather than a per-leaf registry field | The `autoconfigure` package stays inside the leaf and registers through the leaf's own `META-INF/spring/…AutoConfiguration.imports`. This differs from the httpclient precedent; dependency and runtime-membership gates decide whether the leaf is actually composed. |
| Spring Boot 4.1 / Spring Data MongoDB 5.1 baseline | Repository baseline is Spring Boot 4.0.8 / Spring Data MongoDB 5.0.x | The platform targets the Spring Data MongoDB **API surface** common to both; no 5.1-only type is referenced. The support matrix records the actual pinned versions. |
| `MongoRetryScope` lives in `mongodb-transaction` | The `mongodb-spring-data` failure translator must classify retry scope, and it cannot depend on `mongodb-transaction` | `MongoRetryScope` lives in `…api.error` (core-api), which both packages already depend on. Same values, same meaning, one legal position in the DAG. |
| `mongodb-migration-flamingock` depends on Flamingock | Adding an unvetted external dependency is out of scope for this task, and the design itself requires the public contract not to depend on Flamingock types | The adapter is provider-neutral: it consumes a platform-owned `FlamingockChangeUnitView`. Wiring an actual Flamingock distribution is a one-file change behind that view. |
@@ -124,19 +124,17 @@ otherwise. Being on the classpath is not being enabled.
## 5. Verification
The two release-gate scripts (`scripts/verify-mongodb-platform.sh` and
`scripts/verify-mongodb-advanced.sh`) were removed on 2026-08-15. They wrapped the Gradle lanes below
and added two things Gradle does not do on its own: a lane that executed zero tests was reported as a
failure rather than counted as a pass, and a `promotion.json` recording the commit, server image and
contract-manifest hash. Neither exists until something replaces it, so a green run of the commands
below is weaker evidence than the gate was.
The release-gate scripts `scripts/verify-mongodb-platform.sh` and
`scripts/verify-mongodb-advanced.sh` are present and wrap the named Gradle lanes with no-skip evidence
and promotion metadata. Use them when producing release/promotion evidence; the focused commands
below remain useful for local diagnosis.
From `src/`:
```bash
./gradlew :adapter:outbound:persistence-mongo:check --console=plain
./gradlew verifyCleanArchitectureDependencies --console=plain
./gradlew :app-bootstrap:test --tests '*CleanArchitectureTest' --console=plain
./gradlew :app-bootstrap:architectureTest --console=plain
```
The container-backed lanes the gate ran behind `MONGODB_DOCKER=1` — `mongoCompatibilityTest`,
@@ -50,7 +50,7 @@ mapping 문서는 목록을 소유한다 — 목록을 두 곳에 복제하면
## 강제
두 namespace 사이의 production dependency는 **0건**이며, 이것은 문서가 아니라 ArchUnit 규칙이 지킨다
(`CleanArchitectureTest`의 `NOTIFICATION_R1_AND_PLATFORM_DO_NOT_DEPEND_ON_EACH_OTHER`).
(`ApplicationBoundaryArchitectureTest`의 `NOTIFICATION_R1_AND_PLATFORM_DO_NOT_DEPEND_ON_EACH_OTHER`).
변환이 필요해지면 `dev.caskeleton.application.notification.compatibility.r1` 한 패키지에만 두고, 그
패키지만 규칙에서 예외로 인정한다. 예외를 한 곳으로 모으는 것이 목적이다 — 두 모델이 서로를 아는
+8 -42
View File
@@ -3,18 +3,6 @@
# change: ./gradlew updateNotificationApiSurface -PapproveNotificationApiChange
dev.caskeleton.adapter.outbound.notification.NotificationConfig
dev.caskeleton.adapter.outbound.notification.NotificationRoutesSettings
dev.caskeleton.adapter.outbound.notification.catalog.CompiledNotificationBinding
dev.caskeleton.adapter.outbound.notification.catalog.NotificationBindingCompiler
dev.caskeleton.adapter.outbound.notification.catalog.NotificationCanonicalRouteCatalog
dev.caskeleton.adapter.outbound.notification.catalog.NotificationCatalogException
dev.caskeleton.adapter.outbound.notification.catalog.NotificationCutoverRouteCatalog
dev.caskeleton.adapter.outbound.notification.catalog.NotificationPlanAdapter
dev.caskeleton.adapter.outbound.notification.catalog.NotificationProviderCapabilityCard
dev.caskeleton.adapter.outbound.notification.catalog.NotificationProviderCapabilityDescriptorSource
dev.caskeleton.adapter.outbound.notification.catalog.NotificationProviderDescriptor
dev.caskeleton.adapter.outbound.notification.catalog.NotificationProviderRuntimeProfile
dev.caskeleton.adapter.outbound.notification.catalog.NotificationRouteDescriptor
dev.caskeleton.adapter.outbound.notification.catalog.NotificationTemplateDescriptor
dev.caskeleton.adapter.outbound.notification.core.FailOpenNotificationProvider
dev.caskeleton.adapter.outbound.notification.core.NotificationProvider
dev.caskeleton.adapter.outbound.notification.core.RoutingNotifier
@@ -32,8 +20,14 @@ dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.Notification
dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.ProviderRuntimeAssembler
dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.ProviderType
dev.caskeleton.adapter.outbound.notification.platform.autoconfigure.SmtpProviderRuntimeAssembler
dev.caskeleton.adapter.outbound.notification.platform.callback.CallbackLimits
dev.caskeleton.adapter.outbound.notification.platform.callback.CallbackVerificationResult
dev.caskeleton.adapter.outbound.notification.platform.callback.MapProviderCallbackAdapterRegistry
dev.caskeleton.adapter.outbound.notification.platform.callback.MapProviderEventProjectorRegistry
dev.caskeleton.adapter.outbound.notification.platform.callback.ProviderCallbackAdapter
dev.caskeleton.adapter.outbound.notification.platform.callback.ProviderCallbackAdapterRegistry
dev.caskeleton.adapter.outbound.notification.platform.callback.ProviderCallbackVerificationRequest
dev.caskeleton.adapter.outbound.notification.platform.callback.VerifiedCallback
dev.caskeleton.adapter.outbound.notification.platform.dispatch.AttemptPermit
dev.caskeleton.adapter.outbound.notification.platform.dispatch.CapabilityReconciliationGateway
dev.caskeleton.adapter.outbound.notification.platform.dispatch.ConfiguredProfileCatalog
@@ -150,31 +144,9 @@ dev.caskeleton.adapter.outbound.notification.platform.template.TemplateSlotMode
dev.caskeleton.adapter.outbound.notification.platform.template.TemplateSlotPolicy
dev.caskeleton.adapter.outbound.notification.platform.template.ThymeleafNotificationRenderer
dev.caskeleton.adapter.outbound.notification.platform.template.ThymeleafStringTemplateEngine
dev.caskeleton.adapter.outbound.notification.provider.AttemptCorrelationId
dev.caskeleton.adapter.outbound.notification.provider.InlineNotificationAttemptAdapter
dev.caskeleton.adapter.outbound.notification.provider.NotificationAdmissionReadinessAdapter
dev.caskeleton.adapter.outbound.notification.provider.NotificationAttemptContext
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderAttemptAdapter
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderAttemptClient
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderRateAdmission
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderReadinessProbe
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderReadinessSnapshot
dev.caskeleton.adapter.outbound.notification.provider.NotificationProviderSecretMaterialProvider
dev.caskeleton.adapter.outbound.notification.provider.NotificationReconciliationAdapter
dev.caskeleton.adapter.outbound.notification.provider.NotificationSecretMaterialHandle
dev.caskeleton.adapter.outbound.notification.provider.PreparedNotificationAttempt
dev.caskeleton.adapter.outbound.notification.provider.ProviderMessageReference
dev.caskeleton.adapter.outbound.notification.provider.ReconciliationLookupMode
dev.caskeleton.adapter.outbound.notification.slack.webhook.SlackClient
dev.caskeleton.adapter.outbound.notification.slack.webhook.SlackNotificationAdapterConfig
dev.caskeleton.adapter.outbound.notification.slack.webhook.SlackWebhookProvider
dev.caskeleton.adapter.outbound.notification.template.LocalEmailRenderer
dev.caskeleton.adapter.outbound.notification.template.NotificationTemplateCatalog
dev.caskeleton.adapter.outbound.notification.template.NotificationTemplateManifest
dev.caskeleton.adapter.outbound.notification.template.NotificationTemplateRenderer
dev.caskeleton.adapter.outbound.notification.template.RenderedNotification
dev.caskeleton.adapter.outbound.notification.template.SlackBlockKitRenderer
dev.caskeleton.adapter.outbound.notification.template.TemplateRenderingException
dev.caskeleton.application.notification.ApplyNotificationReceiptCommand
dev.caskeleton.application.notification.ApplyNotificationReceiptResult
dev.caskeleton.application.notification.ApplyNotificationReceiptUseCase
@@ -292,7 +264,6 @@ dev.caskeleton.application.notification.platform.admin.RedriveCommand
dev.caskeleton.application.notification.platform.admin.SetProviderStateCommand
dev.caskeleton.application.notification.platform.admin.SuppressCommand
dev.caskeleton.application.notification.platform.api.CallbackIngestionResult
dev.caskeleton.application.notification.platform.api.CallbackRequest
dev.caskeleton.application.notification.platform.api.CancelCommand
dev.caskeleton.application.notification.platform.api.CancelResult
dev.caskeleton.application.notification.platform.api.ChannelPreferenceOverride
@@ -306,6 +277,8 @@ dev.caskeleton.application.notification.platform.api.DeduplicationSpec
dev.caskeleton.application.notification.platform.api.DeliveryAttemptId
dev.caskeleton.application.notification.platform.api.EncodedNotificationPlan
dev.caskeleton.application.notification.platform.api.IdempotencyKey
dev.caskeleton.application.notification.platform.api.NormalizedEventType
dev.caskeleton.application.notification.platform.api.NormalizedProviderEvent
dev.caskeleton.application.notification.platform.api.NotificationAcceptance
dev.caskeleton.application.notification.platform.api.NotificationId
dev.caskeleton.application.notification.platform.api.NotificationOrchestrator
@@ -372,22 +345,16 @@ dev.caskeleton.application.notification.platform.api.routing.DeliveryStrategy
dev.caskeleton.application.notification.platform.api.routing.ExplicitChannel
dev.caskeleton.application.notification.platform.api.routing.OrderedFallback
dev.caskeleton.application.notification.platform.callback.AppendEventResult
dev.caskeleton.application.notification.platform.callback.CallbackLimits
dev.caskeleton.application.notification.platform.callback.CallbackPayloadProtectionPort
dev.caskeleton.application.notification.platform.callback.CallbackVerificationResult
dev.caskeleton.application.notification.platform.callback.DeliveryAttemptResolverPort
dev.caskeleton.application.notification.platform.callback.DeliveryAttemptSnapshot
dev.caskeleton.application.notification.platform.callback.DeliveryProjection
dev.caskeleton.application.notification.platform.callback.DeliveryProjectionStorePort
dev.caskeleton.application.notification.platform.callback.EngagementFacts
dev.caskeleton.application.notification.platform.callback.IngestProviderCallbackApplicationUseCase
dev.caskeleton.application.notification.platform.callback.NormalizedEventType
dev.caskeleton.application.notification.platform.callback.NormalizedProviderEvent
dev.caskeleton.application.notification.platform.callback.NotificationSideEffectPort
dev.caskeleton.application.notification.platform.callback.ProjectionResult
dev.caskeleton.application.notification.platform.callback.ProjectionStatus
dev.caskeleton.application.notification.platform.callback.ProviderCallbackAdapter
dev.caskeleton.application.notification.platform.callback.ProviderCallbackAdapterRegistry
dev.caskeleton.application.notification.platform.callback.ProviderEventLedger
dev.caskeleton.application.notification.platform.callback.ProviderEventProjectionService
dev.caskeleton.application.notification.platform.callback.ProviderEventProjector
@@ -398,7 +365,6 @@ dev.caskeleton.application.notification.platform.callback.ProviderEventSource
dev.caskeleton.application.notification.platform.callback.ProviderRequestIdHash
dev.caskeleton.application.notification.platform.callback.StandardDeliveryProjector
dev.caskeleton.application.notification.platform.callback.SuppressionFacts
dev.caskeleton.application.notification.platform.callback.VerifiedCallback
dev.caskeleton.application.notification.platform.callback.VerifiedProviderEvent
dev.caskeleton.application.notification.platform.contact.ApnsDeviceToken
dev.caskeleton.application.notification.platform.contact.ApnsEnvironment
+47 -10
View File
@@ -54,9 +54,10 @@ nonce and tag. A larger configured value would pass every check above the databa
## Provider profiles
Profiles are a map under `providers`, keyed by profile id. There are no environment variables for
them, because the keys are deployment-chosen; supply them as YAML or as
`CA_SKELETON_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`.
Profiles are a map under `providers`, keyed by profile id. Arbitrary deployment-chosen ids can be
supplied as YAML or through Spring relaxed binding (`CA_SKELETON_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`).
The shipped reference profiles `smtp` and `ses` additionally expose explicit `APP_NOTIFICATION_PLATFORM_SMTP_*`
and `APP_NOTIFICATION_PLATFORM_SES_*` aliases so operators do not have to invent binding names.
| Field | Meaning |
|---|---|
@@ -64,7 +65,7 @@ them, because the keys are deployment-chosen; supply them as YAML or as
| `enabled` | A disabled profile is bound and validated but contributes no runtime |
| `primary-for-channel` | Exactly one primary per channel |
| `environment` | Required when enabled |
| `credential-profile` | Resolved through `SecretMaterialProvider`; never an inline secret |
| `credential-profile` | Provider credential key id resolved through `SecretMaterialProvider`; never inline secret material |
| `topic` | APNs bundle id |
| `vapid-public-key` | Web Push application server key |
| `callback-signing-secret-ref` | Reference, not material |
@@ -75,6 +76,41 @@ them, because the keys are deployment-chosen; supply them as YAML or as
A profile pins provider type, environment, credential profile, timeouts, concurrency and rate limit.
Sender identity and credential profile are separate concerns.
### SES profile fields
An enabled SES profile adds a typed `ses` block:
| Field | Meaning |
|---|---|
| `ses.endpoint` | SES API base URI; the mapper appends `/v2/email/outbound-emails` |
| `ses.region` | SigV4 region |
| `ses.sender-identity` | verified SES From identity |
| `ses.access-key-id` | AWS access key id; identifier only, not secret material |
| `ses.configuration-set` | optional SES configuration-set name |
| `credential-profile` | key id for the secret access-key material; generation 1 is activated at assembly |
The shipped reference profile is `providers.ses` and is disabled by default. It is controlled by
`APP_NOTIFICATION_PLATFORM_SES_*`; its secret material comes from
`APP_NOTIFICATION_PLATFORM_PROVIDER_CREDENTIAL_KEY`, whose active key id must match
`APP_NOTIFICATION_PLATFORM_SES_CREDENTIAL_KEY_ID`.
`type` is the closed **provider model**, not a promise that the shipped composition contains a
dispatch assembler for every value. Current shipped reachability is:
| Provider type | Contract/adapter code | Shipped dispatch assembler | Shipped callback assembler | What happens when enabled for dispatch |
|---|---|---|---|---|
| `SMTP` | yes | **yes** | no | assembles when Spring Mail relay settings are complete |
| `SES` | yes | **yes** | **yes** | assembles an EMAIL runtime from the typed `ses` block; SNS callback verification remains available in `INGEST_ONLY` |
| `TWILIO` | yes | no | no | dispatch fails startup by profile name |
| `FCM` | yes | no | no | dispatch fails startup by profile name |
| `APNS` | yes | no | no | dispatch fails startup by profile name |
| `WEB_PUSH` | yes | no | no | dispatch fails startup by profile name |
| `WEBHOOK` | yes | no | no | dispatch fails startup by profile name |
This distinction is deliberate: tested provider protocol code is not the same thing as a
composition-reachable provider. Adding a family to the shipped runtime requires a
`ProviderRuntimeAssembler` plus the settings/secret inputs that adapter actually needs.
## SMTP relay
The one provider profile the template ships, off. A deployment that wants the common case sets
@@ -98,15 +134,16 @@ already owns them and a second spelling would be a second thing to keep in step.
| Property | Environment variable | Default | Bound |
|---|---|---|---|
| `smtp.tls-mode` | `APP_NOTIFICATION_PLATFORM_SMTP_TLS_MODE` | `STARTTLS_REQUIRED` | `STARTTLS_REQUIRED` or `IMPLICIT_TLS` |
| `smtp.sender-identity` | `APP_NOTIFICATION_PLATFORM_SMTP_SENDER_IDENTITY` | `no-reply@example.invalid` | address |
| `smtp.connect-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_CONNECT_TIMEOUT` | `5s` | positive, finite |
| `smtp.read-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_READ_TIMEOUT` | `10s` | positive, finite |
| `smtp.write-timeout` | `APP_NOTIFICATION_PLATFORM_SMTP_WRITE_TIMEOUT` | `10s` | positive, finite |
| `smtp.max-concurrency` | `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` | `4` | positive |
The TLS mode enum has no plaintext member. An unencrypted relay is refused by construction rather
than by a validator somebody has to remember to run.
SMTP transport configuration has one owner: Spring Mail. The actual `JavaMailSenderImpl` must use required STARTTLS (`mail.smtp.starttls.enable=true` plus `mail.smtp.starttls.required=true`) or implicit TLS (`mail.smtp.ssl.enable=true`). It must also have positive `mail.smtp.connectiontimeout`, `mail.smtp.timeout`, and `mail.smtp.writetimeout` values. SMTP assembly fails before serving traffic when those properties are absent or invalid.
The native environment contract is `SPRING_MAIL_HOST`, `SPRING_MAIL_PORT`, optional
`SPRING_MAIL_USERNAME` / secret `SPRING_MAIL_PASSWORD`, plus the
`SPRING_MAIL_PROPERTIES_MAIL_SMTP_*` TLS and timeout keys listed in `.env.example`. These names stay
Spring-native because Spring Boot itself owns and consumes `spring.mail.*`; the notification module
does not create a second alias for the same relay.
The default sender is an RFC 2606 reserved domain that resolves nowhere, so a deployment that forgot
to set one produces a traceable bounce instead of mail apparently sent from an address it does not
+5 -2
View File
@@ -32,10 +32,13 @@
"callback-supported": {
"requires": "signature verification, duplicate suppression, and an event that arrives before its attempt is stored",
"status": "satisfied",
"lane": ":adapter:outbound:persistence-jpa:jpaPlatformContractTest",
"lanes": [
":adapter:outbound:persistence-jpa:jpaPlatformContractTest",
":application-notification:test"
],
"evidence": [
"adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/notification/LateEventBindingContractTest.java",
"application-core/src/test/java/dev/caskeleton/application/notification/platform/callback/CallbackIngestionAtomicityTest.java"
"application-notification/src/test/java/dev/caskeleton/application/notification/platform/callback/CallbackIngestionAtomicityTest.java"
]
},
"recoverable": {
+5 -2
View File
@@ -37,8 +37,11 @@ R1 public type 100개를 어떻게 할 것인지 다루지 않았다. 그래서
문서 어디에도 답이 없었다.
- **canonical은 `..notification.platform..`이다.** NOTIF-ADR-005가 근거와 함께 정한다.
- **R1은 남지만 새 production consumer를 받지 않는다.** 삭제 계획은 별개이며, R0 삭제와 함께
사라지지 않는다.
- **application R1 public contract는 남지만 새 production consumer를 받지 않는다.** 삭제 계획은
별개이며, R0 삭제와 함께 사라지지 않는다.
- R1을 따라 만들어졌지만 composition root에서 한 번도 조립되지 않았던 outbound adapter의
`catalog/`, `provider/`, `template/` 실험 구현은 제거했다. 실제 runtime은
`dev.caskeleton.adapter.outbound.notification.platform..`만 사용한다.
- **전수 분류표는 `docs/notification/module-mapping.md`에 있다** (replace / bridge / retain / delete).
- **두 namespace 간 production dependency는 0건이며 ArchUnit이 강제한다.** 변환이 필요하면
`dev.caskeleton.application.notification.compatibility.r1` 한 곳에만 둔다.
+20 -2
View File
@@ -51,7 +51,7 @@ that owns its responsibility. No public contract, evidence rule, or reliability
| `notification-observability` (Micrometer impl) | `adapter:outbound:notification` | `…platform.observation` |
| `notification-admin-runtime` | `adapter:outbound:notification` | `…platform.admin` |
| `notification-reactor` | `adapter:outbound:notification` | `…platform.reactor` |
| `notification-spring-boot-starter` | `adapter:outbound:notification` (+ `app-bootstrap` wiring) | `…platform.autoconfigure` |
| `notification-spring-boot-starter` | `adapter:outbound:notification` | `…platform.autoconfigure` |
| `notification-persistence-jpa` | `adapter:outbound:persistence-jpa` | `dev.caskeleton.adapter.outbound.persistence.notification.platform` |
| `notification-inbox-jpa` | `adapter:outbound:persistence-jpa` | `…persistence.notification.platform.inbox` |
| `notification-callback-mvc` | `adapter:inbound:web` | `dev.caskeleton.adapter.inbound.web.notification.platform.callback` |
@@ -93,13 +93,31 @@ Two plan edges cannot be expressed as project edges in this repository, and are
is therefore intentionally **not** executed by the agent; the working tree carries the change and the
human owner commits.
## Runtime reachability after the R1 adapter cleanup
The application R1 contract covered by NOTIF-ADR-005 is a separate question from the abandoned
outbound implementation that had been built around it. The latter is gone: the notification leaf no
longer contains top-level `catalog/`, `provider/`, or `template/` R1 adapter packages. They had no
production composition consumer and were proved only by their own fakes.
The useful rendering invariant from that experiment was not discarded. R2
`platform.template.TemplateSlotPolicy` now validates the final HTML against the reviewed tag and
attribute subset in addition to escaping substituted values. Active script markup, event-handler
attributes and non-HTTPS HTML links are refused.
R2 provider protocol packages remain because they implement the canonical platform SPI and have
contract tests. Their presence does **not** make them shipped dispatch runtimes. Current composition
reachability is SMTP and SES for dispatch, with SES also available for callback ingestion; the remaining
provider packages are extension assets until a composition contributes a `ProviderRuntimeAssembler`
with the settings and secret sources that family requires. See `support-matrix.md` for the explicit table.
## R1 public type disposition (NOTIF-ADR-005)
NOTIF-ADR-005 makes `..notification.platform..` canonical and keeps the R1 namespace in place
without new consumers. The ADR owns the rule; this table owns the list, so the two do not drift
apart by being written twice.
`NOTIFICATION_R1_AND_PLATFORM_DO_NOT_DEPEND_ON_EACH_OTHER` in `CleanArchitectureTest` enforces the
`NOTIFICATION_R1_AND_PLATFORM_DO_NOT_DEPEND_ON_EACH_OTHER` in `ApplicationBoundaryArchitectureTest` enforces the
boundary: production dependencies between the two namespaces are zero, and the only permitted
exception is `dev.caskeleton.application.notification.compatibility.r1`.
+19
View File
@@ -24,6 +24,25 @@ against real PostgreSQL; the wire and the crash are not. That is what the grade
| In-app inbox | Own database | Optional stable | `PERSISTED`, `SEEN`, `READ` |
| Webhook | HTTP client platform | Extension | Whatever the receiving HTTP contract states |
## Shipped provider assembly reachability
The grade above describes protocol/reliability evidence. It does **not** mean every reference
implementation is selectable in the default composition. Dispatch reachability is a separate axis:
| Provider family | Dispatch assembler in shipped composition | Callback assembler | Current use |
|---|---|---|---|
| SMTP | **yes** | no | EMAIL dispatch reference family |
| SES | **yes** | **yes** | EMAIL dispatch + SNS callback ingestion; disabled reference profile ships in `config/notification.yml` |
| Twilio | no | no | contract implementation / extension wiring |
| FCM | no | no | contract implementation / extension wiring |
| APNs | no | no | contract implementation / extension wiring |
| Web Push | no | no | contract implementation / extension wiring |
| Webhook | no | no | extension wiring |
An enabled dispatch profile with no assembler fails startup by profile/family; it never silently
assembles into an empty runtime. SMTP additionally names `spring.mail.host` when its shipped
assembler is absent because the relay was not configured.
## What each grade requires
| Grade | Requires |
+149
View File
@@ -0,0 +1,149 @@
# Object Storage capability — Spring field path to environment-variable template.
#
# SSOT for deployment-facing app.object-storage.* names. Map placeholders are symbolic:
# PROVIDER, DESTINATION and PROFILE are replaced by the configured map key.
#
# The Java records remain the type/default authority. ObjectStorageEnvManifestTest derives their
# field paths and fails when this manifest drifts. scan-maintenance.enabled is a conditional-only
# property and is therefore listed as an explicit extra.
fields:
- field: enabled
env: APP_OBJECT_STORAGE_ENABLED
- field: default-destination
env: APP_OBJECT_STORAGE_DEFAULT_DESTINATION
- field: providers[PROVIDER].type
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_TYPE
- field: providers[PROVIDER].version
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_VERSION
- field: providers[PROVIDER].root
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_ROOT
- field: providers[PROVIDER].maximum-object-bytes
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_MAXIMUM_OBJECT_BYTES
- field: providers[PROVIDER].chunk-bytes
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_CHUNK_BYTES
- field: providers[PROVIDER].s3.provider-version
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_PROVIDER_VERSION
- field: providers[PROVIDER].s3.bucket
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_BUCKET
- field: providers[PROVIDER].s3.region
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_REGION
- field: providers[PROVIDER].s3.expected-owner
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_EXPECTED_OWNER
- field: providers[PROVIDER].s3.deployment-identity
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_DEPLOYMENT_IDENTITY
- field: providers[PROVIDER].s3.endpoint-override
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_ENDPOINT_OVERRIDE
- field: providers[PROVIDER].s3.addressing
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_ADDRESSING
- field: providers[PROVIDER].s3.auto-create-bucket
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_AUTO_CREATE_BUCKET
- field: providers[PROVIDER].s3.public-acl
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_PUBLIC_ACL
- field: providers[PROVIDER].s3.credentials.mode
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CREDENTIALS_MODE
- field: providers[PROVIDER].s3.credentials.access-key-environment
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CREDENTIALS_ACCESS_KEY_ENVIRONMENT
- field: providers[PROVIDER].s3.credentials.secret-key-environment
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CREDENTIALS_SECRET_KEY_ENVIRONMENT
- field: providers[PROVIDER].s3.timeouts.api-call
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_API_CALL
- field: providers[PROVIDER].s3.timeouts.api-attempt
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_API_ATTEMPT
- field: providers[PROVIDER].s3.timeouts.connect
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_CONNECT
- field: providers[PROVIDER].s3.timeouts.tls-negotiation
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_TLS_NEGOTIATION
- field: providers[PROVIDER].s3.timeouts.acquire
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_ACQUIRE
- field: providers[PROVIDER].s3.timeouts.read
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_READ
- field: providers[PROVIDER].s3.timeouts.write
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_TIMEOUTS_WRITE
- field: providers[PROVIDER].s3.pool.maximum-concurrency
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_POOL_MAXIMUM_CONCURRENCY
- field: providers[PROVIDER].s3.pool.maximum-pending-acquires
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_POOL_MAXIMUM_PENDING_ACQUIRES
- field: providers[PROVIDER].s3.retry.maximum-attempts
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_RETRY_MAXIMUM_ATTEMPTS
- field: providers[PROVIDER].s3.retry.base-delay
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_RETRY_BASE_DELAY
- field: providers[PROVIDER].s3.retry.maximum-backoff
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_RETRY_MAXIMUM_BACKOFF
- field: providers[PROVIDER].s3.shutdown-grace
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_SHUTDOWN_GRACE
- field: providers[PROVIDER].s3.binding-revision
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_BINDING_REVISION
- field: providers[PROVIDER].s3.evidence-revision
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_EVIDENCE_REVISION
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].status
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_STATUS
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].source
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_SOURCE
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].evidence-digest
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_EVIDENCE_DIGEST
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].observed-at
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_OBSERVED_AT
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].valid-until
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_VALID_UNTIL
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].provider-and-deployment-identity
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_PROVIDER_AND_DEPLOYMENT_IDENTITY
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].capabilities
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_CAPABILITIES
- field: providers[PROVIDER].s3.capability-profiles[PROFILE].limitations
env: APP_OBJECT_STORAGE_PROVIDERS_PROVIDER_S3_CAPABILITY_PROFILES_PROFILE_LIMITATIONS
- field: destinations[DESTINATION].provider-ref
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_PROVIDER_REF
- field: destinations[DESTINATION].route-token
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_ROUTE_TOKEN
- field: destinations[DESTINATION].binding-revision
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_BINDING_REVISION
- field: destinations[DESTINATION].policy-revision
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_POLICY_REVISION
- field: destinations[DESTINATION].publication-requirement
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_PUBLICATION_REQUIREMENT
- field: destinations[DESTINATION].retention-requirement
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_RETENTION_REQUIREMENT
- field: destinations[DESTINATION].encryption-requirement
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_ENCRYPTION_REQUIREMENT
- field: destinations[DESTINATION].capability-requirements
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_CAPABILITY_REQUIREMENTS
- field: destinations[DESTINATION].minimum-replay-horizon
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_MINIMUM_REPLAY_HORIZON
- field: destinations[DESTINATION].operation-profile
env: APP_OBJECT_STORAGE_DESTINATIONS_DESTINATION_OPERATION_PROFILE
- field: legacy.enabled
env: APP_OBJECT_STORAGE_LEGACY_ENABLED
- field: legacy.backend
env: APP_OBJECT_STORAGE_LEGACY_BACKEND
- field: legacy.base-path
env: APP_OBJECT_STORAGE_LEGACY_BASE_PATH
- field: legacy.bucket
env: APP_OBJECT_STORAGE_LEGACY_BUCKET
- field: legacy.endpoint
env: APP_OBJECT_STORAGE_LEGACY_ENDPOINT
- field: legacy.region
env: APP_OBJECT_STORAGE_LEGACY_REGION
- field: legacy.access-key
env: APP_OBJECT_STORAGE_LEGACY_ACCESS_KEY
- field: legacy.secret-key
env: APP_OBJECT_STORAGE_LEGACY_SECRET_KEY
- field: legacy.path-style-access
env: APP_OBJECT_STORAGE_LEGACY_PATH_STYLE_ACCESS
- field: legacy.auto-create-bucket
env: APP_OBJECT_STORAGE_LEGACY_AUTO_CREATE_BUCKET
- field: legacy-adoption.enabled
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_ENABLED
- field: legacy-adoption.mode
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_MODE
- field: legacy-adoption.report-path
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_REPORT_PATH
- field: legacy-adoption.reviewed-manifest-path
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_REVIEWED_MANIFEST_PATH
- field: legacy-adoption.reviewed-manifest-sha256
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_REVIEWED_MANIFEST_SHA256
- field: legacy-adoption.batch-size
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_BATCH_SIZE
- field: legacy-adoption.operation-timeout
env: APP_OBJECT_STORAGE_LEGACY_ADOPTION_OPERATION_TIMEOUT
- field: scan-maintenance.enabled
env: APP_OBJECT_STORAGE_SCAN_MAINTENANCE_ENABLED
+67
View File
@@ -0,0 +1,67 @@
# Structured log field dictionary
This file is the naming SSOT for structured fields emitted by application/bootstrap runtime code.
A new field should be added here before it becomes a new search/filter dimension.
The message text is for humans. These fields are the stable machine-query surface.
## Startup and error classification
| Field | Meaning | Cardinality expectation |
|---|---|---|
| `startup.phase` | Startup phase such as env-validation, migration or adapter-check | bounded |
| `error.code` | Stable error-code registry value | bounded |
| `error.category` | Stable error category | bounded |
| `error.root_cause.class` | Root exception class for startup failure diagnosis | bounded by codebase/dependencies |
| `error.root_cause.message` | Root exception message | unbounded; diagnosis only, not metric/tag material |
Startup failures go through `StartupFailures`; callers do not construct their own startup error
classification.
## Runtime warning and retry classification
| Field | Meaning | Cardinality expectation |
|---|---|---|
| `warning.kind` | Stable warning shape, for example `meter-unavailable`, `setting-fallback`, `scheduled-task-failed`, `lease-expired-before-close` | bounded |
| `capability` | Capability that emitted the runtime event, for example `fileserver`, `outbox`, `distributed-lock` | bounded |
| `operation` | Bounded operation name such as `cleanup` or `relay` | bounded |
| `retry.disposition` | What the runtime will do after the event, for example `next-run` or `next-tick` | bounded |
| `meter` | Meter name or bounded meter operation that could not be updated | bounded by metrics registry |
| `env.key` | Configuration key involved in a fallback | bounded by env registry |
| `setting.rejected` | Rejected setting value rendered for diagnosis | potentially unbounded; never metric/tag material |
| `setting.applied` | Fallback value actually applied | bounded where possible |
A retry disposition does not imply an `error.code`. Add an error code only when the failure is
actually classified by the error registry.
## Fileserver cleanup
| Field | Meaning |
|---|---|
| `cleanup.deleted` | Objects deleted in one bounded cleanup run |
| `cleanup.skipped_active_lease` | Items skipped because an active upload lease still owns them |
| `cleanup.skipped_state_changed` | Items skipped because state changed after queueing |
| `cleanup.failed` | Cleanup items that failed in the batch |
| `cleanup.reclaimed_bytes` | Bytes reclaimed in the batch |
These are numeric event fields. They are not identity fields.
## Background executor rejection
| Field | Meaning |
|---|---|
| `executor_name` | Bounded executor identifier |
| `policy` | Rejection policy, currently `AbortPolicy` |
| `queue_size` | Queue size observed at rejection |
Executor rejection also carries `error.code=JOB_EXECUTOR_REJECTED` and its `error.category`.
## Cardinality and sensitive identifiers
Do not promote arbitrary identifiers to structured fields merely because they are useful in one
incident. Examples include distributed-lock keys, object keys, raw user identifiers, request
payloads and secret values.
The distributed-lock lease-expiry warning intentionally keeps the lock key only in human-readable
message text and does not emit `lock.key`. If a future operational requirement needs a searchable
lock identity, define a bounded/pseudonymized contract first instead of adding the raw key.
-1
View File
@@ -1,5 +1,4 @@
# Registry: Repository Access Capabilities
# SSOT: wiki/projects/ca-tmpl/registries/capabilities.yaml
# Schema owner: feature-contract-registry-governance
# Owner branch: feature-repository-access-permission-contract
# Last updated: 2026-06-05
File diff suppressed because it is too large Load Diff
+140 -174
View File
@@ -1,9 +1,8 @@
# Registry: Error Codes
# SSOT: wiki/projects/ca-tmpl/registries/error-codes.yaml
# Schema owner: feature-contract-registry-governance
# Category enum owner: feature-operational-error-observability-foundation
# Last updated: 2026-05-22
# Note: 이 파일은 Phase B 산출물. Phase C2(ca-tmpl 실 코드)에서 generated Java constants의 source.
# Last updated: 2026-09-21
# Scope: skeleton-wide OperationalError SSOT. Product/fork ApiErrorCode enums own local registries/contracts.
#
# Schema (per row):
# code: UPPER_SNAKE_CASE
@@ -13,7 +12,6 @@
# http_status: int (async-only failures use 500 placeholder)
# retryable: bool
# retry_after_seconds: int | null (RATE_LIMIT/TRANSIENT 권고 backoff)
# owner_branch: source branch (raw/branch-notes/feature-*.md)
# owner_layer: presentation | application | domain | infrastructure | crosscut
# client_safe_message: no token / no principal raw / no internal path / no stack trace
# log_level: ERROR | WARN | INFO
@@ -121,7 +119,8 @@ errors:
- code: AUTH_KID_UNKNOWN
category: AUTH
http_status: 401
retryable: true # 2026-06-01: false→true. JWKS 키 회전 중 unknown kid 는 ~5s 후 JWKS refresh 로 해소 가능(transient). retry_after_seconds=5 + client_safe_message "please retry" 와 정합. 키 고정 정책으로 전환 시 false 복귀.
# 2026-06-01: false→true. JWKS rotation 중 unknown kid는 refresh 후 해소 가능한 transient failure.
retryable: true
retry_after_seconds: 5
owner_branch: feature-security-operational-baseline
owner_layer: presentation
@@ -404,61 +403,6 @@ errors:
# ============================================================
# source: feature-file-resource-handling-contract L69 — "spring.servlet.multipart.max-file-size 10MB ... Spring 단의 enforcement가 실패 시 envelope 응답 보장" / 테스트 계약 "oversized upload가 generic 500으로 처리되면 실패"
- code: UPLOAD_SIZE_EXCEEDED
category: VALIDATION
http_status: 413
retryable: false
retry_after_seconds: null
owner_branch: feature-file-resource-handling-contract
owner_layer: presentation
client_safe_message: "Uploaded file exceeds maximum size"
log_level: WARN
runbook_link: null
compatibility_impact: none
required_test: contract-verification:file-upload
# source: feature-file-resource-handling-contract L72 — "allowed content-type allowlist starting set ..."
- code: UPLOAD_CONTENT_TYPE_REJECTED
category: VALIDATION
http_status: 415
retryable: false
retry_after_seconds: null
owner_branch: feature-file-resource-handling-contract
owner_layer: presentation
client_safe_message: "Uploaded content type is not allowed"
log_level: WARN
runbook_link: null
compatibility_impact: none
required_test: contract-verification:file-upload
# source: feature-file-resource-handling-contract — Decisionized Work Items "path traversal | normalized storage key only ... | traversal test"
- code: PATH_TRAVERSAL_DETECTED
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: feature-file-resource-handling-contract
owner_layer: presentation
client_safe_message: "Invalid file path"
log_level: ERROR
runbook_link: null
compatibility_impact: none
required_test: contract-verification:file-upload
# source: feature-file-resource-handling-contract L73 — "streaming download backpressure = response timeout 60s, max stream 100MB. 초과 시 truncate + ERROR log"
- code: DOWNLOAD_STREAMING_FAILURE
category: TRANSIENT_DEPENDENCY
http_status: 503
retryable: true
retry_after_seconds: 5
owner_branch: feature-file-resource-handling-contract
owner_layer: presentation
client_safe_message: "Download failed, please retry"
log_level: ERROR
runbook_link: "runbook://file/download-streaming-failure"
compatibility_impact: none
required_test: contract-verification:file-download
# ============================================================
# API contract transport-standard codes (feature-api-contract-baseline)
# ============================================================
@@ -560,19 +504,6 @@ errors:
# ============================================================
# source: feature-tenant-context-policy L71 — "tenant 미지원 모드에서 X-Tenant-Id 헤더 수신 시 400 TENANT_NOT_SUPPORTED (filter 단계)"
- code: TENANT_NOT_SUPPORTED
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: feature-tenant-context-policy
owner_layer: presentation
client_safe_message: "Tenant context is not supported by this deployment"
log_level: WARN
runbook_link: null
compatibility_impact: none
required_test: contract-verification:tenant-policy
# ============================================================
# Validation / Business rule (feature-business-rule-validation-contract)
# ============================================================
@@ -583,51 +514,11 @@ errors:
# Phase D(도메인 feature 적용) 시 본 registry에 추가.
# source: feature-operational-error-observability-foundation L110 — "code: VALIDATION_EMAIL_FORMAT, // registry-registered code" (validation field error JSON shape example)
- code: VALIDATION_EMAIL_FORMAT
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: feature-operational-error-observability-foundation
owner_layer: presentation
client_safe_message: "Invalid email format"
log_level: INFO
runbook_link: null
compatibility_impact: none
required_test: contract-verification:validation-envelope
# ============================================================
# Cache (feature-cache-consistency-contract)
# ============================================================
# source: feature-cache-consistency-contract — Decisionized Work Items "Redis unavailable | degrade only if declared | fail-fast for required cache | generic INTERNAL | unavailable mapping" / 테스트 "Redis unavailable이 degrade 가능 여부 없이 INTERNAL로 처리되면 실패"
- code: CACHE_UNAVAILABLE
category: TRANSIENT_DEPENDENCY
http_status: 503
retryable: true
retry_after_seconds: 2
owner_branch: feature-cache-consistency-contract
owner_layer: infrastructure
client_safe_message: "Service temporarily unavailable"
log_level: ERROR
runbook_link: "runbook://cache/unavailable"
compatibility_impact: none
required_test: contract-verification:cache-consistency
# source: feature-cache-consistency-contract L70 — "stampede 방지 default = single-instance Caffeine local lock, multi-instance HPA 시 Redisson RLock distributed mutex" / 테스트 "동일 key에 대해 동시 cache miss 시 backend 호출이 1회로 제한되는지 verify (stampede). 미충족 시 실패"
- code: CACHE_STAMPEDE_LOCK_TIMEOUT
category: TRANSIENT_DEPENDENCY
http_status: 503
retryable: true
retry_after_seconds: 1
owner_branch: feature-cache-consistency-contract
owner_layer: infrastructure
client_safe_message: "Service temporarily unavailable"
log_level: WARN
runbook_link: "runbook://cache/stampede-lock-timeout"
compatibility_impact: none
required_test: contract-verification:cache-consistency
# ============================================================
# Outbound HTTP (feature-outbound-http-client-baseline)
# ============================================================
@@ -824,54 +715,6 @@ errors:
# ============================================================
# source: feature-migration-startup-contract L71 — "startup exit code 표준 = ... migration 실패=70 ..." + Decisionized "startup failure log | structured log with startup.phase, error.code, error.category"
- code: MIGRATION_FAILED
category: INTERNAL
http_status: 500
retryable: false
retry_after_seconds: null
owner_branch: feature-migration-startup-contract
owner_layer: infrastructure
client_safe_message: "Internal server error"
log_level: ERROR
runbook_link: "runbook://migration/failed"
compatibility_impact: none
required_test: contract-verification:migration-startup
# source: feature-migration-startup-contract L71 — "startup exit code 표준 = env 누락/malformed=78 ..." / 테스트 "required env 누락 시 startup이 성공하면 실패"
- code: STARTUP_VALIDATION_FAILED
category: INTERNAL
http_status: 500
retryable: false
retry_after_seconds: null
owner_branch: feature-migration-startup-contract
owner_layer: infrastructure
client_safe_message: "Internal server error"
log_level: ERROR
runbook_link: "runbook://startup/validation-failed"
compatibility_impact: none
required_test: contract-verification:migration-startup
# source: feature-migration-startup-contract L71 — "startup exit code 표준 = ... required adapter disabled=72" / 테스트 "disabled required adapter로 app이 뜨면 실패"
- code: REQUIRED_ADAPTER_DISABLED
category: INTERNAL
http_status: 500
retryable: false
retry_after_seconds: null
owner_branch: feature-migration-startup-contract
owner_layer: infrastructure
client_safe_message: "Internal server error"
log_level: ERROR
runbook_link: "runbook://startup/required-adapter-disabled"
compatibility_impact: none
required_test: contract-verification:migration-startup
# source: feature-integration-adapter-templates §구현 가이드 §4 (Layer 3) + §Audit A2.
# Runtime-lifecycle fail-fast for an invoke against a DISABLED optional adapter
# (Kafka/Redis/Slack/Google Email). Deliberately distinct from the startup-lifecycle
# REQUIRED_ADAPTER_DISABLED above (exit 72): a runtime invoke ≠ a startup validation,
# so reusing the startup code would conflate two lifecycles (A2 resolution — new
# runtime code owned by this branch). retryable=false: the adapter stays disabled
# until redeploy, so retrying the same call never clears it.
- code: ADAPTER_DISABLED
category: INTERNAL
http_status: 500
@@ -886,19 +729,6 @@ errors:
required_test: adapter-contract:adapter-disabled-runtime-call
# source: feature-migration-startup-contract L71 — "startup exit code 표준 = ... profile mismatch=71" / 테스트 "prod profile에서 local-only 설정이 켜지면 실패"
- code: PROFILE_MISMATCH
category: INTERNAL
http_status: 500
retryable: false
retry_after_seconds: null
owner_branch: feature-migration-startup-contract
owner_layer: infrastructure
client_safe_message: "Internal server error"
log_level: ERROR
runbook_link: "runbook://startup/profile-mismatch"
compatibility_impact: none
required_test: contract-verification:migration-startup
# ============================================================
# Management / Actuator (feature-management-actuator-security-contract)
# ============================================================
@@ -916,3 +746,139 @@ errors:
runbook_link: "runbook://management/actuator-forbidden"
compatibility_impact: none
required_test: contract-verification:management-actuator
# ============================================================
# CURRENT CODE RECONCILIATION (2026-09-21)
# Skeleton-wide OperationalError entries that were live in code but absent from the Phase-B
# registry. Product-specific ApiErrorCode enums remain owned by their product modules.
# ============================================================
- code: VALIDATION_FAILED
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: application
client_safe_message: "Validation failed"
log_level: INFO
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: BAD_PARAMETER
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Invalid request parameter"
log_level: INFO
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: MAPPING_FAILED
category: VALIDATION
http_status: 400
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Request mapping failed"
log_level: INFO
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: BATCH_PARTIAL_FAILURE
category: VALIDATION
http_status: 200
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: application
client_safe_message: "Some batch items failed"
log_level: WARN
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: INTERNAL_ERROR
category: INTERNAL
http_status: 500
retryable: true
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: crosscut
client_safe_message: "Internal server error"
log_level: ERROR
runbook_link: "runbook://internal/error-spike"
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: UNAUTHENTICATED
category: AUTH
http_status: 401
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Authentication required"
log_level: WARN
runbook_link: "runbook://auth/token-missing"
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: INVALID_TOKEN
category: AUTH
http_status: 401
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Authentication failed"
log_level: WARN
runbook_link: "runbook://auth/token-malformed"
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: FORBIDDEN
category: AUTHZ
http_status: 403
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Access denied"
log_level: WARN
runbook_link: "runbook://authz/insufficient-permission"
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: ROUTE_NOT_FOUND
category: NOT_FOUND
http_status: 404
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: presentation
client_safe_message: "Route not found"
log_level: INFO
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
- code: DB_LOCK_TIMEOUT
category: CONFLICT
http_status: 409
retryable: false
retry_after_seconds: null
owner_branch: 2026-09-21-core-web-review-remediation
owner_layer: infrastructure
client_safe_message: "Database lock not available"
log_level: WARN
runbook_link: null
compatibility_impact: additive
required_test: contract-verification:operational-error-registry
+6 -36
View File
@@ -1,10 +1,9 @@
# Registry: HTTP Headers
# SSOT: wiki/projects/ca-tmpl/registries/headers.yaml
# Schema owner: feature-contract-registry-governance
# Last updated: 2026-05-22
#
# Conventions:
# - HTTP header name: kebab-case (X-Request-Id, X-Tenant-Id)
# - HTTP header name: kebab-case (X-Request-Id, X-Correlation-Id)
# - W3C standard headers: lowercase (traceparent, tracestate)
# - mdc_key: snake_case (foundation SSOT)
# - envelope_meta_field: camelCase (envelope SSOT)
@@ -24,20 +23,6 @@ headers:
compatibility_impact: none
required_test: contract-verification:envelope-headers
# source: feature-api-contract-baseline.md L67
# "X-Api-Version은 실험/compatibility 보조 header이며 path version과 충돌하면 path가 우선"
- name: X-Api-Version
direction: inbound
type: string
required: false
generated_if_missing: false
mdc_key: null
envelope_meta_field: null
owner_branch: feature-api-contract-baseline
case_style: kebab
compatibility_impact: additive
required_test: contract-verification:api-versioning
# source: feature-api-contract-baseline.md L77 / feature-rate-limit-idempotency-contract.md L66-67
# "idempotency header 이름은 Idempotency-Key" / "기본 scope는 (authenticatedPrincipal, idempotencyKey, useCaseName)"
- name: Idempotency-Key
@@ -67,7 +52,7 @@ headers:
required_test: contract-verification:rate-limit-headers
# source: feature-rate-limit-idempotency-contract.md scope L26 (rate limit response/log 기준)
# rate-limit 응답 표면 (limit/remaining/reset 3종은 표준 rate-limit signaling)
# app.rate-limit.enabled=true인 요청 경로에서만 생성되는 rate-limit 응답 표면
- name: X-RateLimit-Limit
direction: outbound
type: numeric
@@ -107,10 +92,10 @@ headers:
required_test: contract-verification:rate-limit-headers
# source: feature-api-compatibility-deprecation-contract.md L87
# "deprecation marker | OpenAPI deprecated: true + branch note | response header optional"
# "deprecation marker | OpenAPI deprecated: true + design record | response header optional"
- name: Deprecation
direction: outbound
type: rfc3339-date
type: http-date
required: false
generated_if_missing: false
mdc_key: null
@@ -121,10 +106,10 @@ headers:
required_test: contract-verification:deprecation-marker
# source: feature-api-compatibility-deprecation-contract.md L87
# "deprecation marker | OpenAPI deprecated: true + branch note | response header optional" (RFC 8594 Sunset)
# "deprecation marker | OpenAPI deprecated: true + design record | response header optional" (RFC 8594 Sunset)
- name: Sunset
direction: outbound
type: rfc3339-date
type: http-date
required: false
generated_if_missing: false
mdc_key: null
@@ -176,21 +161,6 @@ headers:
compatibility_impact: none
required_test: contract-verification:envelope-headers
# source: feature-tenant-context-policy.md L69, L101 (foundation)
# "tenant resolution 우선순위 = ... (2) 명시적 X-Tenant-Id 헤더 (admin/internal API only)" /
# "tenant_id | tenant context (활성 시) | downstream HTTP X-Tenant-Id (with allowlist)"
- name: X-Tenant-Id
direction: both
type: ulid
required: false
generated_if_missing: false
mdc_key: tenant_id
envelope_meta_field: null
owner_branch: feature-tenant-context-policy
case_style: kebab
compatibility_impact: additive
required_test: contract-verification:tenant-header-policy
# source: feature-security-operational-baseline.md L66
# "JWT Resource Server를 baseline security model로 둠" (Bearer token via Authorization header)
- name: Authorization
-1
View File
@@ -1,5 +1,4 @@
# Registry: MDC / Log Keys
# SSOT: wiki/projects/ca-tmpl/registries/mdc-keys.yaml
# Schema owner: feature-contract-registry-governance
# MDC SSOT: feature-operational-error-observability-foundation
# Last updated: 2026-05-22
+3 -4
View File
@@ -1,5 +1,4 @@
# Registry: Metrics
# SSOT: wiki/projects/ca-tmpl/registries/metrics.yaml
# Schema owner: feature-contract-registry-governance
# Owner branch: feature-metrics-alerting-contract
# Last updated: 2026-05-22
@@ -761,14 +760,14 @@ metrics:
# === Distributed tracing ===
# source: feature-distributed-tracing-contract — decisions
# "trace sampling rate default = prod 1%, staging 10%, dev/local 100%"
# "trace sampling rate default = prod 1%, dev/local 100%; shipped runtime profiles are local|dev|prod"
- name: tracing.sampling.rate
type: gauge
unit: total
tags:
- name: profile
cardinality_limit: 4
allowed_values: [prod, staging, dev, local]
cardinality_limit: 3
allowed_values: [prod, dev, local]
percentiles: null
histogram_buckets: null
alert_severity_thresholds:
+20 -36
View File
@@ -1,5 +1,4 @@
# Registry: Secrets Classification
# SSOT: wiki/projects/ca-tmpl/registries/secrets-classification.yaml
# Schema owner: feature-contract-registry-governance
# Owner branch: feature-secrets-config-source-contract
# Last updated: 2026-05-22
@@ -33,47 +32,19 @@ secrets:
compatibility_impact: breaking
required_test: secrets-contract:db-password-no-leak-in-actuator
- name: APP_SECURITY_JWT_SIGNING_KEY
# source: feature-secrets-config-source-contract 2026-05-22
# "JWT signing key는 24h overlap window 유지 (security branch와 cross-link)"
# + feature-security-operational-baseline "rotation overlap window = 새 kid 도입 → 24h 동안 old kid 병행"
classification: secret
source: secret-manager
rotation_policy: overlap-24h
prod_default: null
dev_sentinel_prefix: __LOCAL_DEV_
owner_branch: feature-secrets-config-source-contract
masking_rule: full
compatibility_impact: breaking
required_test: secrets-contract:jwt-signing-key-rotation-overlap
- name: APP_SECURITY_OAUTH_CLIENT_SECRET
# source: feature-secrets-config-source-contract 2026-05-22
# "secret classification은 ... naming pattern은 보조(suffix _TOKEN, _KEY, _PASSWORD)"
# + feature-security-operational-baseline "JWT Resource Server를 baseline security model" (OAuth 자격 증명 분류)
- name: SPRING_MAIL_PASSWORD
# source: notification/fileserver techlead review H2 — credential consumed natively by Spring
# Mail and therefore intentionally retains the SPRING_* name rather than gaining an APP_* alias.
classification: secret
source: secret-manager
rotation_policy: restart-only
prod_default: null
required_when: APP_NOTIFICATION_PLATFORM_SMTP_ENABLED=true
dev_sentinel_prefix: __LOCAL_DEV_
owner_branch: feature-secrets-config-source-contract
owner_branch: 2026-09-21-notification-review-remediation
masking_rule: full
compatibility_impact: breaking
required_test: secrets-contract:oauth-client-secret-no-leak
- name: APP_EXTERNAL_API_KEY
# source: feature-secrets-config-source-contract 2026-05-22
# "external API key는 application restart 시 reload"
# (per-dependency suffix는 adapter 등록 시 추가; 본 row는 baseline 분류 정의)
classification: secret
source: secret-manager
rotation_policy: restart-only
prod_default: null
dev_sentinel_prefix: __LOCAL_DEV_
owner_branch: feature-secrets-config-source-contract
masking_rule: full_except_last_4
compatibility_impact: breaking
required_test: secrets-contract:external-api-key-no-leak
compatibility_impact: additive
required_test: secrets-contract:smtp-password-no-leak
- name: APP_CACHE_REDIS_PASSWORD
# source: feature-secrets-config-source-contract 2026-05-22
@@ -395,6 +366,19 @@ secrets:
compatibility_impact: breaking
required_test: secrets-contract:datasource-username-masked-in-actuator
- name: SPRING_MONGODB_URI
# MongoDB URIs can carry username/password material and must never be logged as public config.
# Typed-profile deployments should prefer uri-secret so the URI itself never becomes env data.
classification: sensitive-config
source: mounted-env
rotation_policy: restart-only
prod_default: null
dev_sentinel_prefix: __LOCAL_DEV_
owner_branch: persistence-mongo-runtime-remediation
masking_rule: full_except_last_4
compatibility_impact: additive
required_test: secrets-contract:mongodb-uri-masked
- name: APP_DATASOURCE_URL
# source: feature-secrets-config-source-contract 2026-05-22 — JDBC URL은 host/db 포함하므로 sensitive-config
# (env-keys.yaml에서는 public-config 처리; 본 파일에서는 노출 통제 관점에서 sensitive로 재분류 — masking 기준 명시 목적)
@@ -1581,25 +1581,18 @@ cd src
- [ ] focused test, full `test`, full `check`, architecture validators의 실행 명령과 결과를 PR에 남긴다.
- [ ] Docker/보호 환경 때문에 실행하지 못한 검증은 이유와 남은 위험을 명시한다.
## 11. LLM Wiki capture
## 11. documentation update
이 리뷰는 의미 있는 아키텍처/코드 감사이므로 root `AGENTS.md`의 capture 대상이다. 최종 응답 전에
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md`에 current HEAD, finding,
변경 파일, 검증, 미실행 Docker lane, evidence grade를 추가한다. 이번 작업은 구현 전 read-only review이므로
별도 canonical `wiki/` 추출이나 interview/blog 파생 문서는 만들지 않는다.
실제 capture 결과:
- `raw/branch-notes/main.md`에 `2026-08-14 캡처 — merge 이후 JPA persistence 모듈 상세 리뷰`를
추가했다.
- 제품 HEAD/규모/30개 finding 요약, 단계별 결정, 변경 파일, 성공·실패·미실행 검증과 evidence grade를
기록했다.
- `raw/errors/`는 새 실패 모드가 없어 별도 생성하지 않았고, shared Gradle output 경합은 기존
`[[raw/errors/parallel-gradle-shared-build-race-2026-08-10]]`를 가리켰다.
- `raw/interviews/`, `raw/blog-topics/`, canonical `wiki/`는 구현 전 read-only finding이므로 별도 파생
없음으로 기록했다.
- `wiki_structure_lint.py --file raw/branch-notes/main.md --links-only`: PASS.
- full single-file lint는 제품 규칙이 요구하는 실제 branch 파일 `main.md`와 vault의 4-prefix naming rule이
충돌해 기존 `NAMING_VIOLATION` 1건으로 실패했다. 파일을 임의 rename하거나 어느 정책도 완화하지 않았다.
- untracked branch-note에 대한 `git diff --no-index --check /dev/null ...`은 whitespace 진단 출력 0 bytes였다
- untracked design record에 대한 `git diff --no-index --check /dev/null ...`은 whitespace 진단 출력 0 bytes였다
(내용 diff 때문에 command exit 1은 정상).
@@ -1535,12 +1535,9 @@ green으로 해석하면 안 된다.
위 architecture/static gate의 통과는 현재 registry가 스스로 일관된다는 증거다. root policy의 “19개”와
실제 43개가 의미적으로 일치하거나 신규 platform이 runtime-ready라는 증거는 아니다.
## 12. LLM Wiki 캡처
## 12. 문서 갱신
필수 작업 기록은 `/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md`의
`2026-08-14 캡처 — merge 이후 Messaging 모듈 상세 리뷰` 섹션에 갱신했다. 검토 범위, 25개 finding의
핵심 판정, 구현 순서, 변경 파일, 실행한 검증, 실패·미실행 범위와 evidence grade를 기록했다.
이번 작업은 production 구현 전 read-only review이므로 `raw/errors/`, `raw/interviews/`,
`raw/blog-topics/` 및 canonical `wiki/` 파생 문서는 만들지 않았다. 실제 P0/P1 구현과
transaction/rebalance/restart/cutover evidence가 생긴 뒤 파생 여부를 다시 판단한다.
@@ -1215,9 +1215,8 @@ Mongo platform을 Stable/production-ready로 다시 판정하려면 최소한
이 체크리스트를 충족하기 전의 정확한 표현은 “MongoDB persistence platform contract와 일부 실행
경로가 구현된 opt-in experimental leaf”다.
## 11. LLM Wiki capture
## 11. documentation update
- 갱신: `/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md`
- 기록 내용: 기준 HEAD, 검토 범위, 핵심 finding, 구현 순서, 변경 파일, fresh Gradle 결과,
`check` blocker, Docker/Advanced 미실행 범위, 증거 등급.
- 파생 raw 문서: 없음. 구현 전 read-only finding이므로 interview/blog/canonical로 승격하지 않았다.
@@ -0,0 +1,96 @@
# app-bootstrap 리뷰 종료 판정 — 2026-09-18
기준 리뷰: `docs/reviews/2026-09-07-app-bootstrap-module-code-review.md`
이 문서는 원 리뷰를 수정하지 않는다. 원 리뷰는 당시 checkout의 증거이고, 이 문서는 2026-09-18
현재 checkout에서 각 BOOT 항목을 다시 측정한 **종료 판정**이다.
상태는 세 가지다.
- **완료**: 원 지적의 원인이 제거됐고 현재 구조/검증에서 재발 방지가 확인됨.
- **최신 결정으로 대체**: 문제의 일부 전제 또는 처방을 이후 승인된 설계가 의도적으로 바꿈.
- **완료 — 명시적 예외 유지**: 원 리뷰 자체가 허용한 좁은 예외만 남음.
## 판정표
| ID | 상태 | 현재 판정 |
| --- | --- | --- |
| BOOT-001 | **최신 결정으로 대체** | “설정 root를 전부 `ca-skeleton.*`로 통일” 처방은 이후 Wave 1 activation SSOT가 대체했다. 현재 activation authority는 capability별 canonical key를 명시한다. 예: JPA=`ca-skeleton.persistence-jpa.enabled`, Messaging=`app.messaging.enabled`, Fileserver=`app.fileserver.enabled`. 따라서 root 이름의 단일화가 아니라 **한 capability에 activation authority가 하나인가**가 현재 invariant다. |
| BOOT-002 | **완료** | 프로파일 어휘는 `shared-contract RuntimeEnvironment`가 소유한다. bootstrap production 코드의 `prod/production/local/dev` 직접 문자열 비교는 0. 남은 helper는 Spring `Environment`를 canonical predicate에 전달하는 얇은 adapter다. |
| BOOT-003 | **완료** | startup validation은 typed `StartupFailures` 경로를 사용하고, `StartupFailureContractArchitectureTest`가 raw `IllegalStateException` 재도입을 막는다. allowlist는 API/JVM invariant와 failure machinery뿐이다. |
| BOOT-004 | **완료** | `StartupValidationContext`가 누적 검증과 phase별 failure 생성을 공통화한다. |
| BOOT-005 | **완료** | `StartupOrder`가 startup ordering vocabulary/순서를 소유한다. |
| BOOT-006 | **완료** | capability assembly는 `autoconfigure/<capability>/`로 통일됐다. 리뷰 당시 top-level capability package 잔여는 0. Settings 배치 규칙과 runtime guard 예외는 `app-bootstrap/CLAUDE.md`에 문서화됐다. |
| BOOT-007 | **완료** | Redis는 cache/rate-limit/lease/idempotency/root/key helper로 분해됐다. configuration 분해 threshold도 `app-bootstrap/CLAUDE.md`에 고정됐다. |
| BOOT-008 | **완료** | `application.yml`은 248줄이며 top-level application settings를 config fragments로 분리했다. 현재 resources 아래 YAML은 19개 fragment/entry 파일로 나뉜다. |
| BOOT-009 | **완료** | runtime warning/error 로그가 structured fields를 사용한다. Fileserver cleanup, Outbox relay, distributed-lock lease expiry까지 고정 필드를 추가했고 `docs/observability/log-fields.md`를 field dictionary로 추가했다. 실제 bootstrap WARN/ERROR 중 unstructured 후보는 0. |
| BOOT-010 | **완료** | idempotency provider selection의 `switch`는 0. 각 `Provider` 상수가 필요한 bean composition expectation을 함께 소유한다. |
| BOOT-011 | **완료** | strict bind mechanics는 `adapter:outbound:support StrictSettingsBinder` 한 곳에 있다. Fileserver/HTTP client binder에는 capability-specific 차이만 남는다. |
| BOOT-012 | **완료** | architecture suite는 단일 2,792줄 테스트가 아니라 `src/architectureTest`의 22개 top-level architecture test로 분리됐다. |
| BOOT-013 | **완료** | startup failure marker는 process-global `AtomicBoolean`이 아니라 Logback Context object map에 저장된다. `clearForTest`와 mutable static state는 0이고 context-isolation test가 있다. |
| BOOT-014 | **완료** | app-bootstrap `src/test`의 실제 Testcontainers 사용은 0. 남은 Testcontainers import는 taxonomy rule을 검증하기 위한 negative fixture뿐이다. 실제 PostgreSQL 검증은 INTEGRATION lane에 있다. |
| BOOT-015 | **완료** | custom `src/testkit` source set은 0. cross-source-set/cross-leaf 공유 fixture publish 표준은 `java-test-fixtures`. app-bootstrap의 source-set-local helper는 외부 consumer가 0이므로 해당 source set에 남긴다. |
| BOOT-016 | **완료** | `docs/testing/TESTING_STRATEGY.md`를 현재 machine taxonomy와 정렬했다: TEST / INTEGRATION / SYSTEM / ARCHITECTURE / PERFORMANCE. unit/slice/contract는 TEST style이고 qualification은 gate다. 9/16 결정에 따라 Markdown↔Gradle parser는 복원하지 않는다. |
| BOOT-017 | **완료 — 명시적 예외 유지** | `EnvironmentSecretSource` 등 outbound adapter ownership은 leaf로 이동했다. bootstrap의 application/domain port implementation은 `MeteredDistributedLockPort` 하나뿐이며, 이는 원 리뷰가 “두 번째 decorator가 생기기 전까지 bootstrap 유지 가능”이라고 명시한 예외다. |
## 이번 종료 확인에서 함께 닫힌 회귀
PostgreSQL idempotency store composition을 JPA leaf로 이동한 뒤
`IdempotencyProviderScanCollisionTest`가 예전 fixture 조립을 가정하고 있었다.
테스트를 실제 shipped composition에 맞췄다.
- JDBC store만 fixture로 제공한다.
- `IdempotencyConfig`가 실제 executor/settings를 생성한다.
- 중복 수동 `IdempotencyExecutor` / `IdempotencySettings` bean을 제거했다.
- 최종 assertion은 JDBC V1 store 1, executor 1, owner-safe V2 store 0이다.
이 수정 후 app-bootstrap full unit + architecture suite가 다시 GREEN이다.
## 최종 검증
2026-09-18 현재 다음이 성공했다.
`./gradlew :app-bootstrap:spotlessJavaCheck :app-bootstrap:test :app-bootstrap:architectureTest --warning-mode=fail --console=plain`
- BUILD SUCCESSFUL
- app-bootstrap real WARN/ERROR 중 unstructured candidate: 0
- BOOT-014 real Testcontainers import in `src/test` excluding negative fixture: 0
- BOOT-015 `src/testkit` directories: 0
- BOOT-017 bootstrap application/domain port implementation: documented decorator 1개
- `git diff --check`: PASS
Test taxonomy alignment:
`./gradlew -p build-logic test --tests 'dev.caskeleton.buildlogic.strictlane.StrictTestLaneConventionTest' --warning-mode=fail --console=plain
./gradlew help --warning-mode=fail --console=plain`
둘 다 PASS.
## 결론
이 리뷰의 BOOT-001~017 중 **추가 구현이 필요한 미완료 항목은 없다.**
BOOT-001은 “모든 prefix를 한 root로 합친다”는 원 처방을 실행하지 않는다. 더 최신의 activation SSOT가
capability별 canonical activation key를 승인했기 때문이다. 나머지 항목은 완료됐거나 원 리뷰가 허용한
좁은 예외만 남는다.
따라서 이후 작업은 이 리뷰의 잔여 수정이 아니라 **새 리뷰/새 설계에서 발견되는 별도 개선**으로
취급한다.
## 2026-09-19 shared-worktree note
The BOOT-001~017 closure above remains unchanged: there are no review items requiring additional
implementation. After that closure verification, unrelated concurrent edits appeared in the shared
worktree and currently block the aggregate app-bootstrap formatting/architecture commands before
they reach these review changes:
- `app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/SecretReloadContractTest.java`:
comment wording changed but was not Spotless-formatted;
- `app-bootstrap/src/architectureTest/java/dev/caskeleton/bootstrap/architecture/ArchitectureViolationFixtureTest.java`:
a Javadoc line was removed while leaving an open `{@code` tag, so Error Prone fails
`compileArchitectureTestJava`.
These files were not rewritten here because the repository is shared with other in-progress
uncommitted work. The BOOT-009 focused logging tests still pass, the direct production WARN/ERROR
inventory has zero unstructured candidates, and `git diff --check` passes.
@@ -0,0 +1,687 @@
# ca-skeleton 최종 테크리드 리뷰
- **대상**: `codebase/clean-architecture-backend-template`
- **원본 리뷰 스냅샷**: 2026-09-18 워킹트리 / HEAD `60b6a319` 기준
- **성격**: `01`~`13`의 상세 근거를 실행 가능한 최종 리팩터링 기준으로 정리한 정본
- **주의**: 세부 문서의 line number와 working-tree 상태는 리뷰 스냅샷 기준이다. 구현 시 현재 코드에서 다시 확인한다.
- **우선순위**: 영역 문서의 과거 처방이 이 문서의 최종 아키텍처 원칙과 충돌하면 **이 문서가 우선**한다.
---
## 0. 2026-09-21 중간 점검
이 섹션은 2026-09-18 원본 리뷰를 현재 워킹트리에 다시 대조한 결과다. 저장소는 다른 세션에서도
동시에 수정 중이므로 파일 개수는 **점검 시점의 스냅샷**이다. 아래의 “완료”는 해당 finding의
재검증 결과를 뜻하며 전체 리팩터링 완료를 뜻하지 않는다.
### 0.1 Phase 진행 상태
| Phase | 중간 판정 | 현재 근거 |
|---|---|---|
| **0 — migration 안정화** | **진행 중** | 점검 시작에는 `modified 524 / deleted 1290 / untracked 262`였고 문서 반영 후 재확인 시 `531 / 1290 / 263`으로 변했다. 다른 세션이 동시에 수정 중이라는 뜻이다. `git diff --check`는 PASS지만 tracked 삭제와 untracked 대체물이 대규모로 공존하며 리뷰 폴더 자체도 아직 untracked다. |
| **1 — CI / Release graph** | **대부분 완료, 1개 중요 공백** | Dockerfile은 `build-tools`를 복사하고, CI는 `build-tools test`를 실행하며, release는 `:releaseCheck` aggregate를 사용한다. `integration-main.yml`도 생겼다. 단 `grpc-operation-ledger-jpa:integrationTest`는 어떤 workflow/optional-platform `ci`에서도 실행되지 않는다. |
| **2 — Capability Composition ownership** | **부분 완료, 핵심 blocker** | HTTP Client/JPA/Mongo/Notification/Messaging/Redis SDK 등 여러 leaf가 자기 `AutoConfiguration.imports`를 얻었다. 그러나 `app-bootstrap`은 아직 Mongo/Messaging/Redis/Notification/Fileserver/HTTP Client/GraphQL 등을 `implementation`으로 ship하며, main Java에서 adapter 타입 직접 import가 점검 시점 120건이다. Fileserver 28개, Redis semantic wiring 10개 등 provider 조립이 bootstrap에 남아 있다. |
| **3 — Test Architecture** | **상당 부분 완료** | 일반 `src/test`에서 Testcontainers 사용은 taxonomy positive-control fixture 1개뿐이다. `integrationTest` 10개, `systemTest` 5개 등 실행 레벨 분리가 실제 소스셋으로 진행됐다. 남은 핵심은 새 lane의 CI reachability를 전수 확인하는 것이다. |
| **4 — Core boundary** | **상당 부분 완료** | `application-fileserver`, `application-notification`, `application-objectstorage`가 분리됐다. `application-core/src/main/java`에서 Spring HTTP/web/servlet, `HttpStatus`, `ContentDisposition` 등 transport 의존 후보를 다시 스캔했을 때 0건이었다. |
| **5 — Semantic defects** | **주요 항목 다수 수정됨** | Web request-id trust 충돌, WebSocket `CONNECTION_MUST_CLOSE`, Mongo deadline의 `NOT_SENT` 오판, Notification SMTP TLS, Messaging logical broker/starter 분리가 코드와 회귀 테스트로 확인됐다. focused regression 5개 leaf 묶음도 PASS했다. |
| **6 — Build simplification** | **아직 미완료, 방향 재조정 필요** | `build-logic 82 files / 5,646 LOC`, `build-tools 97 / 5,544 LOC`로 원 리뷰 때보다 줄지 않았다. `JavaConventionsPlugin`은 여전히 `api-surface`, `dependency-policy`, `strict-qualification`을 모든 Java leaf에 자동 적용한다. JPA `set_config` 문자열 검사를 위한 새 source scanner도 `build-tools`에 추가됐다. |
| **7 — Runtime / Compose / Docs** | **아직 본격 착수 전** | Compose 6개가 여전히 root에 평평하게 있고 `scripts/run local|dev` 같은 launcher는 없다. 현재 실행 스크립트는 runtime smoke/compose contract 중심이다. |
### 0.2 이번 점검에서 새로 확정된 blocker
**P0 — Build Composition 목표와 `app-bootstrap`의 실제 dependency graph가 아직 충돌한다.**
`app-bootstrap/build.gradle`에는 여전히 “shipped so an operator can enable it with one environment
variable”, “all adapters are in one artifact and off is a switch rather than omission”이라는 과거 전제가
남아 있다. 이는 이 리뷰의 정본인:
Repository Capability Catalog
↓
Build Composition
↓
Runtime Activation
과 직접 충돌한다. leaf-owned AutoConfiguration 이전만으로 Phase 2를 완료로 볼 수 없다.
**optional capability가 실제 application artifact에서 선택적으로 빠질 수 있는 composition**까지
완성해야 한다.
**P0 — gRPC operation ledger의 real-PostgreSQL integration lane이 고아다.**
`grpc-operation-ledger-jpa`는 Testcontainers PostgreSQL을 사용하는 `integrationTest`를 선언하고
`strictTestLanes`에도 등록했지만:
- `optional-platforms:ci`는 `checkAll`, `qualityCheck`, architecture verification만 실행하고,
- `release.yml`의 gRPC gate는 `grpc-testkit`의 in-process/netty/fault만 실행하며,
- `integration-main.yml`에도 operation-ledger lane이 없다.
따라서 durable idempotency의 atomic claim을 실 PostgreSQL로 검증하는 테스트가 존재하면서도 CI에서
실행되지 않는다.
**P1 — Build simplification 작업 중 새 build-time semantic scanner가 추가됐다.**
`build-tools/jpa/SetConfigParameterBindingVerifier`는 Java source text에서 `set_config('...')`와 `?`
존재 여부를 스캔한다. 핵심 계약은 유효하지만 이 검증은 Gradle resolution/task graph를 필요로 하지
않는다. 지금 목표라면 `persistence-jpa`의 architecture/unit test가 소유할 성격이다. Phase 6에서
`build-tools`를 줄이는 동안 같은 종류의 verifier를 추가하면 방향이 다시 반대로 간다.
### 0.3 재검증 통과 증거
이번 중간 점검에서 다음은 실제 명령으로 다시 확인했다.
./gradlew :adapter:outbound:persistence-jpa:check :app-bootstrap:architectureCheck
# BUILD SUCCESSFUL
./gradlew :sample-portfolio:check
# BUILD SUCCESSFUL
./gradlew :adapter:inbound:web:test :adapter:inbound:websocket:test :adapter:outbound:persistence-mongo:test :adapter:outbound:notification:test :messaging:messaging-spring-boot-starter:test
# BUILD SUCCESSFUL
git diff --check
# PASS
첫 focused regression 시도는 다른 세션이 `build-logic` 파일을 수정하는 순간과 겹쳐 일시적인 Java
syntax error를 관측했지만, 같은 파일이 수정 완료된 뒤 재실행한 위 명령은 **2m 55s에 PASS**했다.
따라서 그 일시 실패를 저장소 결함으로 판정하지 않는다.
### 0.4 다음 중간 구간의 우선순위
1. `app-bootstrap`의 optional capability `implementation`과 provider wiring을 Build Composition 기준으로 끝낸다.
2. `grpc-operation-ledger-jpa:integrationTest`에 실제 CI/release caller를 연결한다.
3. `StrictQualification` 중복 및 global special-plugin auto-apply를 줄이고, 새 semantic verifier를 owner test로 되돌린다.
4. 남은 integration/system lane을 “등록됨”이 아니라 “실제로 workflow에서 실행됨” 기준으로 전수 재검증한다.
5. 위 구조가 안정화된 뒤에만 Compose/env launcher 정리를 시작한다.
## 0-A. 2026-09-23 재점검
### 현재 판정
**작업량은 컸지만 핵심 blocker 폐쇄 속도는 낮다.** 2026-09-21 중간 점검 이후 많은 leaf와
검증 코드가 바뀌었지만, 최상위 목표인 Build Composition과 build-system 단순화는 거의 진전되지
않았다. 반대로 현재 focused gate는 다시 red 상태다.
점검 시점 워킹트리:
2026-09-21: modified 531 / deleted 1290 / untracked 263
2026-09-23: modified 835 / deleted 1336 / untracked 317
변경량 자체가 결함은 아니지만 tracked 삭제 + untracked 대체물이 계속 커지는 동안 최상위 gate가
red라는 점은 migration wave를 더 넓히기 전에 안정화가 필요하다는 신호다.
### 9월 21일 blocker 재검증
| 항목 | 2026-09-23 판정 | 근거 |
|---|---|---|
| app-bootstrap Build Composition | **아직 더 봐야댐** | optional capability는 여전히 `implementation`으로 기본 ship된다. bootstrap의 adapter 직접 import는 120→121건으로 줄지 않았다. fileserver 28 / redis 10 / jpa 13 config class가 bootstrap에 남아 있다. |
| gRPC operation-ledger real-DB caller | **아직 더 봐야댐** | `.github/workflows`에 `grpc-operation-ledger-jpa` 참조 0건, `optional-platforms:ci`도 integration lane을 aggregate하지 않는다. |
| Build simplification | **아직 더 봐야댐** | `build-logic` 82 files / 5,671 LOC, `build-tools` 102 / 6,152 LOC. 9월 21일보다 `build-tools`가 5 files / 608 LOC 증가했다. special governance plugin global auto-apply도 그대로다. |
| Test taxonomy | **진척됨** | ordinary `src/test`의 Testcontainers 사용은 positive-control fixture 1개뿐이라는 상태가 유지된다. |
| Clean Architecture dependency verifier | **완료** | 이번 재검증에서 `verifyCleanArchitectureDependencies` 자체는 PASS했다. 이전 Gradle 9 unsafe-resolution 실패는 현재 재현되지 않는다. |
### 현재 실제 red gate
다음 명령을 현재 워킹트리에서 다시 실행했다.
./gradlew verifyCleanArchitectureDependencies \
:adapter:outbound:persistence-jpa:test \
:app-bootstrap:test \
:app-bootstrap:architectureTest \
--continue --console=plain
결과는 **BUILD FAILED, 3 task failures**다.
1. `persistence-jpa:test` — 529 tests 중 2 failed.
- `JpaModuleBoundaryTest`가 비어 있는 `auditing` package를 아직 independent capability/catalog로
요구한다. 실제 production class는 `audit`에 있고 `auditing` 디렉터리에는 class가 없다.
- 이는 진행 중 package/topology refactor와 boundary catalog가 원자적으로 맞춰지지 않은 상태다.
2. `app-bootstrap:test` — 694 tests 중 2 failed, 4 skipped.
- Redis composition test가 `redis-a:6379`에 실제 연결을 시도한다. `src/test` composition test가
live Redis ACL probe를 통과해야 하는 비-hermetic 상태가 됐다.
- `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN` 세 mandatory error code는 어떤 runbook에도
연결되지 않아 runbook contract가 실패한다.
3. `app-bootstrap:architectureTest` — 182 tests 중 1 failed.
- `PersistenceJpaRootAutoConfiguration`이 leaf 내부 타입
`PersistenceJpaLeafReadyAutoConfiguration`을 annotation member로 직접 참조한다.
- 이 실패는 단순 테스트 드리프트가 아니라 **bootstrap이 leaf 내부 조립 타입을 직접 아는 현재
Phase 2 blocker를 그대로 증명한다.**
### 우선순위 교정
지금부터는 새 finding을 넓히기보다 다음 순서로 닫아야 한다.
1. 현재 5개 실패를 green으로 복구하되, symptom patch가 아니라 ownership/test-lane 원인을 먼저 닫는다.
2. `app-bootstrap`의 provider-internal imports와 optional `implementation`을 Build Composition 목표에 맞게 정리한다.
3. gRPC operation-ledger real-DB lane에 자동 caller를 연결한다.
4. `build-tools`/global governance plugin 축소를 실제 파일 수와 task graph 감소로 증명한다.
5. 그 뒤에만 남은 leaf Medium/Low finding과 Compose/runtime 문서 정리를 계속한다.
**이 순서를 지키지 않고 다시 leaf 세부 항목을 넓히면 작업량은 계속 늘어도 최종 완료 시점은 가까워지지 않는다.**
## 1. 최종 판정
**부품 품질보다 조립 경계와 조립 검증이 약하다.**
Redis, Messaging, WebSocket, GraphQL, Notification, JPA, Mongo, Fileserver에는 재사용 가치가 높은 구현,
실패 의미론, 동시성 제어, provider 계약 테스트가 이미 많이 존재한다. 문제는 그 코드가 실제 서비스에
어떤 방식으로 **채택되고, 조립되고, 활성화되며**, 그 조립이 실제 배포 형태로 검증되는지가 영역마다
다르다는 점이다.
최종 목표:
Repository Capability Catalog
↓
Build Composition
↓
Runtime Activation
- Repository Capability Catalog: 저장소에는 선택 가능한 구현체/알고리즘을 충분히 보유한다.
- Build Composition: 파생 서비스가 실제 사용할 capability만 dependency graph/artifact에 포함한다.
- Runtime Activation: 포함된 capability 중 현재 환경에서 사용할 기능만 Bean/connection/thread를 활성화한다.
> 저장소에 구현체가 있다고 모든 파생 서비스가 그 구현체를 ship해야 하는 것은 아니다.
> 특정 capability를 ship하기로 선택했다면 switch off 상태에서 Bean·connection·thread·scheduler가 없어야 한다.
## 2. 최종 아키텍처 목표
### 2.1 Application → Adapter → Capability
Application-owned Port
↓
Thin Adapter
↓
Reusable Capability
↓
External Technology
Application은 Redis/Kafka/S3가 아니라 `RateLimitPort`, `EventPublisherPort`, `ObjectStoragePort` 같은
application-owned 계약을 요구한다. Adapter는 그 계약을 capability API에 번역하고 capability는
provider-specific 구현, 알고리즘, 장애 처리, 관측을 소유한다.
### 2.2 Composition ownership
재사용 가능한 Spring 조립은 **그 구현을 소유한 leaf/starter**가 소유한다.
잘못된 방향
app-bootstrap
├─ Redis 세부 Bean graph
├─ HTTP client 세부 Bean graph
├─ Notification provider 세부 Bean graph
└─ JPA 구현 내부 설정
목표
adapter/capability leaf
└─ RootAutoConfiguration
└─ 내부 Bean graph
app-bootstrap
└─ selected capability + application-wide common bootstrap
`app-bootstrap`에는 entry point, 공통 `Clock`/runtime environment/observability baseline,
capability 간 배타성·필수 조합 같은 composition-level 검증만 남긴다.
### 2.3 Build Composition과 Runtime Activation
`implementation`/`runtimeOnly`와 `@ConditionalOnProperty`는 다른 문제를 푼다.
dependency 없음 → runtimeClasspath/artifact 없음
dependency 포함 + switch off → classpath 있음, Bean/resource 없음
dependency 포함 + switch on → 실제 capability 조립
leaf ownership을 정리한 뒤 bootstrap이 구현 타입을 직접 import하지 않는 선택 capability는
`runtimeOnly`까지 낮출 수 있는지 검토한다. `runtimeOnly` 자체가 목표는 아니다.
### 2.4 Test Architecture
실행 레벨은 다음 다섯 개를 기준으로 한다.
test
integrationTest
systemTest
architectureTest
performanceTest
`contract/security/migration/fault/compatibility/release`는 실행 레벨이 아니라 목적이다.
Component contract → 직접 등록된 부품이 올바르게 동작하는가?
Composition contract → 실제 shipped application이 그 부품을 발견·조립하는가?
`ApplicationContextRunner.withUserConfiguration(...)`만으로는 composition contract를 증명하지 못한다.
### 2.5 Build System
Gradle은 plugin/dependency/source set/classpath/artifact/task wiring/input-output를 담당한다.
`build-logic`은 얇은 convention 중심으로 유지하고 `StrictTestLane`의 fail-open 방어는 유지한다.
`build-tools`는 물리적으로 남을 수 있지만 evidence/readiness/qualification 플랫폼 전체를 보존해야 한다는
뜻은 아니다. 외부 감사·attestation 요구가 없는 검증은 test/CI로 단순화한다.
## 3. 이 리뷰를 구현에 사용하는 방법
Finding
↓
현재 코드에서 재확인
↓
최종 아키텍처와 대조
↓
failing regression test
↓
minimal fix / ownership refactor
↓
integration/composition verification
다음 과거 처방은 적용하지 않는다.
1. 모든 optional capability를 bootstrap `implementation`으로 계속 ship하고 ENV만으로 제어.
2. 죽은 provider config를 중앙 bootstrap `AutoConfiguration.imports`에 계속 추가.
3. defect마다 readiness/evidence/qualification DSL을 추가.
4. semantic label마다 source set을 추가.
5. CI caller가 없는 verification task를 “존재하므로 검증됨”으로 간주.
유지: application/domain 경계, real-provider integration test, build-time optional 격리,
runtime switch fail-closed, `StrictTestLane`, 실제 production composition test.
## 4. 왜 이렇게 됐는가 — 단일 메커니즘
Spring Boot에서 자동설정이 등록되려면 **두 가지가 모두** 필요하다.
```
① 클래스의 @AutoConfiguration 애노테이션
② META-INF/spring/....AutoConfiguration.imports 파일의 한 줄
```
저장소 전체를 세면:
| | 개수 |
|---|---|
| ①을 검사하는 테스트 파일 | **62** |
| `AutoConfiguration.imports` 파일 | **11** |
| ②를 검사하는 테스트를 가진 leaf | **3** (graphql, persistence-jpa, grpc-starter) |
**그리고 이번에 찾은 조립 결함이 전부 나머지 8개 쪽에 있다.**
이건 특수한 실수가 아니라 저장소 전체의 테스트 전략이 만든 구조적 사각지대다. 더 넓게 재면:
| | 파일 수 |
|---|---|
| 전체 테스트 파일 | **1,899** |
| 컨텍스트를 직접 조립 (`ApplicationContextRunner`) | 102 |
| └ 설정 클래스를 손으로 주입 (`withUserConfiguration`) | 78 |
| └ 자동설정을 손으로 공급 (`AutoConfigurations.of`) | 40 |
| **실제 배포 컴포지션 루트를 기동** | **16 (0.84%)** |
**부품은 1,883개 파일이 지키고, 이음새는 16개가 지킨다.**
그래서 다음이 전부 통과했다.
- `RedisCapabilityCompositionTest.java:35-38` — `withUserConfiguration`으로 죽은 설정을 손수 등록
- gRPC — 영역 전체에 Spring 컨텍스트 테스트 **0건**, 267줄 `GrpcPlatformStartupValidator`가
호출되지 않는데 267줄 테스트가 정적 호출로 초록
- WebSocket — 조합 클래스가 main에 **하나도 없는데** 테스트 482개가 초록
(조합 로직이 테스트 안에 다시 구현돼 있다: `CommandLossRecoveryTest:59-73`)
- notification — 자동설정이 `.imports` 없이 **실행 중인 애플리케이션에 존재하지 않았는데**
6개 빈 테스트가 `AutoConfigurations.of`로 스스로 등록을 공급해 초록
### 각 지점의 판단은 옳았다 — 합계를 소유한 사람이 없을 뿐이다
이걸 부주의로 읽으면 처방을 틀린다. `adapter:inbound:web` leaf의 픽스처 앱이 실제 컴포지션을
**의도적으로** 피하고, 그 이유를 코드에 적어 뒀다 (`ContractFixtureApplication.java:19-22`):
> *"No component scan. Scanning would pull in whatever else this leaf ships — the security chain, the
> file server, the notification callbacks — and the gate would then be **testing the sum of them
> rather than the status contract**."*
leaf 단위에서 이 판단은 **옳다.** 전송 계약 테스트가 알림 콜백 때문에 깨지면 그 게이트는 곧 꺼진다.
문제는 이 옳은 판단이 62개 leaf에서 각각 반복되고, **합계를 소유한 곳이 `app-bootstrap`의 16개
파일뿐**이라는 것이다. `adapter:inbound:web`은 main·test·testFixtures·보조 소스셋 전체에서
`CaSkeletonApplication`을 언급하는 파일이 **0개**다.
수치로 보면 web leaf 하나에서:
| | 개수 |
|---|---|
| 테스트 클래스 | 126 |
| 부품 검증 (Spring 없음) | 100 (79%) |
| 조합 장치 | 26 (전부 설정 클래스를 **이름으로** 수동 주입) |
| **"배포 컨텍스트가 무엇을 조립했는가"를 묻는 것** | **0** |
부품 검증은 대상을 `new`로 만들어 부르니 원리적으로 "아무도 안 부른다"를 관측할 수 없고,
조합 검증은 설정 클래스를 이름으로 올리니 "배포가 이걸 찾는가"를 물을 수 없다.
**두 방식 다 옳게 쓰이고 있고, 두 방식 다 이 질문에는 답할 수 없다.**
### 되풀이되는 두 가지 형태
**(가) 미배선을 잡는 장치가 미배선이다.** 세 영역에서 독립적으로 나왔다.
| 영역 | 장치 | 상태 |
|---|---|---|
| web | `WebPlatformStartupValidator` | 프로덕션 생성처 **0건**. 테스트 javadoc이 *"a control that is configured and not wired behaves exactly like one that works, right up until it is needed"*라고 적는다 |
| WebSocket | `WebSocketPlatformStartupValidator` · `WebSocketStackExclusivity` · `StompBrokerExclusivity` | main 호출부 **0건**. `StompConfiguration:17-19` Javadoc은 *"still runs and still fails loudly"*라고 **거짓 단언** |
| gRPC | `GrpcPlatformStartupValidator` (267줄 + 테스트 267줄) | `GrpcPlatformAutoConfiguration` 전체에 등장 0. `trust-all-certificates=true`+PROD가 그냥 기동 |
**(나) 목이 재현할 수 없는 실패를 목 위에서 안전하다고 고정한다.** web leaf에만 확정 3건.
- `RequestLoggingFilterTest.honoursClientRequestIdAndCorrelationIdHeaders`가
`isEqualTo("client-req-1")` — **테스트 이름이 `honours…`**, 클라이언트 값을 그대로 쓰는 것을
정답으로 선언한다. 같은 leaf `WebMvcRequestIdFilterTest:14-27`은 `isNotEqualTo(...)`로 정반대를
못 박는다. **두 필터를 같은 체인에 올리는 테스트는 저장소에 0건**이라 서로를 보지 못한다.
- `RateLimitKeyResolverTest.remoteAddrModeIgnoresForwardedClientIpWhenPresent` — 목이
`ForwardedHeaderFilter` 래핑을 재현 못 하는데 "XFF 무시"를 안전으로 고정.
- fileserver `VerificationCoordinatorTest:169-180` — `new MediaTypeVerifier(reader, true)`로
`requireVerdict=true` 고정. **배포값은 `config/fileserver.yml:96`의 `false`.**
`true`면 판독 실패 → QUARANTINE(안전), `false`면 → ACCEPT(fail-open).
**테스트는 안전한 분기를 증명하고 배포는 위험한 분기를 돈다.**
### 빈칸의 정확한 모양 — 방향이 하나뿐이다
`persistence-jpa`에서 가장 선명하게 드러난다.
| 검사 방향 | 테스트 수 |
|---|---|
| "이건 등록되면 **안 된다**" (리플렉션) | **3개, 잘 돈다** — `CandidateAdapterCompositionTest`, `AuditingCandidateStatusTest`, `PersistenceEntityScanCoverageTest` |
| "이건 등록**돼야** 한다" | **0개** |
**C1도 H2도 정확히 그 빈칸이다.** 기법은 이미 있고 컨텍스트도 필요 없다 — 같은 리플렉션 방식으로
반대 방향을 쓰면 3줄이다. 이 저장소가 "꺼짐"을 검증하는 데 쏟은 정밀함이 "켜짐"에는 한 번도
적용되지 않았다.
그리고 우회가 **주석으로 적혀 있다.** 우연이 아니라 의도다:
- `LegacyOutboxIntegrationSupport.java:128` — `// OutboxStoreAdapter: @Repository — registered
manually (no component scan).` 하네스가 결함을 알고 손으로 우회한다.
- `PostgreSqlLegacyOutboxRowLifecycleIntegrationTest.java:670-677` — `// OutboxReaper.reap() uses
@Transactional which only works as a Spring proxy.` 후 `new OutboxReaper(...)`로 수동 생성.
리퍼의 **유일한** DB 테스트라 `@Component`·`@Scheduled`·조건 부재가 전부 시야 밖이다.
- `PersistenceVendorSelectionTest:91-93` — 테스트가 스스로
`@EnableConfigurationProperties(PersistenceVendorSettings.class)`를 정의해 넣는다.
**프로덕션에 없는 바로 그 등록**이다. 그래서 "알 수 없는 vendor면 기동 실패"가 테스트에선 참,
프로덕션에선 거짓이다.
- `PostgreSqlVendorFailureTranslatorRegistrationTest` — 이름이 *Registration*Test이고 javadoc이
"Nothing registered a VendorFailureTranslator"를 회귀 대상으로 적어놨는데, 본문 `:40`은
`new PostgreSqlPersistenceConfig()`다. **등록 여부가 이 테스트가 볼 수 없는 유일한 것이다.**
### 저장소는 이 사실을 알고 있다
`app-bootstrap/src/systemTest/.../DependencyErrorStartupContractTest.java:21-23`:
> *"This repository has found **five classes that were green in their own tests and present in no
> running application**; a validator is a poor candidate to become the sixth."*
같은 Javadoc이 메커니즘도 정확히 짚는다 — `MockEnvironment`로 정적 메서드를 부르는 테스트는
*"규칙이 올바른 문장을 계산한다"*는 증명하지만 *"무언가 그 규칙을 실행한다"*는 증명하지 못하고,
**"그 차이가 배선된 검증기와 그냥 존재하는 검증기의 차이"**다.
**진단은 완벽하고, 처방의 적용 범위가 16개 파일에서 멈춰 있다.** 이번 리뷰가 찾은 것들은
새로운 유형이 아니라 같은 유형의 일곱 번째 인스턴스다.
### 빌드 계층도 같은 모양이다
빌드 플러그인 테스트 45개 중 **19개(42%)가 TestKit 실제 Gradle 빌드**다. 드물게 높다.
그런데 커버리지가 부품에서 끝난다.
- 등록 플러그인 id **37개 중 21개**만 테스트가 적용 — 미적용 16개에 **`ca.architecture`와
`ca.architecture-registry`가 둘 다** 포함
- 등록 태스크 이름 **43개 중 23개**는 어떤 테스트도 호출하지 않음
- **`VerifyCleanArchitectureDependenciesTask`에 테스트가 0개** — HARD-STOP #5의 유일한 Gradle 게이트
구조적 이유가 있다. **TestKit은 자기가 만든 임시 프로젝트의 배선만 본다.** 실제 `src/build.gradle`과
`.github/workflows/*`의 배선은 원리적으로 시험 대상 밖이다.
---
## 4-B. 2차 전수 독파가 바꾼 것
1차에서 6개 영역이 "이 파일들은 판정을 못 바꾼다"는 이유로 일부를 건너뛰었다. 그 판단을 검증하려고
전부 읽혔다. **다섯 영역 중 넷에서 판정이 바뀌었다.** 건너뛴 파일에 반증이 들어 있었다.
| 영역 | 1차 판단 | 전수 독파 후 |
|---|---|---|
| 08 httpclient/objectstorage | "미독 52개에 판정을 뒤집을 내용 없음" | **가정 철회.** M2→H7 상향 + H8·H9·L9·L10 신규 |
| 12 bootstrap/sample | C1 "고신뢰 정적 추정" | **전수 확정** + 샘플 위반 실측 발견 |
| 13 build/CI | K3 "compose lane 15개 전부 blocking" | **기각** — blocking을 읽는 코드가 CI에서 안 돔 |
| 10 messaging | K6 "증거가 등급을 결정한다" | **기각** — `Tier`가 하드코딩 리터럴 |
| 02 inbound-web | H3에 반론 있음 | **반론 철회**, C2 대폭 강화 |
### 가장 깊은 테스트가 배포와 다른 것을 검증한다
`adapter:inbound:web`의 3레인 패리티 게이트는 이 저장소에서 가장 깊은 테스트다 — Tomcat·Jetty·
WebFlux 실서버 3개에서 모든 4xx/5xx에 `application/problem+json`과 `code`를 단언한다.
그런데 그걸 띄우는 `ContractFixtureApplication`은 `@Import`가 픽스처 컨트롤러 3개 +
`WebMvcProblemExceptionHandler` **넷뿐**이고, `testFixtures` 전체에서 `EnvelopeBodyAdvice`·
`GlobalExceptionHandler` 참조가 **0건**이다. 배포에서는 둘 다 `@RestControllerAdvice`로 활성이다.
**실서버 3개로 검증하는 응답 계약을 이 애플리케이션은 한 번도 내보내지 않는다.**
같은 모양이 파이프라인 순서 IT 3개에도 있다. 검증 대상은 `PipelineOrderFixtureApplication`이
**직접 쓴 익명 필터**가 쓰인 순서대로 도는 것이고, 프로덕션 필터는 한 개도 로드되지 않는다.
그래서 H1(request-id 신뢰 경계 충돌)이 이 IT를 그대로 통과한다.
`nginxProxyTest`는 한 걸음 더 나간다. 진짜 Nginx 컨테이너를 띄우고 `attackerCannotForgeTheClientAddress`로
정확히 그 위협을 쏘는데, 통과하는 이유는 애플리케이션이 안전해서가 아니라 `proxy_headers.conf`가
`proxy_set_header X-Forwarded-For $remote_addr`로 **치환**하기 때문이다. 애플리케이션 쪽은
`ProxyFixtureController:52-55`가 배포가 쓰는 `ForwardedHeaderFilter`와 **다른 클래스**를 손으로
만들어 쓰고, `application-web-contract.yaml`에는 `forward-headers-strategy`가 아예 없다.
**실서버 프록시 레인의 존재가 오히려 문제를 가린다.**
### 검증됐다고 읽히지만 검증되지 않은 것
| 대상 | 규모 | 실제 |
|---|---|---|
| objectstorage S3 제공자 | 3,581줄 | **실 스토어 검증 0.** AWS qualification 2개는 `System.getenv()` 단언만. MinIO "contract" 4개 중 2개는 컨테이너 없이 체크인 JSON만 읽음. 컨테이너를 띄우는 2개는 raw `S3AsyncClient`를 직접 드라이브해 이 leaf의 제공자를 통과하지 않음. 스킵 없는 제공자 계약을 상속하는 클래스는 `LocalDevObjectStorageProviderTest` 하나 |
| httpclient SSRF DNS 핀 | `ValidatedAddressResolverGroup`·`ApacheDnsResolverFactory` | 테스트 **166개 중 0개 파일**에 등장. 하네스가 전송 제공자를 무인자 생성자로 만들어 resolverFactory가 비고 `systemDefault`로 떨어짐. **지금 하네스 구조로는 그 테스트를 쓸 수조차 없다** |
| httpclient 시도 메트릭 | 5종 | `DeclaredMetricsAreEmittedTest:70`이 `main/java` 전체를 이어붙여 **소스 텍스트 출현 횟수**를 셈. 문자열로만 있어도 통과 |
| httpclient 트레이스 전파 | `traceparent` | 테스트 166개 중 **0개 파일**에 등장 |
| httpclient 실패 증거 분류 | 재시도 안전성의 근거 | 유일한 실패주입 계약이 `isIn(NOT_SENT, SENT_NO_RESPONSE, PARTIAL_RESPONSE)`를 단언하는데 enum이 이 셋 + `RESPONSE_RECEIVED` 넷뿐 → 실패 호출에서 **자명하게 통과** |
| ArchUnit 룰 | 86개 선언 | 위반 픽스처로 **발화를 증명하는 것은 55개**. 31개는 공허 통과 여부 불명. `ArchitectureViolationFixtureTest` Javadoc 35-38이 그 위험을 직접 서술 |
| 메시징 브로커 등급 | support-matrix | `CompatibilityMatrix`의 `Tier`가 **리터럴 생성자 인자**. 증거 manifest를 지워도 `Tier.STABLE`은 남음 |
**단, 이 저장소는 대부분 정직하다.** `minio-provider-evidence.json`은 `"status": "UNSUPPORTED"`와
`excludedProfiles` 5종, `limitations`에 *"not AWS evidence"*·*"not production TLS or
deployment-topology evidence"*까지 스스로 적는다. 증명 안 된 프로파일은 실제로 비활성화된다.
**결함은 거짓말이 아니라 "정직한 경고와 실제 차단 사이의 간격"이다** — `providers.x.type` 한 줄이면
그 간격을 건너뛴다.
### 켜짐을 검증하는 층이 셋 다 비어 있다
| 층 | 상태 |
|---|---|
| leaf `test` | hermetic — **옳다.** 컨테이너 의존을 `check`에 넣지 않는 건 정당하다 |
| 컨테이너 레인 | `integrationCheck`가 `ci`에 없어 **안 돈다** |
| compose 레인 15개 | `expectedSwitchesOn` 고유 스위치가 **5개**뿐 — jpa(9레인)·notification(4)·messaging(3)·mongo(2)·graphql(2). **redis·fileserver·httpclient·objectstorage·websocket·grpc는 0레인.** `docker-compose.infra.yml` 520줄에 redis 서비스 자체가 없다. 게다가 `blocking: true`를 읽는 코드는 `scripts/run-compose-runtime-smoke.sh:548` 한 줄이고 `.github/`가 그 스크립트를 부르지 않는다 |
### 샘플이 위반을 물려준다
`sample-portfolio`의 application 레이어 84파일에 `org.springframework.*` import가 **18건**
(`@Service` 15, `@Component` 2, `@Autowired` 1). production `application-core` 890파일은 **0건**.
3중으로 안 잡히고 이유가 각각 다르다. ArchUnit이 샘플을 못 보고, **설령 봐도 못 잡는다** —
`APPLICATION_DOES_NOT_DEPEND_ON_ADAPTERS_OR_TRANSPORT`의 금지 목록
(`ApplicationBoundaryArchitectureTest:59-68`)에 `org.springframework.stereotype`도
`org.springframework.beans`도 없다. `verifyApplicationCoreDependencyPurity`는 대상이
`:application-core`로 고정돼 있고, `verifyCleanArchitectureDependencies`는 샘플을 제외한다.
공정하게 — 샘플은 나머지를 전부 지킨다(도메인 순수성, `@Entity` 배치, `*UseCase.java` 23개 전부
`@UseCaseCapability` 보유, fixture 누수 0). 위반이 한 부류뿐이라 오히려 두드러진다.
뿌리는 `SamplePortfolioApplication:27-28`이 `basePackages="dev.caskeleton"`을 제외 없이 스캔해서,
유스케이스가 빈이 되는 유일한 방법이 `@Service`라는 것이다.
## 5. 현재 작업에서 먼저 처리할 것
### 5.1 워킹트리 보존
source-set 이동과 ownership 이전이 진행 중이므로 tracked 삭제/untracked 대체물을 함께 확인한다.
`git commit -a` 방식으로 완료 상태를 판단하지 않는다.
### 5.2 CI / Release blocker
- release workflow의 architecture test 경로가 현재 source set과 맞는지 확인한다.
- Docker dependency-resolution stage가 모든 included build를 복사하는지 확인한다.
- 이동한 integration/system lane에 실제 CI/workflow caller가 있는지 확인한다.
- `build-tools`가 남아 있는 동안 남은 verifier test를 CI에서 실행한다.
### 5.3 Composition ownership
Redis/Outbox/Idempotency/Lock/Tracing 설정을 일괄 bootstrap `.imports`에 넣지 않는다.
provider implementation wiring → owner leaf/starter
cross-provider selection/validation → 얇은 bootstrap/support
application-wide common infrastructure → bootstrap
`Clock`은 application-wide 공통 인프라다.
## 6. 최종 수정 순서
**Phase 0 — migration 안정화**
tracked/untracked 대조, root Gradle model/focused test 실행 상태 확보, 진행 중 ownership 이동 완결.
**Phase 1 — CI / Release graph 복구**
오래된 test invocation, included-build Docker context, orphan integration/system lane을 수정하고 실제 graph view를 만든다.
**Phase 2 — Capability Composition ownership**
leaf-owned AutoConfiguration을 확정하고 bootstrap의 provider implementation import를 제거한 뒤 dependency scope를 판단한다.
**Phase 3 — Test Architecture**
`test/integrationTest/systemTest/architectureTest/performanceTest`로 정규화하고 실제 ON/OFF composition contract를 추가한다.
**Phase 4 — Core boundary**
application-core의 HTTP/transport semantics를 inbound로 내리고 product-sized application capability를 optional leaf로 분리한다.
**Phase 5 — Semantic defects**
각 Critical/High finding을 failing test부터 수정한다.
**Phase 6 — Build simplification**
build-logic을 convention 중심으로 축소하고 qualification/evidence/readiness 중복을 test/CI로 이동한다.
**Phase 7 — Runtime / Compose / Docs**
env launcher, developer infra/system-test Compose, README/config/support matrix를 실제 구조와 동기화하고
capability 상태를 `IMPLEMENTED / WIRED / QUALIFIED`로 구분한다.
## 7. 바꾸지 말아야 할 것
리뷰 13개가 공통으로 지목한, **지금 이상해 보이지만 현 상황에서 옳은** 선택들.
**K1. 꺼짐을 조건이 아니라 구조로 만든 판단.**
이 원칙은 **Build Composition에서 선택된 capability 안에서** 적용한다. 스캔 제외 + 자동설정 진입점 하나. 조건 애노테이션은 새 빈마다 사람이 기억해야 하고, 잊으면
조용히 새어나온다. 이 설계는 잊을 수가 없다. notification이 5겹으로, mongo가 3겹으로 실증한다.
**이번 결함은 이 설계의 반증이 아니라 이 설계를 완성하지 않은 결과다.**
**K2. `domain-core`가 104줄인 것.**
누수가 아니다. `application-core/build.gradle`에 `project(':domain-core')` 자체가 없고 도메인 타입
참조가 0건이다. 템플릿의 도메인은 fork한 사람이 채우는 자리이므로 비어 있는 것이 정확하다.
**K3. `application-core`의 테스트 전략.**
20,000줄 규모에 Mockito **0건**, Spring 컨텍스트 **0건**, 893 테스트 / 2,312 단정,
62%가 단정 2개 이상, 55% 파일이 예외 경로를 검증. getter/setter 테스트가 아니다.
**K4. `shared-contract`의 "Java stdlib only"가 선언이 아니라 사실인 것.**
이게 부팅 이전 토글 판정을 가능하게 한다.
**K5. `messaging:*` 25분할과 브로커별 leaf 분리.**
클래스패스 격리가 실제로 작동한다(avro는 production 런타임에 없다). 줄여야 할 것은 leaf가 아니라
starter의 단일성이다.
**K6. gRPC 플랫폼을 `optional-platforms` 별도 빌드로 뺀 것.**
env 토글보다 강한 격리다 — 빌드에서조차 존재하지 않는다. 그리고 CI에서 실제로 돈다
(`ci-quality-gates.yml:88-95`, release-gate 필수).
**K7. `grpcPerformanceTest`를 수동 전용으로 둔 것.**
README의 논증이 타당하다 — *"공유 CI runner의 측정값은 흔들리고, 흔들리는 게이트는 결국 꺼진다."*
**K8. Redis lease를 `EFFICIENCY_ONLY`로 명시하고 펜싱 토큰을 주지 않는 것.**
분산 리스를 상호배제로 오용하게 만들지 않겠다는 정직한 설계다. 코드가 실제로 그렇다.
**K9. `StrictTestLanePlugin`의 4중 방어 — 단, 선택되는 레인에 한해서.**
소스셋 비면 예외 / 0개 실행하면 실패 / skip은 결과가 아님 / required 미실행이면 실패.
**선택되는 레인에서는 조용한 실패가 불가능하다.** TestKit 실빌드 25개가 이를 검증한다.
한계는 "아무도 안 부르는 레인"이고, 그건 4단계가 덮는다.
**K10. 부품 테스트의 품질 자체.**
`SerializedOutboundWriterTest:47-85`가 8스레드 64 offer에서 sink 동시 진입 최대치가 정확히 1임을
`AtomicInteger`로 관측한다. `HandshakeAdmissionPipelineTest:101-163`은 404/403/503 각 케이스에서
`tickets.redemptions()==0`을 단언해 "티켓 조회 전에 거부"를 부수효과로 증명한다.
탐지기 자신을 위반 샘플로 검증하는 관행이 6곳 있다.
**문제는 이 방식이 부실해서가 아니라, 이 방식이 이음새에는 적용될 수 없는데 이음새에도 쓰였다는 것이다.**
**K11. 문서가 "무엇"이 아니라 "이렇게 안 하면 무엇이 깨졌는가"를 적는 관행.**
`capabilities.yml`의 네임스페이스 주석이 과거 ACL 사고를 기록하고, 마이그레이션 SQL이 "왜"를 적고,
`webfluxContractTest`가 왜 아무것도 상속하지 않는지 적는다. 이 관행이 이번 리뷰를 가능하게 했다.
---
### 적용에서 제외한 과거 판단
전수 리뷰 중 철회된 주장과 반증 과정은 각 영역의 §9 근거로 남긴다. 이 overview에서는 실행 지침이
아닌 메타 리뷰 이력을 반복하지 않는다. 현재 구현 기준은 §1~§7의 최종 원칙과 영역별 §0을 따른다.
## 8. 채택 판단
**부품을 사고 이음새를 직접 짜는 프로젝트로 보면 값이 있다.**
각 영역이 "재작성할 코드"인지 "배선할 코드"인지 갈렸고, 대부분 후자다.
| 영역 | 도달 불가 규모 | 판정 |
|---|---|---|
| WebSocket | main 12,784줄 중 ~12,000 | **배선** — 부품 완성, 테스트 482개가 진짜. 조합 클래스만 없음 |
| GraphQL | 407개 중 267개(14,975줄) | **배선** — `@Test` 739개 중 300개가 배포 안 되는 코드를 지키지만 품질은 진짜. 재작성 규모는 `*HandlerFactory` 3개(281줄)뿐 |
| notification | 8,001줄 | **갈린다** — R1 3,832줄은 입력원·클라이언트·admission·시크릿 공급자가 동시에 비어 **삭제**, R2 프로바이더 4,169줄은 **배선**(SES SigV4 수제, WebPush RFC 8291+8292 전문 구현) |
| cache-redis | 32,082줄 | **배선 + 일부 재작성** — SDK 위임 37개 중 36개가 가드를 생성자에서 요구(설계 참), 능력 어댑터 6개는 가드를 우회(설계 거짓) |
| application-core | 185타입 / 6,145줄 (17%) | **참조 그래프 전수 결과** — 테스트가 직접·간접 모두 도달하지 못함. 그 안에 실행 클래스 16개 2,045줄이 있고, **이 영역에서 발견된 버그 3건이 전부 그 안에 있다** |
| gRPC 플랫폼 | testkit 밖 16,413줄 | **성격이 다름** — gRPC 런타임이 아니라 정책·계약 모델. 그 용도로는 (c)형 단위 테스트가 옳고 품질도 최고 수준 |
**역설 하나를 기억할 것**: notification R1은 테스트 489줄이 붙어 핵심처럼 보이는데 죽었고,
R2 프로바이더는 배선이 없어 죽은 것처럼 보이는데 살아 있다. **"테스트가 있다"가 "배포된다"의
근거가 되지 않는다** — 이 저장소를 읽을 때 가장 중요한 주의사항이다.
---
## 9. 커버리지와 한계
- **읽기 범위 — 13개 영역 전부 전수 독파 완료.** 영역별 실측은 각 리뷰 §1에 있다.
| 영역 | 커버리지 | 제외 |
|---|---|---|
| 01 core | **1,116 / 1,116** | — |
| 02 inbound-web | **Java 623 / 623** | `gradle.lockfile`, 35KB `README.md` |
| 03 inbound-realtime | **268 / 270** | `gradle.lockfile` 2 |
| 04 inbound-graphql | **526 / 526** | — |
| 05 persistence-jpa | **626 / 626** | — |
| 06 persistence-mongo | **494 / 494** | `gradle.lockfile` |
| 07 cache-redis | **383 / 383** | — |
| 08 httpclient/objectstorage | **589 / 589** | `gradle.lockfile` 2, `.jqwik-database` |
| 09 notification/fileserver | **386 / 386** | 대형 4파일의 게터·`equals`·`toString` 본문 |
| 10 messaging | **main 412 + test 145** | — |
| 11 grpc-platform | **368 / 368** | `gradle.lockfile` 18 |
| 12 bootstrap/sample | **678 / 678** | ArchUnit `ArchCondition` 헬퍼 약 800줄 |
| 13 build/CI | **infra 45 · compose 6 · config 12 · build-logic/tools 전량 · 워크플로 18** | 스냅샷 밖 spec 2쌍 |
**1차에서 6개 영역이 일부를 건너뛰었고, 전수로 채우자 그중 다섯에서 판정이 바뀌었다** (§4-B).
건너뛴 파일에 반증이 있었다. 이 문서의 수치는 전수 독파 후의 것이다.
방법도 한 번 교정됐다 — 01 영역의 "테스트가 도달하지 못하는 코드" 판정은 2차까지 **이름 grep**이었고,
3차에서 main 887타입에 대한 **참조 그래프 전수**로 바꿨다. 그 결과가 §8의 코어 수치다.
- **빌드 미실행**: Gradle wrapper jar를 스냅샷에서 제외했다. Critical·High는 정적 경로 추적이며
각 리뷰 §9에 반증/확인 명령을 적었다. 주요 판정은 코디네이터가 원본 소스로 재확인했다.
- **스냅샷 경계**: 2026-09-18T11:50Z 워킹트리. 리뷰 작성 중에도 원격이 계속 움직였다
(HEAD는 동일, 스냅샷 이후 24개 파일 수정 확인). 이 리뷰는 그 시점의 트리를 판정한다.
- **철회·정정된 주장** — 리뷰 과정에서 반증된 것들이다. 각 리뷰 §9에 원래 주장과 함께 남겼다.
이 목록 자체가 이 리뷰의 신뢰 근거다. 검증되지 않은 주장은 이렇게 걸러졌다.
| 주장 | 결과 |
|---|---|
| 02 "보조 소스셋에 테스트 의존이 없어 `ci`가 깨진다" (Critical) | **철회** — `AuxiliarySourceSetSpec:10-11`의 기본값이 `["implementation","runtimeOnly"]`라 `testImplementation`을 상속한다 |
| 08 "미독 52개에 판정을 뒤집을 내용 없음" (가정) | **철회** — 전수 독파로 H7 상향 + 신규 4건 |
| 09 "`.imports`를 읽는 테스트가 저장소 전체에 0개" | **정정** — 3개 실재(graphql·persistence-jpa·grpc-starter). 11개 중 3개라 결론은 오히려 강해졌다 |
| 11 "starter 의존을 아무것도 막지 않는다" | **정정** — 실제로 도는 게이트 1개 존재 |
| 11 "fault lane이 진짜 실패를 주입한다" (Keep) | **철회** — 소켓은 열지만 결론에 기여하지 않는다 |
| 12 "compose lane 15개가 blocking" (Keep) | **기각** — `.github/`가 그 스크립트를 부르지 않는다 |
| 10 "인증 증거가 브로커 등급을 결정한다" (Keep) | **기각** — `Tier`가 리터럴 생성자 인자 |
| 10 "메시징 브리지가 미완(MSG-015)" | **기각** — 구현·커밋 완료. 루트 `CLAUDE.md:68-72`가 드리프트 |
| 01 "캐시 엔진에 테스트가 없다" | **철회** — 15개가 4스레드 단일플라이트·무효화 레이스까지 검증. 문제는 검증이 아니라 배선 |
| 02 "로컬/개발엔 인그레스가 없어 H3 노출이 낮다" (반론) | **철회** — 프로파일이 `none`으로 덮어써서 노출이 prod로 좁혀지고, 그래서 더 나쁘다 |
| 코디네이터 "optional-platforms가 CI에서 안 돈다" (브리프 가설) | **기각** — `ci-quality-gates.yml:88-95`가 돌리고 release-gate가 필수로 요구 |
| 코디네이터 "메시징 빈 해시가 35건" | **정정** — 실측 4건 |
| 코디네이터 "`.imports` 파일 12개" | **정정** — `AutoConfiguration.imports`는 11개(12번째는 `ManagementContextConfiguration.imports`) |
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,686 @@
# [영역] MongoDB 영속 어댑터 리뷰
- 스냅샷: 2026-09-18T11:50Z / HEAD 60b6a319 + 커밋 안 된 변경 224파일
- 담당 leaf: `adapter-outbound-persistence-mongo` (`:adapter:outbound:persistence-mongo`, `allowed_dependencies: []`)
---
## 0. 최종 적용 기준
Mongo는 build-selected optional persistence capability다. 선택된 서비스에서 runtime switch/profile이 실제
`MongoClientSettings`까지 전달되어야 한다. 설정 검증과 실제 driver 적용을 같은 integration path에서
증명한다. deadline semantics와 reactive/change-stream 지원 상태는 실제 composition 기준으로 수정한다.
## 0-A. 2026-09-21 중간 재검증
**상태: deadline outcome finding은 수정됨.**
`DefaultMongoImperativeExecutor`는 callback이 이미 반환된 뒤 deadline을 초과한 write를
`NOT_SENT`로 보고하지 않는다. `MongoTimeoutException`을 통해 write 결과를 ambiguous
`WRITE_RESULT_UNKNOWN`으로 보존한다.
`DefaultMongoImperativeExecutorDeadlineTest.completedWritePastItsDeadlineIsAmbiguousRatherThanReportedNotSent`
가 이를 직접 검증하며, 이번 `:adapter:outbound:persistence-mongo:test`도 PASS했다.
Mongo leaf에는 현재 root/client AutoConfiguration import가 존재하므로 composition ownership도
원 리뷰 시점보다 진척됐다. 다만 real Mongo provider lanes의 workflow reachability와 실제
`MongoClientSettings` profile 적용은 전체 integration 점검에서 별도로 닫아야 한다.
## 1. 커버리지
| 소스셋 | 파일 | 읽음 | 비고 |
|---|---|---|---|
| `src/main/java` | 353 | 353 | 전문 |
| `src/test/java` | 98 | 98 | 전문(일부는 `import`/빈줄만 제거한 축약 덤프로 읽음 — 의미 있는 줄은 전부) |
| `src/testFixtures/java` | 27 | 27 | 전문(주석 제거 축약 포함) |
| `src/mongoProviderTestkit/java` | 8 | 8 | 4개 전문, 4개는 diff 대조 후 축약 열람 |
| `src/mongoIntegrationTest/java` | 7 | 7 | 전문 |
| `src/mongoPerformanceTest/java` | 1 | 1 | 전문 |
| 리소스 | `META-INF/spring.factories`, `AutoConfiguration.imports`, `build.gradle`, `gradle.lockfile`(변경 요약만), `README.md`, `CLAUDE.md` | 전부 | |
| 부수 파일 | `src/config/architecture/modules.json`, `src/config/mongodb/release-contracts.json`, `src/build-tools/.../buildtools/mongo/*`(11개), `src/build-logic/.../buildlogic/strictlane/*`(5개), `scripts/verify-mongodb-platform.sh`, `scripts/verify-mongodb-advanced.sh`, `src/app-bootstrap/build.gradle`, `config/persistence.yml`, `CaSkeletonApplication.java`, `CapabilityDependencyValidator.java`, `docs/registries/env-keys.yaml`(Mongo 구간), `docs/architecture/mongo-api-surface.txt`, `docker-compose.infra.yml`(mongo 구간), `src/.env.example`, `src/.env.local.example` | 전부 | |
| 설계 문서 | `docs/superpowers/specs/2026-09-18-mongo-health-composition-ownership.md`, `.../2026-09-18-test-architecture-phase2-provider-ownership.md` | 전부 | untracked. §7의 근거 |
| diff 자료 | `evidence/status.txt`, `diffstat.txt`, `full.diff`(Mongo 구간), `untracked-files.txt`, `untracked-wc.txt` | 전부 | |
**전문을 읽지 못한 파일: 없음.** 단 `gradle.lockfile`(293줄 변경)은 diff 요약만 보고 개별 좌표를 검증하지 않았다 — 의존성 버전은 다른 담당자 영역이다.
`docs/mongodb/*.md` 9개 문서는 목록만 확인하고 내용을 읽지 않았다. 판정에 쓰지 않았으므로 아래 발견은 전부 코드·설정 근거만 쓴다.
---
## 2. 이 영역은 무엇을 하는가
**MongoDB용 애플리케이션 포트 구현이 아니다. 저장소 안에 벤더링된 MongoDB 플랫폼 라이브러리다.**
코드가 말하는 사실:
- `src/config/architecture/modules.json`의 이 leaf 항목은 `allowed_dependencies: []`다. `domain-core`도 `application-core`도 `shared-contract`도 참조하지 않는다. **즉 이 leaf는 애플리케이션 포트를 하나도 구현하지 않는다.**
- `README.md:3-6` — document/repository/mapper와 포트 구현은 fork가 추가한다.
- production 클래스 353개 중 Spring bean으로 등록되는 것은 `MongoPlatformAutoConfiguration`(443줄)이 선언하는 약 15개뿐이다. 나머지 60여 개의 진입점 타입(`SpringMongoTransactionExecutor`, `PolicyAwareMongoQueryBuilder`, `PolicyAwareMongoAggregationExecutor`, `MongoKeysetCursorCodec`, `VersionedMongoUpdater`, `SpringMongoGeospatialOperations`, `MongoMigrationRunner`, `MongoCollectionMigrationLedger`, `PolicyAwareMongoNativeGateway`, `MongoAdminGateway`, `advanced/**` 전부)은 **main 안에서 서로를 참조하지 않고, bean으로도 등록되지 않는다.** fork가 직접 조립해야 한다.
실제로 하는 일을 층별로 보면:
```
api/ 프레임워크 무의존 계약 (operation 이름, consistency profile, 실행 결과, 예외 계층, BSON 표현 manifest, schema 버전)
failure/ driver 예외 → 플랫폼 예외 1회 변환 + retry scope 분류
mapping/ Decimal128·BigInteger·DomainDocumentId converter, _class 대신 alias를 쓰는 type mapper
imperative/ blocking 실행 스코프(컬렉션 1개로 스코프 고정) + atomic/bulk 업데이트 정책
reactive/ 동일 구조의 reactive 버전 + cursor lease/budget
transaction/ body retry와 commit retry를 분리한 코디네이터, causal session
query/ 필드·연산자 allowlist 질의 빌더, keyset pagination, HMAC 커서
schema/ 컬렉션·인덱스·validator manifest와 diff, TTL 정책, 문서 크기 예산
changestream/ at-least-once projector, resume checkpoint, invalidate/history-lost 처리
migration/ fencing token 기반 lock·ledger·checkpoint runner
security/ secret:// 참조 credential, 역할 분리, D4 admin plane
observation/ driver command/pool/SDAM 메트릭, tag allowlist
advanced/** sharding·time series·CSFLE/QE·search/vector·tenancy·GridFS — 전부 flag 게이트, 대부분 값 객체
```
### 브리프 질문 1에 대한 판정: (c)에 가깝고, 설계는 (b)를 준비했으며, (a)는 아니다
- **(a) 대안 — 아니다.** 같은 port를 두 방식으로 구현한 것이 아니다. Mongo leaf는 port를 하나도 구현하지 않으므로 고를 대상이 없다. JPA leaf와 공유하는 인터페이스가 없다.
- **(b) 역할 분담 — 설계로는 선언되어 있고, 구현은 없다.** `CLAUDE.md:21`이 명시한다: *"It does **not** reimplement idempotency / outbox / lock on Mongo (those stay JPA-only)."* 두 토글은 서로 배타가 아니다(`config/persistence.yml:12`/`:16`이 독립 불리언이고 `CapabilityDependencyValidator`는 둘의 조합을 검사하지 않는다). 즉 "RDB는 트랜잭션·아이덴포턴시·아웃박스, Mongo는 문서"라는 분담이 **문서로 선언**되어 있다. 그러나 Mongo 쪽 문서 저장 경로가 실제로 구현된 것은 없다.
- **(c) 템플릿이라 둘 다 — 현재 상태는 이것이다.** production에 도메인 타입이 0개고, bean 15개는 정책 레지스트리(대부분 비어 있는 기본값)뿐이다.
**이 판정이 나머지 리뷰에 주는 의미:** 이 leaf는 "동작하는 영속 경로"로 평가하면 안 되고 "fork가 그 위에 구현을 얹을 라이브러리"로 평가해야 한다. 그래서 아래 발견의 무게중심은 *런타임 버그*보다 **"라이브러리가 자기 계약을 지키는가"** 와 **"fork가 켰을 때 무슨 일이 벌어지는가"** 에 있다.
---
## 3. 런타임 토글 판정 — 꺼지면 정말 꺼지는가
### 끄는 키
| 키 | 프로퍼티 | 기본값 | 근거 |
|---|---|---|---|
| `APP_PERSISTENCE_MONGO_ENABLED` | `ca-skeleton.persistence-mongo.enabled` | `false` | `src/app-bootstrap/src/main/resources/config/persistence.yml:14-16`, `docs/registries/env-keys.yaml:4294-4305` |
| `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE` | `ca-skeleton.persistence-mongo.active-profile` | `""` (켜면 필수) | `persistence.yml:17-19`, `env-keys.yaml:4306-4319` |
### OFF일 때 남는 것 — 3중 차단이고, 실제로 꺼진다
1. **Boot 자체 auto-configuration 차단.** `MongoOptInAutoConfigurationImportFilter`(`src/.../mongo/MongoOptInAutoConfigurationImportFilter.java:24-53`)가 `META-INF/spring.factories`를 통해 `AutoConfigurationImportFilter`로 등록되어, Boot 4의 Mongo auto-config 9개를 후보에서 제거한다. 이건 project condition보다 먼저 평가되므로 유일하게 옳은 위치다.
2. **leaf 자신의 진입점 1개.** `AutoConfiguration.imports`에는 `MongoRootAutoConfiguration` 하나만 있고, 이 클래스가 `@ConditionalOnProperty(...enabled=true)`를 달고 나머지 4개 configuration을 `@Import`한다(`MongoRootAutoConfiguration.java:26-38`).
3. **component scan에서 leaf 전체 제외.** `CaSkeletonApplication.AUTO_CONFIGURED_PACKAGES`(`src/app-bootstrap/.../CaSkeletonApplication.java:103`)에 `dev\.caskeleton\.adapter\.outbound\.mongo\..*`가 있다. `@ComponentScan(basePackages = {..., "dev.caskeleton.adapter", ...})`가 이 leaf를 훑지만 정규식 필터가 걷어낸다. `@ConfigurationPropertiesScan`의 패키지 목록에도 mongo 패키지가 없으므로 설정 바인딩도 일어나지 않는다.
**검증:** `MongoPersistenceConfigTest.disabledByDefaultCreatesNoMongoInfrastructure`(`src/test/.../MongoPersistenceConfigTest.java:22-30`)가 실제 `@EnableAutoConfiguration` 컨텍스트에서 `MongoClient`/`MongoTemplate` 부재를 확인한다. 테스트 classpath에 진짜 Mongo starter가 있고 spring.factories도 로드되므로 **필터까지 포함한 end-to-end 증거**다. 이 테스트는 `@Tag` 없이 기본 `test` 레인에서 돈다.
| 항목 | OFF 상태 |
|---|---|
| `MongoClient` bean | 없음 |
| 커넥션 풀 / 소켓 | 없음 (bean이 없으므로 driver가 cluster를 만들지 않음) |
| `MongoTemplate` / `ReactiveMongoTemplate` | 없음 |
| 인덱스 생성 | 없음 (애초에 런타임 인덱스 생성 경로 자체가 없음 — §4 참조) |
| converter 등록 | 없음 (`MongoMappingConfiguration`도 같은 flag 게이트 + scan 제외) |
| health indicator | 없음 (`MongoPlatformHealthConfiguration`은 `MongoRootAutoConfiguration`에서만 import되고 scan에서 제외됨) |
| 스레드 | 없음 |
| 필수 env | **없음** (`APP_PERSISTENCE_MONGO_ACTIVE_PROFILE`은 `enabled=true`일 때만 요구됨 — `CapabilityDependencyValidator.java:104-113`) |
| classpath | `spring-boot-starter-data-mongodb`(sync) + `mongodb-driver-sync` + `spring-boot-health` + `micrometer-core`가 jar에 남음. reactive starter와 `mongodb-driver-reactivestreams`는 `app-bootstrap/build.gradle:91-99`에서 exclude |
**판정: 끄면 꺼진다.** 브리프의 Critical 정의("꺼진 기술이 빈·스레드·커넥션·필수 env를 요구")에 해당하는 것은 하나도 없다. 남는 것은 classpath 비용뿐이고, 그건 `README.md:22-24`가 의도적 선택이라고 명시한다("부재는 배포 시점에 되돌릴 수 없고 gating 결함을 전부 가린다").
### 자동설정이 클래스패스만으로 켜지는 경로 — 막혀 있지만 fail-open이다
`MongoOptInAutoConfigurationImportFilter.java:24-34`의 차단 목록은 **하드코딩된 9개 클래스명 Set**이고, `:50`의 판정은 `!MONGO_AUTO_CONFIGURATIONS.contains(cls)` — 즉 **목록에 없으면 통과**다. Boot가 Mongo auto-configuration을 하나 더 추가하거나 이름을 바꾸면 그 순간 조용히 뚫린다. 이 필터를 직접 겨냥한 테스트는 저장소 전체에 **하나도 없다**(`grep -rl MongoOptInAutoConfigurationImportFilter` → main 소스, spring.factories, README, CLAUDE.md뿐). `MongoPersistenceConfigTest`가 `MongoClient`/`MongoTemplate` 부재만 확인하므로, health/metrics 계열 auto-config가 새로 새어 들어오면 잡히지 않는다. → **H7**
---
## 4. 구조 판정
| 축 | 판정 | 근거 |
|---|---|---|
| 의존 방향 (modules.json 대조) | **OK** | `modules.json`의 `allowed_dependencies: []` ↔ `build.gradle:28-49`에 `project(...)` 의존 0건. 외부 의존만 있고 그 외부도 전부 Boot BOM에서 버전이 온다(`build.gradle:23-24` 주석대로 driver 버전 pin 없음). `app-bootstrap`이 leaf를 `implementation(project(...))`로 싣는 역방향 edge만 존재(`app-bootstrap/build.gradle:91`) |
| 패키지 내부 경계 | **OK, 그리고 이 저장소에서 가장 강한 장치** | `MongoModuleBoundaryTest`(`src/test/.../architecture/MongoModuleBoundaryTest.java:38-105`)가 **닫힌 edge 행렬**을 들고 (a) 디스크의 top-level 패키지 집합과 정확히 일치하는지, (b) 관측된 모든 edge가 선언된 것인지, (c) 선언된 edge가 DAG인지를 검사한다. `api..`는 Spring/driver/BSON/Reactor/Micrometer를 전부 금지 |
| 경계 누수 (DTO·entity·framework 타입) | **누수 없음** | inbound/application/domain 타입이 이 leaf에 하나도 없다. 반대 방향은 `MongoAccessRules.noMongoAccessFrom`(testFixtures)이 `MongoTemplate`/`MongoClient`/`MongoDatabase`/`MongoCollection`을 inbound에서 금지하고, **실패 fixture(`LeakyController`)로 규칙이 실제로 떨어지는지까지 확인**한다(`MongoAccessRulesTest:660-671`) |
| 비즈니스 규칙 위치 | **OK** | mapper·config에 도메인 규칙이 없다. 단 `MongoAggregationStageDescriptor.KNOWN_STAGES`, `MongoObservationConvention.ALLOWED_TAGS`, `DefaultMongoFailureClassifier.CATEGORY_BY_CODE` 같은 **벤더 사실 테이블**이 코드에 박혀 있는데, 이건 비즈니스 규칙이 아니라 MongoDB 사실이므로 여기가 맞는 자리다 |
| 테스트 전략 적합성 | **OK, 예외적으로 잘함 (단 진행 중)** | hermetic 98개(`mongodb-contract` 83 + 무태그 15)와 Docker 레인 7개가 **소스셋 단위로 분리**되어 있어 `test`의 runtime classpath에 Testcontainers가 없다(`grep testcontainers src/test src/testFixtures` → 0건). Docker 레인은 실제 벤더 동작(트랜잭션, change stream, Toxiproxy 응답 유실, TLS 인증서 4종, RBAC, migration fence)을 검증한다. **이 분리는 지금 커밋되지 않은 상태다** — `mongoIntegrationTest`/`mongoProviderTestkit` 소스셋 15파일이 untracked (§7, H6) |
| public surface | **OK** | `docs/architecture/mongo-api-surface.txt`의 346개 엔트리가 실제 public top-level 타입 346개와 **이름 단위로 정확히 일치**(내가 직접 대조). `verifyMongoApiSurface`가 `check`에 걸려 있다 |
---
## 5. 발견
### Critical
#### C1. Mongo를 켜면, 아무도 설정하지 않은 클라이언트가 만들어진다
- **현상**: `APP_PERSISTENCE_MONGO_ENABLED=true`로 켰을 때 연결 URI를 지정하는 경로가 저장소 어디에도 기본으로 없다. 그리고 README가 알려주는 키는 Boot 4에서 바인딩되지 않는 키다.
- **근거**:
- `src/adapter/outbound/persistence-mongo/README.md:36-38` — 활성화 예시가 `spring.data.mongodb.uri=mongodb://localhost:27017/portfolio`
- `src/adapter/outbound/persistence-mongo/CLAUDE.md:25` — "The connection URI and database come from Spring's standard `spring.data.mongodb.*` settings"
- `src/.../mongo/MongoPersistenceSettings.java:14-19` — **같은 저장소의 production 소스가 정반대를 말한다**: "`spring.mongodb.*` is the canonical namespace in Spring Boot 4; `spring.data.mongodb.*` is deprecated at **error level** in its metadata."
- `src/app-bootstrap/src/main/resources/config/persistence.yml` — `spring.mongodb.uri`도 `spring.data.mongodb.uri`도 없음
- `src/.env.example:297-299`, `src/.env.local.example:27-29` — `SPRING_MONGODB_URI`가 없음. `APP_PERSISTENCE_MONGO_ENABLED`와 `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE`만 있음
- `docs/registries/env-keys.yaml` — `SPRING_MONGODB_URI`가 등록되어 있지 않음(`grep -i mongo` 결과 7줄 전부 `APP_PERSISTENCE_MONGO_*`)
- 유일하게 URI를 주는 곳은 `src/config/runtime/compose-profile-contracts.json:143`/`:603`의 `SPRING_MONGODB_URI` 뿐이다 — 즉 Compose 레인만 올바르게 설정되어 있고 그 외 경로는 전부 비어 있다
- **왜 문제인가**: fork 사용자가 README대로 `spring.data.mongodb.uri`를 세팅하면 Boot 4는 그 키를 바인딩하지 않는다. `MongoAutoConfiguration`은 드라이버 기본값(`mongodb://localhost:27017`, database `test`)으로 클라이언트를 만든다. 드라이버는 lazy라 **기동은 성공한다.** 그 다음 (a) 컨테이너 환경이면 첫 연산에서 server selection timeout으로 죽고, (b) 개발자 로컬이면 조용히 `test` 데이터베이스에 쓴다. 둘 다 "설정했다고 믿는 곳이 아닌 곳"이다.
- **수정 방향**: (1) `config/persistence.yml`에 `spring.mongodb.uri: ${SPRING_MONGODB_URI:}`를 추가하고 `env-keys.yaml`에 `SPRING_MONGODB_URI`를 `required_when: APP_PERSISTENCE_MONGO_ENABLED=true`로 등록. (2) README.md:37과 CLAUDE.md:25를 `spring.mongodb.uri`로 고친다. (3) `MongoNamespaceContractTest.productionSources`(`src/test/.../MongoNamespaceContractTest.java:72-90`)가 `/src/main/`만 훑으므로 `.md`도 대상에 넣는다. (4) 켰는데 URI가 비면 기동 실패시키는 검사를 `CapabilityDependencyValidator`에 추가.
- **반론과 재반박**: "Compose 레인은 올바르므로 런타임은 처음부터 맞는 네임스페이스였다" — `MongoPersistenceSettings`의 Javadoc과 `MongoNamespaceContractTest`가 실제로 그렇게 주장한다. 맞다. **그러나 그 주장이 성립하는 범위가 Compose 레인 뿐이라는 것이 문제다.** 이 저장소는 템플릿이고, fork 사용자가 읽는 첫 문서는 leaf의 README다. README가 안 되는 키를 가리키고, `.env.example`에 되는 키가 없고, 기본 yml에도 없다. 세 곳이 동시에 비어 있으면 "런타임은 맞았다"는 방어는 실제 사용자에게 도달하지 않는다.
#### C2. profile이 선언한 TLS·Stable API·타임아웃·풀 경계가 실제 드라이버에 도달하지 않는다
- **현상**: `MongoClientSettingsFactory`는 typed profile을 `MongoClientSettings`로 바꾸는 유일한 클래스인데, **production 코드 중 이 클래스를 호출하는 곳이 없다.**
- **근거**:
- `src/.../mongo/client/MongoClientSettingsFactory.java:38` — 클래스 본문. `grep -rn MongoClientSettingsFactory src/` 결과 참조자는 `MongoClientSettingsFactoryTest` 7곳뿐, main 참조 0건
- 실제 클라이언트는 `MongoPersistenceConfig.java:26`이 `@ImportAutoConfiguration({MongoAutoConfiguration.class, ...})`로 Boot에 맡긴다. Boot는 `spring.mongodb.*` + `MongoClientSettingsBuilderCustomizer`만 읽는다
- 이 leaf가 등록하는 유일한 customizer는 `MongoDriverObservabilityAutoConfiguration.java:38-48`의 관측 리스너뿐이고, profile 설정은 건드리지 않는다
- 반면 `MongoProfileProperties.validate()`(`autoconfigure/MongoProfileProperties.java:104-163`)는 production profile에 TLS·인증·Stable API strict·유한 타임아웃·풀 경계를 **강제**한다
- 그 validate는 `MongoPlatformAutoConfiguration.java:342`에서 실제로 호출된다(probe + 3개 bean이 있을 때)
- **왜 문제인가**: `platform.profiles.primary.tls-required=true`, `production=true`로 설정한 배포는 startup validation을 **통과한다.** 그리고 URI에 `tls=true`가 없으면 평문으로 연결한다. `MongoClientSettingsFactory.java:97-102`의 주석이 정확히 이 실패를 막겠다고 쓰여 있다("A profile that declares TLS and connects without it is the failure this leaf's production validation exists to prevent, and it cannot prevent it from a record the driver never reads") — 그런데 그 클래스 자체가 호출되지 않으므로 같은 실패가 한 층 위에서 그대로 반복된다. 타임아웃·풀 경계도 마찬가지로 드라이버 기본값(server selection 30s, socket read 무한)이 쓰인다.
- **수정 방향**: `MongoPlatformAutoConfiguration`에 `@ConditionalOnBean(MongoCredentialResolver.class)` + `profiles` 비어있지 않음 조건으로 `MongoClientSettingsBuilderCustomizer`를 하나 더 등록해서 `MongoClientSettingsFactory.create()`의 결과를 Boot builder에 반영하거나, 최소한 CLAUDE.md/README에 "profile 설정은 fork가 `MongoClientSettingsFactory`를 직접 wiring해야 적용된다"를 명시한다. 후자만 해도 "적용된 것처럼 읽히는" 문제는 사라진다.
- **반론과 재반박**: "`MongoCredentialResolver` 구현체를 이 저장소가 싣지 않으므로(`security/MongoCredentialResolver.java:35-45`가 `unconfigured()`를 refuse로 정의) factory를 자동 wiring할 수 없다" — 맞다, 그래서 auto-wiring이 없는 것 자체는 옳은 선택이다. **그러나 그 결과 production 보안 검증이 아무것도 강제하지 않는 상태가 되었고, 어느 문서도 그 사실을 말하지 않는다.** `CLAUDE.md:101-112`는 "A production `MongoProfileProperties` must declare TLS... `validate()` enforces all of them"이라고만 쓰고, 그 강제가 드라이버에 도달하지 않는다는 말은 없다. 지금 상태는 "보안 통제가 있는 것처럼 읽히는 문서 + 통제가 없는 런타임"이고, 그게 Critical인 이유다.
---
### High
#### H1. `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE`은 켤 때 필수인데, 바인딩되는 곳이 없다
- **현상**: env 레지스트리가 "정확히 하나의 Mongo profile을 고르고, 선택되지 않은 profile의 secret은 절대 resolve하지 않는다"고 서술하는 키가, 런타임 코드 어디에도 바인딩되지 않는다.
- **근거**:
- `docs/registries/env-keys.yaml:4306-4319` — `required_when: APP_PERSISTENCE_MONGO_ENABLED=true`, 설명은 "the runtime builds one sync client and one pool; a profile present in the map but not selected has neither its secret resolved nor a client created"
- `src/app-bootstrap/.../activation/CapabilityDependencyValidator.java:104-113` — 비어 있으면 기동 실패
- `src/.../mongo/MongoPersistenceSettings.java:22-37` — `ca-skeleton.persistence-mongo` prefix에 바인딩되는 필드는 `enabled` **하나뿐**
- `MongoPlatformSettings`는 `ca-skeleton.persistence-mongo.platform` prefix라 `active-profile`을 못 읽는다(`autoconfigure/MongoPlatformSettings.java:26`)
- `active-profile`을 읽는 유일한 코드는 위 validator뿐. `MongoClientSettingsFactory`의 `activeProfile` 생성자 파라미터는 C2대로 호출자가 없다
- **왜 문제인가**: fork가 `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE=primary`를 세팅하면 기동은 통과한다. 그리고 `primary`는 아무것도 고르지 않는다. 오타(`primry`)를 내도 똑같이 통과한다. 설정했다고 믿는 값이 런타임에 영향이 0인 상태는, 나중에 profile 기능이 실제로 붙었을 때 "이미 맞게 설정돼 있는 줄 알았던" 배포를 만든다.
- **수정 방향**: `MongoPersistenceSettings`에 `activeProfile` 필드를 추가하고, `MongoPlatformSettings.profiles`가 비어있지 않을 때 `require(activeProfile)`로 존재를 검증하는 `InitializingBean`을 `MongoPlatformAutoConfiguration`에 추가. 혹은 기능이 붙을 때까지 이 키를 레지스트리에서 내리고 validator 규칙을 제거.
- **반론과 재반박**: "profile 기능이 나중에 붙을 것이므로 키를 미리 예약해 둔 것" — 그렇다면 `env-keys.yaml`의 설명문이 **미래형이 아니라 현재형으로 동작을 서술하고 있는 것**이 문제다. 예약이면 예약이라고 써야 한다.
#### H2. 선언한 deadline을 넘긴 연산이, 성공했는데 "전송되지 않음"으로 보고된다
- **현상**: blocking executor가 콜백 완료 후 elapsed를 재고, 초과했으면 `MongoOperationRejectedException`을 던진다. 그 예외의 outcome은 `NOT_SENT`, category는 `OPERATION_REJECTED`, retryable은 false다.
- **근거**: `src/.../mongo/imperative/DefaultMongoImperativeExecutor.java:93-105`
```java
if (elapsed.compareTo(context.timeout()) > 0) {
observation.success(outcome); // :97
throw MongoOperationRejectedException.of(...); // :98
}
```
`MongoOperationRejectedException.of`는 `MongoFailureContext.rejected(...)`를 쓰고(`api/error/MongoOperationRejectedException.java:24-28`), 그 컨텍스트는 `outcome = NOT_SENT, ambiguous = false`다(`api/error/MongoFailureContext.java:130-145`).
- **왜 문제인가**: 이 시점에 콜백은 **이미 성공적으로 반환했다.** 즉 서버는 쓰기를 적용했다. 그런데 호출자가 받는 예외는 "아무것도 전송되지 않았다, 애매하지 않다"라고 말한다. `MongoExecutionOutcome.NOT_SENT`의 정의가 "The command never left the client"이므로, 이 예외를 보고 재시도하는 호출자는 **중복 쓰기를 만든다.** 이 leaf 전체가 "ambiguous outcome을 성공/실패로 뭉개지 말라"는 원칙 위에 서 있는데(`CLAUDE.md:131`), 여기서만 정확히 그 반대를 한다.
- 이 경로가 실제로 도달 가능한 이유: `BoundScopedOperations`는 `maxTimeMS`를 붙이지만(`imperative/BoundScopedOperations.java:57-60`), atomic/bulk/geo/aggregation 실행기는 전부 `access.rawOperations()`를 쓴다(예: `imperative/atomic/MongoAtomicOperationsTemplate.java:78-95`). raw 경로에는 `maxTimeMS`가 없으므로 서버가 먼저 끊어주지 않는다.
- 부수 문제: `:97`에서 `observation.success(outcome)`를 호출한 뒤 예외를 던지므로 메트릭은 성공, 호출자는 실패로 서로 어긋난다.
- **수정 방향**: 이 경로의 실패 컨텍스트를 `MongoFailureContext.timedOut(operationName, operationType, timeout)`으로 바꾼다 — 그 팩토리는 이미 존재하고 쓰기일 때 `WRITE_RESULT_UNKNOWN`, `ambiguous=true`를 준다(`api/error/MongoFailureContext.java:105-129`). 그리고 관측은 `observation.failure(...)`로 기록한다.
- **반론과 재반박**: "콜백이 반환한 뒤에는 작업을 되돌릴 수 없으니 예외 종류는 큰 의미가 없다" — 의미가 있다. 이 플랫폼의 계약은 "outcome을 읽고 재시도 여부를 판단하라"이고(`MongoExecutionOutcome.forbidsBlindReplay()`), `NOT_SENT`는 그 계약에서 "안전하게 재시도 가능"을 뜻한다. 예외 종류가 곧 재시도 지시다.
#### H3. reactive·change stream 절반은 배포된 composition root에서 절대 활성화되지 않는다
- **현상**: `MongoPlatformAutoConfiguration.ReactiveExecution`은 `@ConditionalOnBean(ReactiveMongoTemplate.class)`인데, `app-bootstrap`이 reactive starter를 exclude한다.
- **근거**:
- `src/app-bootstrap/build.gradle:91-99` — `exclude module: 'spring-boot-starter-data-mongodb-reactive'`, `exclude module: 'mongodb-driver-reactivestreams'`
- `src/.../mongo/autoconfigure/MongoPlatformAutoConfiguration.java:187-189` — `@ConditionalOnClass(ReactiveMongoTemplate.class)` + `@ConditionalOnBean(ReactiveMongoTemplate.class)`
- `MongoPersistenceConfig.java:26`은 `MongoAutoConfiguration`/`DataMongoAutoConfiguration`(sync)만 import한다. reactive template을 만드는 것은 아무것도 없다
- 게다가 `MongoPlatformSettings.java:55`가 `changeStreams = false`를 강제한다
- **왜 문제인가**: `reactive/`(8), `reactive/cursor/`(5), `changestream/`(9+5+4+3) 등 약 34개 production 클래스와 `ReactiveExecution` 안의 bean 5개가 **이 애플리케이션에서 도달 불가능**하다. `MongoReactiveWiringTest`는 격리된 `ApplicationContextRunner`에 reactive template을 직접 주입해서 통과하므로, 이 사실을 잡아내지 못한다. `README.md:16-17`은 exclude를 "there is no reactive port in the shipped Stable scope"라고 설명하지만, CLAUDE.md 어디에도 "그래서 reactive/changestream 패키지는 fork가 exclude를 걷어내기 전까지 죽은 코드"라는 문장이 없다.
- **수정 방향**: (a) fork가 reactive를 쓰려면 `app-bootstrap/build.gradle`의 exclude 2줄을 지워야 한다는 것을 leaf README에 한 줄로 쓴다. (b) `MongoPlatformAutoConfiguration.ReactiveExecution`이 활성화될 수 없는 조합이라는 것을 app-bootstrap 쪽 wiring 테스트에서 assertion으로 고정하거나, 반대로 exclude를 걷어내고 `@ConditionalOnProperty`로 reactive를 별도 토글로 승격한다.
- **반론과 재반박**: "안 쓰는 기술을 classpath에서 빼는 것이 이 템플릿의 목표에 부합한다" — 목표에는 부합한다. 문제는 **leaf 안에 34개 클래스와 5개 bean 정의가 남아 있고, 그것들의 테스트가 전부 초록이라는 것**이다. 초록 테스트가 "이 기능은 동작한다"로 읽히는 것이 리스크다. exclude는 유지하되 사실을 문서화하면 해결된다.
#### H4. platform profile을 하나라도 설정하면, 고지되지 않은 bean 4개를 fork가 공급해야 기동한다
- **현상**: `ca-skeleton.persistence-mongo.platform.profiles.*`가 비어 있지 않은 순간 startup 요구사항이 계단식으로 늘어나는데, 그 4개는 이 저장소가 싣지 않고 한 문서에 함께 나열되어 있지도 않다.
- **근거**: `src/.../mongo/autoconfigure/MongoPlatformAutoConfiguration.java`
- `:388-405` `mongoTopologyProbeRequirement` — `profiles`가 비어있지 않은데 `MongoTopologyProbe` bean이 없으면 `IllegalStateException`으로 기동 실패. 이 bean은 조건 없이 등록되므로 회피 불가
- `:330-367` `mongoPlatformStartupCheck` — probe가 있으면 추가로 `MongoSecurityProfile`, `MongoCredentialReference`(admin), `MongoSchemaVersionRange` 세 bean을 요구하고, 하나라도 없으면 fail closed
- 이 4개 타입 중 이 leaf가 bean으로 등록하는 것은 0개
- 추가로 `MongoProfileProperties`(`autoconfigure/MongoProfileProperties.java:23-53`)는 **17개 컴포넌트 전부 필수**인 record다. `Objects.requireNonNull`이 10개, 나머지는 primitive. 기본값이 없고 예시 yml도 저장소에 없으므로, profile 하나를 설정하려면 17개 키를 정확히 써야 바인딩이 성공한다
- **왜 문제인가**: fork 사용자가 "production profile을 선언하자"고 생각한 순간, 기동 실패 4연타를 순서대로 맞는다. 각 실패 메시지는 잘 쓰여 있지만(예: `:396-402`), **한 번에 무엇이 필요한지를 말해 주는 문서가 없다.** `CLAUDE.md:101-112`는 credential resolver가 없다는 것만 말하고 나머지 3개는 언급하지 않는다.
- **수정 방향**: leaf README에 "platform profile을 켜려면 다음 4개 bean과 17개 키가 필요하다" 섹션과 완성된 yml 예시 하나. 또는 `MongoProfileProperties`에 `local()`/`production()`이 이미 정의한 기본값을 record component default로 끌어내려 필수 키를 3~4개로 줄인다.
- **반론과 재반박**: "기본값을 주면 '아무도 고르지 않은 답'이 생긴다 — 이 leaf 전체의 설계 원칙이 그것을 금지한다" — 원칙 자체는 옳고, `MongoUuidRepresentation`에 `UNSPECIFIED`를 두지 않은 것은 정확히 맞는 선택이다. 그러나 `poolMaxWaitTime`이나 `serverSelectionTimeout` 같은 운영 튜닝값까지 전부 "명시 안 하면 바인딩 실패"로 두는 것은 원칙의 과적용이다. 데이터 표현(uuid/decimal)과 운영 파라미터(timeout/pool)를 같은 엄격도로 다룰 이유가 없다.
#### H5. health가 "관측값"이라고 부르는 숫자는 기동 시점에 얼려진 상수다
- **현상**: `MongoTopologyProbe`는 생성자에서 topology·serverVersion·availableSecondaries를 받아 final 필드에 저장하는 불변 `final` 클래스다. health indicator는 그 인스턴스를 필드로 붙잡는다.
- **근거**:
- `src/.../mongo/autoconfigure/MongoTopologyProbe.java:24-45` — `final class`, 세 값 모두 final, 갱신 메서드 없음
- `:20-22` 주석 — "Everything here is an observation... the health view that reads these values reports them to an operator as fact"
- `autoconfigure/MongoPlatformHealthIndicator.java:35-38` — 생성자 주입 후 `:69-72`의 `degradedSecondaryAvailability()`가 `probe.availableSecondaries()`를 읽는다
- `MongoPlatformHealthContributor.health()`(`src/.../mongo/MongoPlatformHealthContributor.java:18-22`)가 매 actuator 호출마다 이 값을 details에 넣는다
- **왜 문제인가**: 이 클래스의 Javadoc이 **바로 이 결함을 고쳤다고 주장한다**(`MongoPlatformHealthIndicator.java:30-33`: "The observed count was a literal `0` in the bean method, so every replica set reported every secondary missing"). 고친 결과는 리터럴 0이 아니라 "기동 시점 스냅샷"이다. 세컨더리가 죽어도 `/actuator/health`는 기동 때 세던 숫자를 계속 보고하고, `ready()`도 기동 시점 topology로만 판정한다. 운영자 입장에서는 이전보다 더 나쁘다 — 이전엔 명백히 틀린 0이라 무시했겠지만 지금은 그럴듯한 숫자다.
- **수정 방향**: `MongoTopologyProbe`를 값 record가 아니라 `Supplier<MongoTopologyObservation>` 형태의 포트로 바꾸거나, health indicator가 `ObjectProvider<MongoTopologyProbe>`가 아니라 매 호출마다 cluster description을 다시 읽는 함수를 받게 한다. 최소 조치로는 details에 `observedAt` 타임스탬프를 넣어 스냅샷임을 드러낸다.
- **반론과 재반박**: "probe는 fork가 만드는 bean이므로 fork가 갱신되는 구현을 주면 된다" — 못 준다. `MongoTopologyProbe`는 `final class`라 서브클래싱이 불가능하고, 필드가 final이며, 세터가 없다. fork에게 남은 유일한 선택지는 bean scope를 바꾸는 것인데 health indicator가 인스턴스를 직접 들고 있으므로 소용없다. **타입 설계가 갱신을 구조적으로 막고 있다.**
#### H6. untracked 18파일 2,530줄 — `git add` 없이 커밋하면 production health 브리지와 Docker 레인 전부가 저장소에서 사라진다
- **현상**: 리팩토링이 tracked 파일 18개를 지우고 대응물 18개를 새 위치에 만들었는데, **새 파일이 전부 untracked다.** 그중 2개는 테스트가 아니라 production 코드다.
- **근거**: `evidence/status.txt` + `evidence/untracked-files.txt` + `untracked-wc.txt`
- 삭제(tracked): `status.txt:54-60` `src/test/.../*LaneTest.java` 7개 / `:61-68` `src/testFixtures/.../testkit/{atlas,failover,rs}/*` 8개 / `:113-114` `app-bootstrap/.../autoconfigure/mongo/MongoPlatformHealthConfig.java`·`MongoPlatformHealthContributor.java` / `:155` 그 테스트 — 합계 18파일
- 추가(untracked): `untracked-files.txt`의 persistence-mongo 18줄 — `src/mongoIntegrationTest/`(7), `src/mongoProviderTestkit/`(8), `src/main/.../mongo/MongoPlatformHealthConfiguration.java`, `src/main/.../mongo/MongoPlatformHealthContributor.java`, `src/test/.../MongoPlatformHealthContributorTest.java`
- 줄 수: `untracked-wc.txt` 합계 **2,530줄**
- **왜 문제인가**: `git commit -a` / `git add -u` 뒤 commit이면 삭제 18건만 반영되고 추가는 0건이다. 결과:
- **production**: `app-bootstrap`의 Mongo health 브리지가 사라지고 leaf의 대체물이 없다 → Actuator에서 Mongo health가 통째로 없어진다.
- **테스트**: replica set / failover / migration / compatibility / security-integration / TLS 6개 레인의 클래스와 컨테이너 fixture 전부가 사라진다 — 이 leaf에서 **실제 MongoDB를 상대로 하는 유일한 증거**다.
- **조용히 깨지지는 않는다** (앞선 판정 정정):
- production 쪽: `MongoRootAutoConfiguration.java`의 tracked diff(+3/−1)가 `MongoPlatformHealthConfiguration.class`를 `@Import` 목록에 넣는 변경이므로, 클래스가 없으면 **컴파일이 깨진다.**
- 테스트 쪽: `StrictTestLanePlugin`(`src/build-logic/.../strictlane/StrictTestLanePlugin.java:47-64`)이 레인 선택 시 소스셋 파일이 0개면 GradleException을 던진다 — *"has no sources in source set 'mongoIntegrationTest'. Gradle would skip it as NO-SOURCE and report success for a lane that ran nothing."* 추가로 `:157`의 `failOnNoDiscoveredTests = true`와 `:174-203`의 "실행 0건" 검사가 이중으로 막는다. **빈 채로 초록이 되는 경로는 없다.**
- **수정 방향**: 커밋 전에 `git add -A`, 또는
`git add src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealth*.java src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributorTest.java`
- **반론과 재반박**: "작업 중인 워킹트리라 당연한 상태다" — 맞다. 그래서 이건 코드 결함이 아니라 **커밋 직전 체크리스트 항목**이고, 심각도의 근거는 (a) production 코드 2개가 섞여 있다는 것, (b) `-u`/`-a`가 일상적 커밋 습관이라는 것, (c) 사라지는 것이 이 leaf의 유일한 실서버 증거라는 것 세 가지다. **내용 손실 자체는 0이다** — 삭제분과 새 파일을 바이트 단위로 대조해 16/18 동일, 2개는 기능 확장임을 확인했다(§7.3).
#### H7. auto-configuration 차단 목록이 하드코딩 fail-open이고, 그것을 검증하는 테스트가 없다
- **현상**: 토글 계약에서 가장 중요한 장치가 9개 문자열 Set이고, 목록 밖은 통과시킨다.
- **근거**:
- `src/.../mongo/MongoOptInAutoConfigurationImportFilter.java:24-34` — 9개 FQCN 하드코딩
- `:47-50` — `matches[index] = enabled || cls == null || !MONGO_AUTO_CONFIGURATIONS.contains(cls)` → 모르는 클래스는 허용
- 이 클래스를 참조하는 테스트: 0건 (`grep -rl MongoOptInAutoConfigurationImportFilter src/` → main 소스 1, spring.factories 1, 문서 2)
- **왜 문제인가**: Boot 4.0.x 패치 하나가 Mongo auto-configuration을 추가하거나 패키지를 옮기면 그 순간 "꺼진" 배포에 bean이 생긴다. `MongoPersistenceConfigTest`가 `MongoClient`/`MongoTemplate` 부재만 보므로, health contributor나 metrics binder가 새어 들어와도 초록이다.
- **수정 방향**: classpath에서 `org.springframework.boot.mongodb.autoconfigure`/`org.springframework.boot.data.mongodb.autoconfigure` 패키지의 `@AutoConfiguration` 클래스를 스캔해서 `MONGO_AUTO_CONFIGURATIONS`와 정확히 일치하는지 확인하는 테스트 하나. `MongoModuleBoundaryTest`가 패키지 집합에 대해 하는 것과 같은 방식이다. 또는 `enabled=false`에서 컨텍스트의 bean 정의 이름 중 `mongo`를 포함하는 것이 0개인지 확인.
- **반론과 재반박**: "필터는 fail-open이 아니라 fail-safe다 — 모르는 클래스를 막으면 Mongo와 무관한 auto-config까지 막힌다" — Set 기반 allowlist가 아니라 **패키지 prefix 기반**으로 바꾸면 둘 다 만족한다. 지금 목록의 9개는 모두 두 패키지 안에 있다.
---
### Medium
#### M1. README·CLAUDE.md가 폐기된 네임스페이스를 가리키고, 네임스페이스 계약 테스트는 문서를 검사하지 않는다
- **근거**: `README.md:37`, `README.md:53`, `CLAUDE.md:25` vs `MongoPersistenceSettings.java:14-19`. `MongoNamespaceContractTest.productionSources`(`src/test/.../MongoNamespaceContractTest.java:72-90`)는 `.java`/`.yml`/`.properties`만, 그것도 `/src/main/` 아래만 훑는다.
- **왜 문제인가**: C1의 근본 원인. 테스트가 "드리프트를 막는다"고 선언하지만(`:19`) 드리프트가 실제로 있는 곳(README)을 보지 않는다.
- **수정 방향**: `productionSources`에 `.md`를 추가.
- **반론**: "문서 스캔은 오탐이 많다" — 이 테스트는 이미 Java 주석을 제거하는 전처리를 갖고 있고, Markdown은 "폐기된 키를 쓰라고 지시하는 문서"와 "폐기됐다고 기록하는 문서"를 코드블록 여부로 구분할 수 있다.
#### M2. 릴리스 증거 검증기가 두 벌이고, CLAUDE.md는 "하나"라고 말한다
- **근거**:
- testFixtures 쪽: `src/testFixtures/.../testkit/release/MongoReleaseEvidenceVerifier.java:59-85` — staleness, skipped, failures, suite name 일치까지 검사. 6필드 contract(`topology` 포함)
- build-tools 쪽: `src/build-tools/src/main/java/dev/caskeleton/buildtools/mongo/MongoReleaseContractLaneVerifier.java:11-50` — 파일 존재 + `tests - skipped >= minimumExecuted`만. staleness·failures·suite name 검사 없음. 4필드 contract
- `check`에 걸려 있는 것은 build-tools 쪽(`MongoVerificationPlugin.java:36-57`). testFixtures 쪽은 `MongoReleaseEvidenceVerifierTest` 외에 호출자가 없다
- `CLAUDE.md:88-90` — "Release gating is testkit-only for the same reason and is **one implementation, not two**"
- `scripts/verify-mongodb-platform.sh`는 둘 중 아무것도 안 쓰고 `sed`로 직접 XML을 센다(`:47-56`)
- **왜 문제인가**: `check`가 돌리는 검증기가 더 약하다. **테스트가 실패해도 통과하고**(failures 미검사), **엉뚱한 클래스의 XML을 읽어도 통과한다**(suite name 미검사 — testFixtures 쪽은 `:75-77`에서 검사한다).
- staleness는 실질 문제가 아니다: `StrictTestLanePlugin:158`이 모든 strict lane에 `getOutputs().upToDateWhen(ignored -> false)`를 걸고, `verifyMongoReleaseContractLanes`가 `dependsOn("test", "mongoStableContractTest")`이므로(`MongoVerificationPlugin.java:45`) 두 레인이 항상 재실행된다. 남은 실질 구멍은 **failures 미검사**와 **suite name 미검사** 두 가지다.
- **추가 구멍**: `MongoReleaseContractLaneVerifier.java:16-18`의 `if (!hermeticLanes.contains(contract.task())) continue;` — 누군가 `contracts[]`에 `mongoReplicaSetTest`를 추가하면 **조용히 건너뛴다.** 이게 정확히 `release-contracts.json`의 `not_promoted_reason`이 경고하는 실패 모드다.
- **수정 방향**: build-tools 검증기에 failures·suite-name 검사를 이식하고(testFixtures 쪽 `MongoReleaseEvidence.rejection()`이 이미 구현체를 갖고 있다), hermetic이 아닌 lane은 `continue`가 아니라 명시적 "verified elsewhere" 보고로 바꾼다. CLAUDE.md:88-94를 사실에 맞춘다.
#### M3. `findAndModify` 경로는 matched/modified를 항상 1/1로 보고한다
- **근거**: `src/.../mongo/imperative/atomic/MongoAtomicOperationsTemplate.java:118` — `return AtomicUpdateResult.applied(1, 1, document);`
- **왜 문제인가**: `AtomicUpdateResult`의 계약(`imperative/atomic/AtomicUpdateResult.java:9-13`)은 "matched but not modified"를 상태 전이 판단 신호로 쓰라고 말한다. `ReturnDocumentMode.BEFORE/AFTER`를 쓰는 호출자에게는 `matchedButUnchanged()`가 **절대 true가 되지 않는다.** 같은 논리를 `updateOne`(`:132-134`)은 실제 count로 올바르게 보고하므로, 두 경로가 서로 다른 의미를 준다.
- **수정 방향**: `findAndModify`가 count를 주지 않으므로, 이 경로에서는 `matched`/`modified`를 -1 같은 "알 수 없음"으로 두거나 `AtomicUpdateResult`에 `countsUnavailable()`을 추가한다.
#### M4. reactive cursor의 클라이언트 측 결과 예산 추적기는 절대 발동할 수 없다
- **근거**: `src/.../mongo/reactive/cursor/MongoReactiveCursorPublisher.java:56-67`
```java
Query bounded = Query.of(query).cursorBatchSize(batchSize).maxTimeMsec(...).limit(budget.maxResults()); // :59
MongoResultBudgetTracker tracker = new MongoResultBudgetTracker(budget, null); // :60
... .doOnNext(result -> tracker.record(null)); // :67
```
`MongoResultBudgetTracker.record`는 `seen > budget.maxResults()`일 때 던진다(`reactive/cursor/MongoResultBudgetTracker.java:51-56`). 서버 limit이 `maxResults`와 같으므로 `seen`은 `maxResults`를 넘지 못한다.
- **왜 문제인가**: 주석(`:64-66`)이 "Counted client-side as well: a server limit bounds one query, and this bounds the stream the caller actually consumes"라고 이유를 대는데, 같은 값이므로 두 번째 경계가 첫 번째와 동일하다. 또 `codecs`에 `null`을 넘기므로 바이트 예산은 아예 측정되지 않는다(`MongoResultBudgetTracker.java:57-59`가 즉시 return).
- **수정 방향**: 서버 limit을 `maxResults + 1`로 두거나(추가 1건이 오면 예산 초과가 관측 가능), tracker를 제거하고 서버 limit만 신뢰한다고 문서화. 바이트 예산을 쓰려면 codec registry를 실제로 넘긴다.
#### M5. `change-streams: true`는 조용히 무시된다 — Javadoc은 "거부한다"고 말한다
- **근거**: `src/.../mongo/autoconfigure/MongoPlatformSettings.java:48-55`
```java
// ... Accepting the flag and ignoring it would leave an operator believing it took effect,
// so the value is refused rather than stored ...
changeStreams = false; // :55
```
코드는 정확히 "accept and ignore"를 한다. 예외를 던지지 않는다. `MongoStartupValidationTest.changeStreamsCannotBeSwitchedOn`(`src/test/.../autoconfigure/MongoStartupValidationTest.java:71-81`)이 이 강제 coercion을 의도된 동작으로 고정한다.
- **왜 문제인가**: 주석이 서술하는 실패 모드가 바로 구현된 동작이다. 운영자가 `true`로 켜고 아무 피드백도 못 받는다.
- **수정 방향**: `changeStreams == true`면 `MongoOperationRejectedException`을 던진다. 한 줄이고 테스트만 반대로 뒤집으면 된다.
#### M6. `FlamingockLedgerAdapter`가 in-memory 비동시 맵을 쓰고 fence를 버린다
- **근거**: `src/.../mongo/migration/flamingock/FlamingockLedgerAdapter.java:28-30` — `LinkedHashMap` 2개. `:56-62` `recordApplied(..., long fence)`가 fence 파라미터를 무시하고 로컬 맵에만 쓴다. `saveCheckpoint(checkpoint, fence)`(`:74-78`)도 동일.
- **왜 문제인가**: `MongoMigrationLedger`의 계약(`migration/MongoMigrationLedger.java:18-34`)은 "fence가 현재 것이 아니면 거부"를 요구하고, `MongoMigrationRunner`는 unfenced lease를 refuse할 만큼 이 규약에 의존한다(`migration/MongoMigrationRunner.java:80-89`). Flamingock 어댑터는 그 규약을 어기면서 같은 인터페이스를 구현한다. 또한 로컬 맵은 재시작을 못 넘긴다 — 클래스 Javadoc(`:694-700`)이 "avoid the failure where the two disagree"라고 주장하는데, 로컬 맵과 엔진 로그가 정확히 그 두 개다.
- **수정 방향**: `recorded`/`checkpoints`를 Flamingock 자신의 저장소 또는 `MongoCollectionMigrationLedger`에 위임하고, fence 미지원을 `UNFENCED`로 정직하게 보고한다(`FlamingockLockAdapter.fence()`가 이미 그렇게 한다 — 어댑터끼리 태도가 다르다).
#### M7. `verify-mongodb-platform.sh`의 첫 레인이 clean 빌드에서 깨질 가능성
- **근거**: `scripts/verify-mongodb-platform.sh:102` — `run_lane "static-analysis" "check" -x "mongoStableContractTest"`. `check`는 `verifyMongoTestLaneDisjointness`에 의존하고(`build.gradle:225-228`), 그 태스크의 `@InputDirectory getContractResults()`는 `build/test-results/mongoStableContractTest`다(`buildtools/mongo/MongoVerificationPlugin.java:22-27`).
- **왜 문제인가**: `-x`로 제외하면 그 디렉터리가 생성되지 않는다. Gradle의 `@InputDirectory`는 존재하지 않는 디렉터리를 오류로 처리한다. clean 체크아웃에서 릴리스 게이트 첫 줄이 실패할 개연성이 높다.
- **미검증**: 빌드를 돌리지 못했다. 확인 명령: `cd src && ./gradlew clean :adapter:outbound:persistence-mongo:check -x mongoStableContractTest --console=plain`
- **수정 방향**: `getContractResults()`에 `@Optional`을 붙이고 없으면 빈 집합으로 처리하거나, 스크립트에서 `check` 대신 `compileJava spotlessCheck checkstyleMain` 등을 명시적으로 나열한다.
#### M8. `MongoProfileProperties`는 기본값 없는 17-component record이고, 예시 yml이 저장소에 없다
- **근거**: `autoconfigure/MongoProfileProperties.java:23-53`. `production()`/`local()` 팩토리(`:56-97`)에는 합리적 기본값이 전부 있는데 record component default로는 내려오지 않는다. `grep -rn "persistence-mongo.platform" src/**/*.yml` → 0건.
- **왜 문제인가**: H4와 함께, "profile 하나 켜기"의 실질 비용이 17키 + 4bean이 된다. 그 조합을 보여주는 파일이 저장소에 없다.
- **수정 방향**: `config/persistence.yml`에 주석 처리된 완전한 profile 예시 블록 하나.
#### M9. Compose가 쓰는 Mongo 이미지와 테스트 레인이 pin한 이미지가 다르다
- **근거**: `docker-compose.infra.yml:59` — `image: mongo:7` (부동 태그). `build.gradle:139-144` — `mongo:8.0.16`(primary), `mongo:7.0.28`(compatibility).
- **왜 문제인가**: 로컬 개발이 7.x 최신, CI 레인이 8.0.16이다. Stable API V1 strict를 쓰는 배포에서 두 서버의 거동 차이가 로컬에서 안 잡힌다. `mongo:7`은 부동이라 어제와 오늘이 다를 수도 있다.
- **수정 방향**: compose를 `mongo:8.0.16`으로 pin해 primary 레인과 맞추거나, 최소한 `mongo:7.0.28`로 고정.
#### M10. CLAUDE.md가 "shipped되지 않았다"고 쓴 change-stream driver source가 shipped되어 있다
- **근거**: `CLAUDE.md:121-124` — "The driver-side source — `watch`, `resumeAfter`/`startAfter`, cursor lifetime and reconnection — is **not** shipped." vs `src/.../mongo/changestream/consumer/SpringReactiveChangeStreamSource.java:43-70`(watch + resumeAfter/startAfter 전부 구현) + `MongoPlatformAutoConfiguration.java:207-215`(bean으로 등록).
- **수정 방향**: CLAUDE.md를 사실에 맞춘다. 코드가 사실이다.
#### M11. CLAUDE.md가 존재하지 않는 `testkit` 소스셋을 가리킨다
- **근거**: `CLAUDE.md:66`("No production package may depend on `…mongo.testkit..`"), `:87-94`("in the **testkit** source set"). 실제 소스셋은 `testFixtures`와 `mongoProviderTestkit`이다(`build.gradle:65-80`). 패키지 이름은 `…mongo.testkit…`이 맞지만 소스셋 이름은 아니다.
- **수정 방향**: 용어 통일. (자잘하지만 이 문서는 fork가 읽는 첫 계약서다.)
#### M12. `SpringReactiveChangeStreamSource`가 subscription의 batchSize와 maxAwaitTime을 버린다
- **근거**: `changestream/MongoChangeStreamSubscription.java:17-18, 31-37` — 두 값 모두 검증되고 상한이 있다(`MAX_BATCH_SIZE = 1000`, maxAwaitTime > 0). vs `changestream/consumer/SpringReactiveChangeStreamSource.java:52-70` `optionsFor` — `fullDocumentLookup`, `fullDocumentBeforeChangeLookup`, `resumeAfter`/`startAfter`만 설정한다. `ChangeStreamOptions`에는 `maxAwaitTime`이 있는데 쓰지 않는다.
- **왜 문제인가**: subscription record의 Javadoc(`:10-13`)이 "an unbounded batch buys throughput with heap, and an unbounded await time makes a stalled stream indistinguishable from an idle one"이라고 이유를 대며 두 값을 강제한다. 그 두 값이 드라이버에 도달하지 않으므로 이유가 성립하지 않는다.
- **완화 요인**: H3대로 이 경로 자체가 배포된 composition root에서 활성화되지 않는다. 그래서 Medium.
- **수정 방향**: `options.maxAwaitTime(subscription.maxAwaitTime())`를 추가. batchSize는 Spring Data의 reactive change stream API가 노출하지 않으므로, 못 적용한다는 사실을 record Javadoc에 적거나 필드를 제거한다.
---
### Low
- **L1.** `MongoPersistenceConfigTest`(`src/test/.../MongoPersistenceConfigTest.java:20, 64`)가 폐기 네임스페이스 `spring.data.mongodb.database`를 쓴다. `MongoNamespaceContractTest`가 `/src/main/`만 훑기 때문에 잡히지 않는다. 바인딩되지 않아도 테스트는 통과하므로(database 이름은 URI 기본값으로 대체) 증거력이 약한 어서션이다.
- **L2.** `MongoReactiveWiringTest`(`:55-60`)와 `ReactiveBinderCarriesRuntimeContractTest`(`:1309-1317`)가 실제 `com.mongodb.reactivestreams.client.MongoClients.create(...)`를 호출한다. 주석은 "the driver is lazy and no operation runs here"라고 쓰지만, 드라이버는 `create` 시점에 cluster/monitor 스레드를 만든다. 테스트당 스레드 누수 가능. `hermetic`이라는 이름과 어긋난다.
- **L3.** `MongoModuleBoundaryTest.theDeclaredEdgesFormADag`(`:319-340`)의 `reaches`가 `visited` 집합을 형제 분기 간에 공유한다. 사이클을 놓칠 수 있는 형태다(현재는 사이클이 없으므로 결과에 영향 없음).
- **L4.** `build.gradle:238`의 주석이 "311 of this leaf's 313 production files declare a public top-level type"라고 쓰는데 실제로는 353개 중 346개다. 루트 `CLAUDE.md`가 "a number written in prose drifts the moment a leaf is added"라고 경고하는 바로 그 형태. (baseline 파일 자체는 346개로 정확히 일치한다 — 내가 이름 단위로 대조 확인.)
- **L5.** `MongoAtomicOperationsTemplate`·`MongoBulkExecutor`·`SpringMongoGeospatialOperations`·`PolicyAwareMongoAggregationExecutor`가 전부 `access.rawOperations()`를 쓰므로 `BoundScopedOperations`의 `maxTimeMS` 부착을 우회한다(`imperative/BoundScopedOperations.java:44-47`). 이 네 경로에는 서버 측 deadline이 없다. H2의 전제.
- **L6.** `MongoValidatorApplyPolicy.CERTIFIED_RELEASE_LINES`(`schema/validation/MongoValidatorApplyPolicy.java:33-34`)는 7.0/8.0을 pin하는데, `MongoVersionMatrix.standard()`(testFixtures)도 같은 목록을 따로 갖고 있다. 두 곳이 드리프트할 수 있다.
- **L7.** `mongoIntegrationTest` 소스셋 안의 5개 레인은 같은 클래스 디렉터리 위에서 태그로만 갈린다(`StrictTestLanePlugin:141-145`). 한 클래스에 태그를 두 개 달면 두 레인에서 실행되고, `MongoLaneDisjointnessVerifier`는 `test` ↔ `mongoStableContractTest` 쌍만 보므로 잡히지 않는다. 현재 실제 중복은 0이다(7개 클래스가 태그 1개씩: compatibility 1, failover 2, migration 1, replicaset 1, security-integration 2). Docker 레인은 `check`에 없으므로 비용·증거 왜곡이 hermetic 쌍보다 작다. 자세한 분석은 §7.6.
---
## 6. 바꾸지 말 것 (Keep)
### K1. opt-in을 세 겹으로 만든 것 — 필터 + 게이트된 AutoConfiguration 하나 + component scan 제외
- **무엇**: `MongoOptInAutoConfigurationImportFilter`(Boot 자체 auto-config 차단) / `MongoRootAutoConfiguration`(유일한 진입점, `@ConditionalOnProperty`) / `AUTO_CONFIGURED_PACKAGES` 정규식(component scan 제외).
- **왜 지금 이게 맞는가**: 이 중 하나라도 빠지면 뚫린다. 필터가 없으면 starter가 classpath에 있는 것만으로 `MongoClient`가 생기고, 진입점이 여러 개면 서로 "꺼져 있다"고 믿으면서 각자 조립한다(`MongoRootAutoConfiguration.java:12-18`이 그 이력을 기록하고 있다). scan 제외가 없으면 `dev.caskeleton.adapter`를 훑는 component scan이 `@Configuration` 클래스를 직접 발견한다. `MongoPersistenceConfigTest`가 이 조합을 실제 `@EnableAutoConfiguration` 컨텍스트에서 end-to-end로 증명한다.
- **언제 재검토**: Boot가 auto-configuration import 필터 SPI를 바꾸거나, composition root가 component scan 대신 명시적 import로 전환할 때.
### K2. `api` 패키지의 프레임워크 무의존 + 닫힌 edge 행렬
- **무엇**: `api/package-info.java`가 규칙을 선언하고, `MongoModuleBoundaryTest.ALLOWED_EDGES`(`:38-105`)가 **전체 패키지 DAG를 닫힌 집합으로** 강제한다. 디스크의 패키지 목록과 정확히 일치해야 하고, 관측된 edge가 선언에 없으면 실패한다.
- **왜 지금 이게 맞는가**: 이 leaf는 22,968줄 단일 jar다. Gradle 모듈 분리 없이 22개 패키지 경계를 지키는 방법은 이것뿐이다. 그리고 이 테스트는 **자신이 무력화되는 조건까지 방어한다** — `:107-114`의 주석이 `DO_NOT_INCLUDE_JARS`를 켰더니 import가 비어서 10개 규칙이 전부 "검사할 클래스 없음"으로 통과했던 사건을 기록하고, `allowEmptyShould`를 일부러 켜지 않았다고 쓴다.
- **언제 재검토**: leaf가 실제 Gradle 모듈로 쪼개질 때. 그때는 Gradle 의존 그래프가 이 행렬을 대체한다.
### K3. transaction body retry와 commit retry를 별개 루프로 분리한 것
- **무엇**: `MongoTransactionRetryCoordinator.execute`(`transaction/retry/MongoTransactionRetryCoordinator.java:73-105`)가 body 실패 시 **새 세션**으로 전체 재실행, `commitWithRetry`(`:134-152`)는 이미 계산된 값을 그대로 들고 commit만 반복. `MongoTransactionSession`이 `runBody`와 `commit`을 분리된 메서드로 노출(`transaction/MongoTransactionSession.java:16-25`).
- **왜 지금 이게 맞는가**: `TransientTransactionError`와 `UnknownTransactionCommitResult`는 정반대 대응을 요구하고, 이걸 틀리면 실패가 조용하다 — 주문 중복, 이중 환불. `TransactionTemplate`이나 `MongoTransactionManager`는 암묵 커밋이라 이 분리를 표현할 수 없고, `SpringMongoTransactionSessionFactory.java:30-34`가 그 이유를 명시한다. 예외 타입이 컨텍스트를 검증해서 모순된 조합을 생성자에서 거부하는 것(`api/error/MongoTransactionCommitUnknownException.java:36-53`, `MongoTransactionTransientException.java:35-50`)까지 포함해 일관적이다.
- **언제 재검토**: Spring Data가 body/commit 분리 API를 1급으로 제공할 때.
### K4. Docker 레인을 별도 provider 소스셋으로 옮기고 `check`에서 뺀 것 — 지금 진행 중인 변경
- **무엇**: `build.gradle:65-80`의 `mongoProviderTestkit`/`mongoIntegrationTest` 소스셋, `:98-113`의 Testcontainers 의존 격리, `:123-127`의 `test`에서 `mongodb-contract` 태그 제외, `:225-228`의 `check` 의존. 근거 스펙은 `docs/superpowers/specs/2026-09-18-test-architecture-phase2-provider-ownership.md`의 수용 기준 — *"moved provider tests live on a provider source set, not ordinary `test`"*, *"Docker/provider absence fails the required lane rather than becoming an approved JUnit skip"*.
- **왜 지금 이게 맞는가**: 결과가 측정 가능하다 — `grep -rn testcontainers src/test src/testFixtures` → **0건**. Docker 없는 노트북에서 `test`가 Testcontainers를 classpath에 올리지 않는다. `build.gradle:115-122`가 이유를 쓴다: "a `check` that fails on a laptop without Docker teaches people to skip `check`". 분리 방식도 옳다 — `testFixtures`에는 provider-neutral 계약(`MongoNetworkFaultController`/`MongoPrimaryController` 인터페이스, `MongoReplicaSetContract`/`MongoFailoverScenario` enum)만 남고, Docker 구현체는 `mongoProviderTestkit`에만 있다(§7.3-B). 그리고 `verifyMongoTestLaneDisjointness`가 JUnit XML로 실제 교집합을 검사한다 — 주석을 믿지 않는다.
- **언제 재검토**: CI가 Docker를 항상 제공하고 개발자 환경도 그렇게 보장될 때. 그때도 `check`에 넣기보다 별도 `integrationCheck`에 두는 게 낫다.
### K4b. `ca.strict-test-lane` 규약 — "돌지 않은 레인"을 초록으로 만들 수 없게 한 것
- **무엇**: `src/build-logic/.../strictlane/StrictTestLanePlugin.java`
- `:47-64` 레인이 선택됐는데 소스셋 파일이 0개면 GradleException (`"Gradle would skip it as NO-SOURCE and report success for a lane that ran nothing"`)
- `:157` `failOnNoDiscoveredTests = true`
- `:158` `getOutputs().upToDateWhen(ignored -> false)` — 레인은 절대 up-to-date가 되지 않는다
- `:174-203` 실행 0건이면 GradleException, 그리고 이유를 구분해서 보고한다 — 전부 skip됐는지 / 태그가 아무것도 매칭 못 했는지 / required test가 없어졌는지
- `:204-213` `rejectSkipped` 레인은 skip 하나만 있어도 실패
- `:214-227` `requiredTests`가 실제로 실행됐는지 사후 대조 (`"A lane that named a test it no longer runs proves less than it claims"`)
- `:237-243` 태그도 required도 없이 `test` 소스셋 위에서 도는 레인은 **선언 자체를 거부**한다
- **왜 지금 이게 맞는가**: 이 저장소의 릴리스 게이트 전체가 "레인 N이 M개를 실행했다"는 JUnit XML 위에 서 있다(`release-contracts.json`, `MongoReleaseContractLaneVerifier`, `verify-mongodb-platform.sh`). 그 증거의 전제는 "레인이 실제로 돌았다"이고, Gradle의 기본 동작(NO-SOURCE ⇒ SKIPPED ⇒ 빌드 성공)은 그 전제를 조용히 깬다. 이 규약이 그 경로를 전부 막는다. H6에서 본 대로, untracked 소스셋이 커밋에서 빠지는 최악의 시나리오에서도 **조용한 초록 대신 명시적 실패**가 난다.
- **언제 재검토**: 없음. 이건 "증거"라는 단어가 의미를 갖게 하는 최소 조건이다.
### K5. `allowed_dependencies: []` + 양방향 parity 테스트
- **무엇**: `modules.json`의 이 leaf 항목이 빈 배열이고, `MongoRegistryPermissionParityTest`(`src/app-bootstrap/src/test/.../registry/`)가 레지스트리 허용 집합과 build가 선언한 project 의존이 **정확히 같은지** 확인한다.
- **왜 지금 이게 맞는가**: `verifyCleanArchitectureDependencies`는 "실제 edge ⊆ 허용 edge"만 본다. 쓰이지 않는 허용은 영원히 통과한다 — `CLAUDE.md:33-39`가 정확히 이 비대칭을 지적하고 반대 방향 검사를 추가했다. "언젠가 쓸지도 모른다"로 열어 둔 권한이 쌓이는 것을 막는 유일한 방법이다.
- **언제 재검토**: 실제 도메인 Mongo adapter가 application port를 구현하게 될 때. 그때 build와 registry를 **같은 커밋에서** 함께 넓힌다.
### K6. Advanced capability guard를 ArchUnit으로 강제하고, 실패 fixture로 규칙을 증명한 것
- **무엇**: `@MongoAdvancedEntryPoint`/`@MongoAdvancedPolicy` 이분법 + `MongoAdvancedRules.everyEntryPointConsultsTheGuard()`(testFixtures)가 **public 생성자마다** guard 파라미터와 `require` 호출을 확인. `MongoAdvancedRulesTest:767-800`이 `Unclassified`/`Ungated`/`GuardIgnored` 세 개의 실패 fixture로 규칙이 실제로 떨어지는지 확인한다.
- **왜 지금 이게 맞는가**: `MongoAdvancedEntryPoint.java:20-23`이 이 규칙이 없던 시절을 기록한다 — 문서가 "모든 entry point가 flag를 확인한다"고 주장하는 동안 16개 중 4개만 확인했다. "규칙을 한 번도 떨어지는 걸 본 적 없는 규칙은 모양을 모르는 규칙"이라는 이유로 negative fixture를 쓴 것은 이 저장소 전체에서 가장 성숙한 테스트 습관이다.
- **언제 재검토**: advanced 패키지가 별도 Gradle 모듈로 분리되어 classpath 자체가 게이트가 될 때.
### K7. 모듈을 "빼는" 대신 "꺼진 채로 싣는" 선택
- **무엇**: `app-bootstrap/build.gradle:91`의 `implementation(project(':adapter:outbound:persistence-mongo'))`.
- **왜 지금 이게 맞는가**: `README.md:22-24`의 논거가 정확하다 — 부재는 배포 시점에 되돌릴 수 없고, 존재하지 않는 코드는 자기 condition이 무엇이라 말하든 bean을 0개 들고 있으므로 gating 결함을 전부 가린다. 실제로 이 leaf의 토글 결함(H7의 fail-open 목록 같은 것)은 모듈이 classpath에 있기 때문에 테스트로 잡을 수 있다.
- **언제 재검토**: jar 크기나 startup classpath 스캔이 측정 가능한 문제가 될 때. 그 전에는 측정 없이 바꾸지 않는다.
### K8. BSON 표현 manifest와 converter fingerprint
- **무엇**: `MongoTypeRepresentationManifest`(모든 축 필수, "미지정"을 표현 불가), `MongoCustomConversionsFactory.converters()`가 **명시적 순서 리스트**를 만들고(`mapping/MongoCustomConversionsFactory.java:39-53`), `fingerprint()`가 manifest + converter 클래스명을 합친다.
- **왜 지금 이게 맞는가**: 표현은 이미 저장된 모든 문서에 구워져 있다. 라이브러리 업그레이드가 표현을 옮기면 그건 아무도 쓰지 않은 마이그레이션이다. `MongoUuidRepresentation`에 `UNSPECIFIED`가 없는 것, `MongoEnumRepresentation.LEGACY_ORDINAL_READ_ONLY`가 writable()=false인 것, `BigDecimalToDecimal128Converter`가 34자리 초과를 드라이버 이전에 거부하는 것이 전부 같은 원칙의 일관된 적용이다.
- **언제 재검토**: 없음. 이건 데이터 계약이고 바꾸려면 마이그레이션이 필요하다.
### K9. keyset cursor의 HMAC + 타입 태그 + 길이 프레이밍
- **무엇**: `query/pagination/MongoKeysetCursorCodec`(HMAC-SHA256, 상수 시간 비교, 길이 상한을 decode 이전에 검사), `MongoCursorValueCodec`(BSON 타입별 인코딩, 인코딩 불가 타입은 `toString()` 격하 대신 거부, 길이 프레이밍).
- **왜 지금 이게 맞는가**: 커서는 클라이언트가 들고 다시 돌아오는 질의 술어다. 서명이 없으면 테넌트 스코프 목록에서 데이터 유출이다. 그리고 `Instant`가 `String`으로 돌아오면 MongoDB의 BSON 타입 순서 때문에 다음 페이지가 조용히 틀린다 — 오류가 아니라 다른 질문에 대한 답이 된다. `MongoKeysetCursorTypeTest:811-820`이 값 안에 프레이밍 문자가 들어간 케이스까지 확인한다.
- **언제 재검토**: 없음.
### K10. `MongoOperationRejectedException`의 예외 계층이 driver cause를 붙이지 않는 것
- **무엇**: `api/error/MongoPersistenceException.java:14-21` — cause를 받는 생성자가 **없다**. `MongoFailureContext`는 bounded·data-free 값만 담는다.
- **왜 지금 이게 맞는가**: driver 예외는 실패한 command를 들고 있고, command는 문서·필터·때로는 connection string의 credential을 들고 있다. 로깅 문장에서 빼는 것보다 **타입에서 빼는 것**이 강하다 — 뺄 것이 없으니까. `MongoDriverFailureView`(`failure/MongoDriverFailureView.java:563-564`)가 driver 타입이 아직 스코프에 있는 유일한 지점에서 label·code·boolean 2개로 좁히는 것도 같은 원칙이다.
- **언제 재검토**: 없음.
---
## 7. 커밋 안 된 리팩토링이 이 영역에 미친 영향
> **정정 반영.** `full.diff`는 `git diff HEAD`라 untracked 파일이 없다. 저장소 전체 실수치는 tracked +2,374 / −22,532, **untracked +21,270(175파일)**, 순증감 ≈ **+1,112**. 즉 −22,532는 대부분 이동이다. 이 절은 `untracked-files.txt`/`untracked-wc.txt`와 2026-09-18 스펙 2건을 읽고 다시 썼다.
### 7.1 이 리팩토링이 무엇인가 — capability composition ownership 이전
`docs/superpowers/specs/2026-09-18-*.md` 10건이 같은 주제를 공유한다. 내 영역에 해당하는 2건:
**(1) `2026-09-18-mongo-health-composition-ownership.md`** — Actuator health SPI 브리지를 `app-bootstrap`에서 Mongo leaf로 옮긴다. 스펙이 직접 쓴 이유: *"Keeping the final SPI bridge in app-bootstrap leaves the capability split across two owners."* 호환성 조항이 명시적이다 — 마스터 스위치 유지, health 의미 불변(topology mismatch ⇒ DOWN, degraded secondary ⇒ UP + detail), **bean 이름 `mongoPlatformHealthContributor` 유지**, `@ConditionalOnMissingBean` 유지, 새 public 타입 0개, `verifyMongoApiSurface` 불변.
**(2) `2026-09-18-test-architecture-phase2-provider-ownership.md`** — 소유권 규칙을 선언한다: *"an adapter leaf owns real-provider semantics for the provider it implements; app-bootstrap owns assembly, conditional wiring, authority selection."* 수용 기준에 **"moved provider tests live on a provider source set, not ordinary `test`"** 와 **"Docker/provider absence fails the required lane rather than becoming an approved JUnit skip"** 가 있다. 이 스펙의 첫 슬라이스는 JPA(`postgresqlIntegrationTest`)이고 Mongo는 follow-up 4번이지만, **Mongo leaf가 그 패턴의 참조 구현이다** — `build.gradle:51-53`이 "This leaf is the first migration off `ca.testkit-publisher`: one leaf, two lanes, no cross-module consumer — the proof that the path works before the published testkits follow"라고 쓴다.
repo 전체 untracked 175파일 중 신규 provider 소스셋이 확인된다: `persistence-mongo/src/mongoProviderTestkit`(8), `persistence-mongo/src/mongoIntegrationTest`(7), `persistence-jpa/src/postgresqlIntegrationTest`(7), `messaging-kafka/src/integrationTest`(11), `objectstorage/src/integrationTest`(6), `web/src/systemTest`(7), `graphql/src/systemTest`(4), `websocket/src/systemTest`(3). **"검증 삭제"가 아니라 저장소 전체의 provider 소스셋 이전이다.**
### 7.2 내 영역의 실제 수치
| | 파일 | 줄 |
|---|---|---|
| tracked 삭제 (Mongo leaf) | 15 | −2,445 |
| tracked 삭제 (app-bootstrap → leaf 이전분) | 3 | −113 |
| **untracked 추가 (Mongo leaf)** | **18** | **+2,530** |
| tracked 변경 | `build.gradle`, `MongoRootAutoConfiguration.java`, `CLAUDE.md`, `gradle.lockfile` | +67/−11 (lockfile 제외) |
**삭제 18 ↔ 추가 18. 1:1로 대응한다.**
### 7.3 세 갈래 판정
#### (A) 양쪽에 다 없는 것 — 진짜 손실: **0건**
`status.txt`의 Mongo 관련 삭제 18건을 `untracked-files.txt`와 대조한 결과 전부 대응 파일이 있다. 내용까지 바이트 단위로 대조했다:
| 삭제 위치 → 새 위치 | 결과 |
|---|---|
| `src/test/.../compat/MongoVersionCompatibilityLaneTest` → `src/mongoIntegrationTest/...` | **바이트 동일** (155줄) |
| `src/test/.../failure/MongoNetworkFaultLaneTest` → 동 | **바이트 동일** (206줄) |
| `src/test/.../migration/MongoMigrationLaneTest` → 동 | **바이트 동일** (357줄) |
| `src/test/.../rs/MongoSingleReplicaSetContainerTest` → 동 | **바이트 동일** (111줄) |
| `src/test/.../rs/MongoThreeNodeReplicaSetTest` → 동 | **바이트 동일** (37줄) |
| `src/test/.../security/MongoSecurityIntegrationLaneTest` → 동 | **바이트 동일** (173줄) |
| `src/test/.../security/MongoTlsLaneTest` → 동 | 5줄 차이 — `connectionString("localhost")` → `connectionString(server.host())`. **어서션 약화 없음**, Docker host가 localhost가 아닌 환경 대응 |
| `src/testFixtures/.../testkit/{atlas,failover,rs}/*` 8개 → `src/mongoProviderTestkit/...` | 7개 **바이트 동일**, `MongoTlsReplicaSetContainer`만 SAN을 `DNS:localhost,IP:127.0.0.1,+dockerHost`로 **넓힘**(기능 확장) |
| `app-bootstrap/.../autoconfigure/mongo/MongoPlatformHealthConfig.java` → `leaf/.../mongo/MongoPlatformHealthConfiguration.java` | 20줄. 아래 (B) 참조 |
| `app-bootstrap/.../autoconfigure/mongo/MongoPlatformHealthContributor.java` → `leaf/.../mongo/MongoPlatformHealthContributor.java` | 23줄. `public` → package-private으로 좁아짐 (스펙의 "새 public 타입 0개"와 일치) |
| `app-bootstrap/src/test/.../MongoPlatformHealthContributorTest.java` (29줄) → `leaf/src/test/.../MongoPlatformHealthContributorTest.java` (64줄) | **강화됨** — bean 이름 유지와 override back-off를 `ApplicationContextRunner`로 확인하는 케이스가 추가됨 |
**브리프 질문 6의 전제("그 레인이 깎였다면")는 사실과 반대다. `mongoIntegrationTest` 소스셋은 지금 새로 생기는 중이고, Docker 레인의 어서션은 하나도 줄지 않았다.**
#### (B) 양쪽에 다 있는 것 — 중복 조립 / 빈 충돌: **0건**
- `mongoPlatformHealthContributor` bean: 옛 `app-bootstrap/.../autoconfigure/mongo/` 디렉터리는 워킹트리에서 **사라졌다**(`ls` → 존재하지 않음). `app-bootstrap/src/main`에 남은 Mongo 참조는 `persistence.yml` 3줄, `CaSkeletonApplication:103`의 scan 제외 정규식, `CapabilityDependencyValidator`의 active-profile 검사뿐이다. 같은 이름의 bean을 만드는 곳은 leaf 한 곳뿐 → **충돌 없음.**
- 컨테이너 fixture: `testFixtures`에 남은 것은 **provider-neutral 계약만**이다 — `MongoNetworkFaultController`(interface), `MongoPrimaryController`(interface), `MongoReplicaSetContract`(enum), `MongoFailoverScenario`(enum), `MongoAtlasCapabilityContractSuite`(값 타입). Docker 구현체(`ToxiproxyMongoNetworkFaultController`, `MongoThreeNodeReplicaSet`, `MongoAtlasLocalContainer` 등)는 `mongoProviderTestkit`에만 있다. **FQCN 중복 0건**이고, 이 분리는 스펙의 "application-core owns reusable, provider-neutral port contracts; an adapter leaf owns real-provider semantics" 규칙을 소스셋 단위로 그대로 옮긴 것이다.
- 컴파일 계층도 맞다: `mongoProviderTestkit { compilesAgainst 'main', 'testFixtures' }` → 인터페이스를 본다. `mongoIntegrationTest { compilesAgainst 'main', 'testFixtures', 'mongoProviderTestkit' }` → 둘 다 본다. `test`는 `java-test-fixtures`가 붙여준 `testFixtures`만 본다 → **Testcontainers가 `test`의 classpath에 도달할 경로가 없다.** `grep -rn testcontainers src/test src/testFixtures` → **0건**으로 실증된다.
#### (C) untracked라 `git add` 없이 커밋하면 사라지는 것: **18파일 / 2,530줄 전부**
- `src/mongoIntegrationTest/` 통째로 (7파일, 1,204줄) — replica set / failover / migration / compatibility / security-integration / TLS 레인 전부
- `src/mongoProviderTestkit/` 통째로 (8파일, 1,219줄) — 컨테이너·Toxiproxy·인증·TLS fixture 전부
- `src/main/.../MongoPlatformHealthConfiguration.java`, `MongoPlatformHealthContributor.java` (43줄) — **production 코드**
- `src/test/.../MongoPlatformHealthContributorTest.java` (64줄)
**production 코드 2개가 untracked라는 것이 가장 중요하다.** 지금 `git add -u && git commit`하면 `app-bootstrap`의 health 브리지는 삭제되고 leaf의 대체물은 추가되지 않는다 → **Mongo health contributor가 저장소에서 통째로 사라진다.**
다만 이쪽은 빌드가 막아 준다: `MongoRootAutoConfiguration.java`의 tracked diff(+3/−1)가 `MongoPlatformHealthConfiguration.class`를 `@Import` 목록에 넣는 변경이므로, 그 클래스가 없으면 **컴파일이 깨진다.** "조용히 기능이 빠진 채 초록"이 되는 시나리오는 없다.
`src/mongoPerformanceTest/`는 untracked가 아니다(`untracked-files.txt`에 없다) — 리팩토링 이전부터 존재하던 소스셋이고, `compilesAgainst`에 `mongoProviderTestkit`가 추가되는 build.gradle 변경만 받았다. 따라서 **`mongoPerformanceTest`는 커밋에서 살아남지만, 컴파일에 필요한 `mongoProviderTestkit`가 없어서 같이 깨진다.**
테스트 소스셋 쪽은 다르게 실패한다. `StrictTestLanePlugin`(`src/build-logic/.../strictlane/StrictTestLanePlugin.java:47-64`)이 레인 선택 시 소스셋의 소스 파일이 0개면 GradleException을 던진다:
> `strict test lane 'mongoReplicaSetTest' ... has no sources in source set 'mongoIntegrationTest'. Gradle would skip it as NO-SOURCE and report success for a lane that ran nothing.`
그리고 `:157`의 `failOnNoDiscoveredTests = true`와 `:174-203`의 `doLast` 검사가 "0건 실행"을 GradleException으로 만든다. **조용히 초록이 되지 않는다.** 이건 H6의 심각도를 낮추는 사실이므로 H6 본문을 정정했다.
### 7.4 판정
**안전망 절단이 아니다. 저장소 전체 provider-ownership 이전의 일부이고, 이 leaf에서는 순개선이다.**
개선 항목 (근거 포함):
- `test`의 runtime classpath에서 Testcontainers/Toxiproxy 제거 (`build.gradle` diff `-testImplementation 'org.testcontainers:*'` 4줄 + `-testFixturesImplementation` 5줄). 실증: `src/test`·`src/testFixtures`에 testcontainers 참조 0건
- `test`의 `excludeTags`가 6개 → 1개. 나머지 5개는 **소스셋 분리**로 물리적으로 섞일 수 없게 됨 (`StrictTestLanePlugin:141-142`가 레인별 `testClassesDirs`/`classpath`를 소스셋 출력으로 고정)
- `testcontainers-junit-jupiter` 의존 제거 — 코드가 `@Testcontainers`/`@Container`를 쓰지 않으므로(확인) 안전
- health 소유권 이전 — 어댑터의 health를 composition root가 알 필요가 없다
- `MongoPlatformHealthContributor`가 `public` → package-private으로 좁아짐. `verifyMongoApiSurface` 기준선(346개)이 실제 public 타입 346개와 **정확히 일치**하는 것을 내가 이름 단위로 확인했으므로, 스펙의 "새 public 타입 0개" 주장은 사실이다
남은 부작용 1건 (정정된 서술):
- health configuration이 옮겨 오면서 `@ConditionalOnProperty(...enabled=true)`가 사라졌다(옛 `MongoPlatformHealthConfig`에는 있었다 — diff에서 확인, 새 `MongoPlatformHealthConfiguration.java:10-15`에는 없다). **이건 결함이 아니라 게이트 위치 이동이다** — 스펙이 "the Mongo master switch and conditional registration of the health contributor"를 leaf 소유로 선언했고, 실제 게이트는 `MongoRootAutoConfiguration`(`@AutoConfiguration` + `@ConditionalOnProperty`)의 `@Import` edge 하나로 단일화됐다. auto-configuration이 import한 `@Configuration`은 auto-configuration 단계에서 처리되므로 `@ConditionalOnBean`도 지원되는 위치다. 방어층이 3겹 → 2겹으로 줄었지만(중복 조건 제거), 남은 2겹(import 체인 + component scan 제외)이 각각 독립적으로 충분하다. → **발견으로 올리지 않는다.**
### 7.5 `check`만으로 알 수 있는 것과 알 수 없는 것 (브리프 질문 6)
- `check`가 **증명하는 것**: 패키지 경계 전체(닫힌 DAG, 실제 클래스 그래프 대조), 실패 분류와 retry scope(phase별), 트랜잭션 body/commit 분리, change stream 순서·중복·checkpoint 순서·invalidate 처리, keyset 커서 타입 왕복과 HMAC, BSON converter 집합과 순서와 fingerprint, atomic/bulk 정책 공유, admin 승인 상태 기계(digest 바인딩·단일 사용·만료), credential 지문 동일성, TTL/인덱스/validator manifest 규칙, advanced guard 강제(실패 fixture 포함), public API surface, **그리고 `test`와 `mongoStableContractTest`가 같은 테스트를 두 번 돌리지 않는다는 것**(`verifyMongoTestLaneDisjointness`).
- `check`가 **증명하지 못하는 것**: 레플리카셋에서 트랜잭션이 실제로 커밋되는지, change stream이 실제로 이벤트를 전달하는지, 응답 유실 시 driver 예외가 정말 `WRITE_RESULT_UNKNOWN`으로 분류되는지(그리고 그때 서버에는 쓰기가 실제로 적용되어 있는지), TLS 인증서 4종 시나리오, RBAC가 실제로 쓰기를 거부하는지, migration lock이 두 번째 runner를 배제하는지, fence가 superseded runner의 checkpoint를 거부하는지, 인덱스가 실제로 사용되는지(explain executionStats).
- **그 전부가 `mongoIntegrationTest`(지금 untracked)와 `mongoPerformanceTest`(tracked이지만 untracked인 `mongoProviderTestkit`에 컴파일 의존)에 있다.** 커밋에서 빠지면 위 목록이 저장소에서 사라지거나 컴파일이 깨진다. 다만 (C)에서 본 대로 조용히 사라지지 않고 GradleException/컴파일 오류로 깨진다.
- 실행 경로: `MONGODB_DOCKER=1 bash scripts/verify-mongodb-platform.sh`. 안 돌리면 스크립트가 exit 2 + "STABLE GATE: INCOMPLETE -- lanes above were not run, so their evidence categories are absent"를 보고한다. **미실행을 통과로 계산하지 않는다.**
### 7.6 lane disjointness가 무엇을 강제하고, 지금도 유효한가 (브리프 질문 3)
**무엇을 강제하는가.** `MongoLaneDisjointnessVerifier`(`src/build-tools/.../buildtools/mongo/MongoLaneDisjointnessVerifier.java:12-28`)는 `build/test-results/test`와 `build/test-results/mongoStableContractTest`의 JUnit XML을 파싱해 `classname#name` 선택자 집합을 만들고, **교집합이 비어 있지 않으면 빌드를 실패시킨다.** 최대 5개 예시를 메시지에 담는다.
**왜 그런 강제가 필요했는가.** `build.gradle:115-122`가 사고 경위를 기록한다: `mongodb-contract`가 `test`의 `excludeTags`에 없었고, `check`는 `test`와 `mongoStableContractTest`에 **둘 다** 의존한다. 결과적으로 clean 빌드마다 382개의 hermetic contract 테스트가 **두 번씩** 실행됐다. 막으려는 사고는 두 가지다 — (1) CI 시간 낭비, (2) 더 중요하게, 어느 레인이 실제로 그 테스트를 돌렸는지 불명확해져 `release-contracts.json`의 "이 클래스가 이 레인에서 N개 실행됐다"는 증거가 무의미해지는 것. 그리고 이 검사는 **주석이 아니라 JUnit XML을 읽는다** — `:120-122`가 "The two lanes are now disjoint by construction, and `MongoTestLaneDisjointnessTest` asserts it against the JUnit XML rather than trusting this comment"라고 쓴다.
**지금도 유효한가 — 유효하고, 리팩토링이 범위를 정확히 좁혔다.**
리팩토링 전: 6개 레인이 전부 `src/test` 소스셋을 공유하고 **태그로만** 갈렸다. 태그 하나를 빠뜨리거나 `excludeTags` 목록을 갱신하지 않으면 어느 조합이든 겹칠 수 있었다.
리팩토링 후(`StrictTestLanePlugin:141-142`가 레인별로 `setTestClassesDirs(sourceSet.getOutput().getClassesDirs())` + `setClasspath(sourceSet.getRuntimeClasspath())`를 한다):
| 레인 | 소스셋 | 선택 |
|---|---|---|
| `test` | `test` | `excludeTags 'mongodb-contract'` |
| `mongoStableContractTest` | `test` (`StrictTestLaneSpec:18` 기본값) | `includeTags 'mongodb-contract'` |
| `mongoReplicaSetTest` / `mongoFailoverTest` / `mongoMigrationTest` / `mongoCompatibilityTest` / `mongoSecurityIntegrationTest` | `mongoIntegrationTest` | 각자 다른 태그 |
| `mongoPerformanceTest` | `mongoPerformanceTest` | 태그 없음 (소스셋이 곧 선택) |
**소스셋을 공유하는 레인 쌍은 `test` ↔ `mongoStableContractTest` 하나뿐이다.** 다른 조합은 클래스 디렉터리가 달라 겹칠 수 없다. 즉 검증기가 **정확히 겹칠 수 있는 유일한 쌍**을 본다. 범위를 넓힐 필요가 없어졌다.
**남은 구멍 1건(Low).** `mongoIntegrationTest` 소스셋 안의 5개 레인은 같은 클래스 디렉터리 위에서 태그로만 갈린다. 한 클래스에 태그를 두 개 달면 두 레인에서 실행되고, 검증기는 그 쌍을 보지 않는다. 현재는 7개 클래스가 정확히 태그 1개씩이라(확인: compatibility 1, failover 2, migration 1, replicaset 1, security-integration 2) 실제 중복은 0이다. 검증기를 `mongoIntegrationTest` 레인 쌍까지 확장하거나, 각 레인에 전용 소스셋을 주면 닫힌다. 다만 Docker 레인은 `check`에 없으므로 중복 실행의 비용·증거 왜곡이 hermetic 쌍보다 작다 — 그래서 Low다.
---
## 8. 템플릿 사용자 관점
### Mongo를 안 쓰는 fork (대다수)
**할 일: 없다.** 기본값이 off이고, off가 구조적이다(§3). classpath에 sync driver jar가 남는 것이 유일한 비용이고, 이건 의도된 설계다.
주의할 점 하나: leaf를 통째로 제거하고 싶다면 건드려야 할 곳이 **4군데**다 — `modules.json`, `settings.gradle`, `app-bootstrap/build.gradle:91-99`, `CaSkeletonApplication.AUTO_CONFIGURED_PACKAGES:103`. 여기에 `config/persistence.yml:13-19`, `.env.example:297-299`, `.env.local.example:27-29`, `env-keys.yaml:4294-4319`, `compose-profile-contracts.json`, `docs/architecture/mongo-api-surface.txt`, `src/config/mongodb/release-contracts.json`, `build-tools/mongo/*`까지 더하면 12군데다. (이건 이 leaf만의 문제가 아니라 레지스트리 확장점 전반의 문제이므로 다른 담당자 영역과 겹친다.)
### Mongo를 쓰는 fork — 밟게 될 지뢰 순서대로
1. **`APP_PERSISTENCE_MONGO_ENABLED=true` + `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE=primary`로 켠다.** 기동 성공.
2. **연결이 안 된다.** README대로 `spring.data.mongodb.uri`를 세팅했지만 바인딩되지 않았기 때문(**C1**). 올바른 키는 `spring.mongodb.uri` / `SPRING_MONGODB_URI`이고, 그건 `compose-profile-contracts.json`에만 나온다.
3. **`active-profile`이 아무것도 안 한다는 것을 나중에 알게 된다**(**H1**). 오타를 내도 통과하므로 모를 수도 있다.
4. **profile을 제대로 선언하려고 `platform.profiles.primary.*`를 쓴다.** 17개 키가 전부 필요하고(**M8**), 예시가 없다. 바인딩에 성공하면 `MongoTopologyProbe` bean이 없어서 기동 실패(**H4**). probe를 만들면 `MongoSecurityProfile`·admin `MongoCredentialReference`·`MongoSchemaVersionRange` 세 개가 더 필요하다.
5. **그 전부를 만들어도 TLS는 안 켜진다**(**C2**). `MongoClientSettingsFactory`를 직접 wiring해야 한다는 것을 아무 문서도 말하지 않는다.
6. **문서 저장을 시작한다.** `MongoCollectionProfileRegistry`(비어 있음)와 `MongoAtomicPolicyRegistry`(비어 있음, 비면 **모든** atomic/bulk 연산 거부 — `MongoAtomicPolicyRegistry.java:40-47`)를 채워야 한다. 이건 의도된 fail-closed이고 옳다.
7. **reactive를 쓰려면** `app-bootstrap/build.gradle`의 exclude 2줄을 지워야 한다(**H3**). 안 지우면 `changestream/`·`reactive/` 패키지 34개 클래스가 조용히 죽어 있다.
8. **transaction executor·query builder·pagination codec·migration runner·admin gateway는 전부 직접 bean으로 등록해야 한다.** `MongoPlatformAutoConfiguration`은 15개 bean만 만든다.
### 손대야 하는 파일 (Mongo를 실제로 쓸 때)
| 파일 | 왜 |
|---|---|
| `src/app-bootstrap/src/main/resources/config/persistence.yml` | `spring.mongodb.uri` 추가, `platform.profiles.*` 선언 |
| `src/.env.example`, `src/.env.local.example` | `SPRING_MONGODB_URI` 추가 |
| `docs/registries/env-keys.yaml` | 위 키 등록 (`verifyEnvKeys`가 미등록 키를 어떻게 다루는지는 미확인) |
| fork가 새로 만드는 `@Configuration` 1개 | `MongoTopologyProbe`, `MongoSecurityProfile`, admin `MongoCredentialReference`, `MongoSchemaVersionRange`, `MongoCredentialResolver`, `MongoCollectionProfileRegistry`, `MongoAtomicPolicyRegistry`, `MongoManifestRegistry`, `MongoBudgetPolicyRegistry`, `MongoTypeMetadataRegistry`, `MongoKeysetCursorCodec`, transaction executor |
| `src/app-bootstrap/build.gradle:91-99` | reactive를 쓸 경우 exclude 제거 |
| leaf의 `document`/`repository`/`mapper` 패키지 | 새로 작성 |
### 종합 도입 판정
**이 leaf는 "MongoDB 어댑터"라기보다 "MongoDB 플랫폼 설계서를 실행 가능한 형태로 쓴 것"이다.** 코드 품질은 이 저장소에서 읽은 것 중 최상위다 — 모든 클래스가 자신이 막는 실패 모드를 이름으로 지목하고, 테스트가 그 실패를 재현하는 negative fixture를 들고 있으며, ArchUnit 경계가 닫혀 있다. Mongo 고유의 어려운 결정(§9의 표)을 회피하지 않고 전부 명시적으로 다뤘다.
**그러나 22,968줄 중 fork가 켜자마자 동작하는 부분은 거의 없다.** 켜는 순간 기동 실패 4연타와 침묵하는 오설정 2건을 만난다. 도입 판정은 **"Mongo를 주 저장소로 쓸 팀에는 매우 유용한 출발점, Mongo를 곁들여 쓸 팀에는 과도한 부담"**이다. 후자라면 이 leaf를 제거하고 Spring Data MongoDB를 직접 쓰는 편이 빠르다 — 이 leaf가 제공하는 가드레일(query allowlist, atomic policy, keyset cursor, migration fence)은 전부 fork가 별도로 wiring해야 하므로, "공짜로 얻는 것"이 아니다.
---
## 9. Mongo 고유 결정의 처리 현황 (브리프 질문 4)
| 결정 | 판정 | 근거 |
|---|---|---|
| **write concern / read concern / read preference 명시 여부** | **구현됨 (드라이버 기본값에 맡기지 않음)** | `api/consistency/MongoConsistencyRegistry.standard()`가 6개 profile을 read preference + read concern + write concern + "실제 보장 문장"으로 닫힌 집합으로 선언(`:34-116`). enum 상수 하나라도 서술이 빠지면 `requireComplete`가 startup 실패(`:139-147`). `MongoConsistencyBinder.derive`(`imperative/MongoConsistencyBinder.java:72-84`)가 profile당 `MongoTemplate` 1개를 파생 — **공유 템플릿을 mutate하지 않는다**(이게 핵심: `setWriteConcern`은 전역 bean을 바꾸므로 다른 스레드의 내구성을 바꾼다). read 설정은 query별 적용(`:99-107`). `STALE_READ_ALLOWED`는 기본값이 될 수 없다(`:120-123`) |
| **multi-document 트랜잭션 사용 여부** | **구현됨. 그리고 기본 off** | `SpringMongoTransactionExecutor`/`SpringMongoTransactionSessionFactory`가 실제 driver session을 쓴다. `TransactionOptions`에 read/write concern + `maxCommitTime`을 명시(`transaction/SpringMongoTransactionSessionFactory.java:97-108`). `MongoTransactionProfile`이 secondary read를 생성자에서 거부하고 서버 기본 lifetime 60초를 넘는 timeout을 거부(`transaction/MongoTransactionProfile.java:28-43`). `MongoPlatformSettings.transactions`는 기본 false(`autoconfigure/MongoPlatformSettings.java:31`, `MongoStartupValidationTest:60-62`) |
| **local 개발 환경이 레플리카셋을 주는가** | **준다** | `docker-compose.infra.yml:55-95` — `--replSet rs0`로 뜨는 `mongo:7` + `mongo-rs-init` 서비스가 `rs.initiate()`를 멱등 실행. profile `local-mongo`/`all-adapters`. 주석(`:51-53`)이 이유를 쓴다: standalone은 "reads로는 동작하는" 배포라 사고를 늦게 발견시킨다. 다만 이미지가 부동 태그 `mongo:7`이라 레인의 `mongo:8.0.16`과 다르다(**M9**) |
| **인덱스를 코드로 만드는가 / 마이그레이션으로 만드는가** | **마이그레이션 + admin plane. 런타임 자동 생성 경로가 아예 없다** | `MongoIndexApplyPolicy`(`schema/index/MongoIndexApplyPolicy.java:22-33`)가 환경별 4단계(APPLY / APPLY_WITH_DIFF / DIFF_WITH_APPROVED_APPLY / REPORT_ONLY)를 정의하고 production은 REPORT_ONLY. `MongoProfileProperties.validate()`가 `production && runtimeAutoCreateIndexes`를 거부(`:123-129`). `MongoCollectionManifest`(`schema/manifest/MongoCollectionManifest.java:11-14`)가 **`@Indexed` 애너테이션 유래를 명시적으로 거부**한다 — "Spring Data's `@Indexed` can create an index as a side effect of a class being on the classpath, which means production index state depends on deployment order". 인덱스 삭제는 6단계 retirement workflow를 거친다(`MongoIndexRetirementState`, 한 번에 한 단계만). `MongoIndexDiffEngine`이 encryption/search가 만든 인덱스를 drop 후보에서 제외(`MongoMetadataOwnership.droppableByApplicationDrift()`) — 이게 없으면 QE `__safeContent__` 인덱스를 orphan으로 오인해 지운다 |
| **스키마 변경(문서 구조 진화) 처리** | **구현됨. 버전 필드 있음** | `DocumentSchemaVersion`(정수), `MongoSchemaVersionRange`(읽을 수 있는 범위 ≠ 쓰는 버전 — dual reader → new writer → backfill → 구 reader 은퇴 절차를 표현), `MongoSchemaVersionPolicy.requireReadable`이 **도메인 역직렬화 이전에** 미래/은퇴 버전을 거부(`api/schema/MongoSchemaVersionPolicy.java:69-79`). `schemaVersion` 필드 부재는 legacy read를 opt-in한 컬렉션에서만 V0으로 해석(`:60-66`). JSON Schema validator는 `MongoSchemaManifest`가 소유하고 완화(MODERATE/WARN)에는 **만료일이 필수**(`schema/manifest/MongoSchemaManifest.java:29-36`) |
| **낙관적 락 (`@Version`)** | **자체 구현. Spring Data `@Version`은 부족하다고 명시** | `MongoRevision`(field `version`), `VersionedUpdateCommand`가 predicate와 `$inc 1`을 **분리 불가능하게** 조립한다(`imperative/revision/VersionedUpdateCommand.java:31-42`). `validated()`가 (a) filter가 revision을 제약하는지, (b) 그 값이 숫자인지, (c) update가 revision을 **정확히 한 번** 쓰는지, (d) 그게 `$inc 1`인지를 확인(`:57-89`). `$inc 1` 후 `$inc 5`나 `$inc` 후 `$set`이 통과하던 버그가 기록되어 있다. `VersionedMongoUpdater.applyWithRetry`는 **재계산 후 재시도**한다 — 이전 계산값 재전송은 정확히 낙관적 락이 막으려던 lost update다(`:64-104`). `MongoOptimisticConflictTranslator`가 "충돌"과 "문서 없음"을 분리해 종료하지 않는 재시도 루프를 막는다. Javadoc이 이유를 쓴다: "Spring Data's `@Version` covers `save()`. It does not cover a custom partial update" |
| **`_id` 생성 전략 / 도메인 식별자 매핑** | **구현됨** | `MongoIdRepresentation` enum(STRING / OBJECT_ID / BINARY_UUID)을 컬렉션별로 선언. 핵심은 `DomainDocumentId`(`api/mapping/DomainDocumentId.java:7-17`) — Spring Data가 **24자리 hex인 String `@Id`를 자동으로 `ObjectId`로 강제 변환**하는 heuristic을 회피하기 위한 wrapper 타입. 도메인 식별자(해시, 짧은 코드, dash 없는 UUIDv7)가 우연히 그 모양이면 컬렉션의 절반이 `ObjectId`, 절반이 `String`으로 저장되고 equality query가 안 맞는다. non-String 타입에 등록된 converter는 항상 heuristic을 이긴다. `DomainIdWriteConverter`/`DomainIdReadConverter` 쌍으로 왕복 보장 |
| **(추가) 문서 크기 / embedded array 성장** | **구현됨** | `MongoDocumentSizeBudget`이 MongoDB 하드 리밋 16MiB의 1/4(4MiB)를 플랫폼 상한으로 두고 그 위는 생성자에서 거부. `EmbeddedCollectionDescriptor.unbounded()`가 "모른다"를 **표현 가능하게 만든 뒤 validator가 거부**한다. `MongoDocumentModelValidator`가 위반을 전부 모아서 한 번에 던진다 |
| **(추가) NoSQL injection** | **구현됨** | `executeUserBson(String)`/`runCommand(Map)`이 없다. `PolicyAwareMongoQueryBuilder`는 등록된 필드 경로 + 등록된 연산자로만 표현 가능. `MongoRegexPolicy.prefixPattern`/`containsPattern`이 caller의 텍스트를 `Pattern.quote`로 이스케이프해 **호출자가 문법을 기여할 수 없게** 한다. `MongoRegexPolicy:686-696`이 nested quantifier 검사가 증명이 아니라 필터라는 것을 정직하게 서술한다 |
---
## 10. 미확인 / 가정
빌드를 돌리지 못했다(Gradle wrapper jar가 스냅샷에 없음). 아래는 코드 판독 기반 주장이고, 확인 명령을 함께 적는다.
| 항목 | 상태 | 확인 명령 |
|---|---|---|
| **M7** `check -x mongoStableContractTest`가 `verifyMongoTestLaneDisjointness`의 `@InputDirectory` 부재로 실패하는가 | **미검증, 개연성 높음** | `cd src && ./gradlew clean :adapter:outbound:persistence-mongo:check -x mongoStableContractTest --console=plain` |
| **C1** Boot 4.0.8에서 `spring.data.mongodb.uri`가 실제로 바인딩되지 않는가 | **간접 근거만** — `MongoPersistenceSettings.java:15`가 "deprecated at error level in its metadata"라고 서술. metadata JSON을 직접 열어 확인하지 않음 | `cd src && ./gradlew :adapter:outbound:persistence-mongo:dependencies --configuration runtimeClasspath` 후 `spring-boot-mongodb-*.jar`의 `META-INF/spring-configuration-metadata.json`에서 `spring.data.mongodb.uri`의 `deprecation.level` 확인 |
| **C1** URI 미설정 시 드라이버 기본값이 `mongodb://localhost:27017/test`인가 | **드라이버 문서 기반 가정** | `APP_PERSISTENCE_MONGO_ENABLED=true APP_PERSISTENCE_MONGO_ACTIVE_PROFILE=primary ./gradlew :app-bootstrap:bootRun` 후 로그의 cluster description |
| **H3** `app-bootstrap` 런타임 classpath에 `ReactiveMongoTemplate`이 실제로 없는가 | **build.gradle exclude 기반. 전이 의존으로 들어올 가능성 미확인** | `cd src && ./gradlew :app-bootstrap:dependencies --configuration runtimeClasspath \| grep -i reactivestreams` |
| **H7** Boot 4.0.8의 Mongo auto-configuration 클래스가 정확히 9개인가 | **필터의 목록을 신뢰. classpath와 대조하지 않음** | `unzip -l ~/.gradle/.../spring-boot-mongodb-*.jar \| grep AutoConfiguration` 와 `MongoOptInAutoConfigurationImportFilter:24-34` 대조 |
| **L2** reactive `MongoClients.create`가 테스트에서 스레드를 만드는가 | **드라이버 동작 기반 가정** | `./gradlew :adapter:outbound:persistence-mongo:mongoStableContractTest --console=plain` 후 스레드 덤프 |
| `verifyEnvKeys`가 미등록 `SPRING_*` 키를 어떻게 다루는가 | **미확인** (다른 담당 영역) | `cd src && ./gradlew :app-bootstrap:verifyEnvKeys --console=plain` |
| `gradle.lockfile` 293줄 변경의 내용 | **읽지 않음** (의존성 버전은 다른 담당 영역) | — |
| `docs/mongodb/*.md` 9개 문서의 코드 일치 여부 | **읽지 않음.** M10/M11의 문서 드리프트가 이 9개에도 있을 가능성이 높다 | `grep -rn "spring.data.mongodb\|not shipped\|testkit source set" docs/mongodb/` |
### 세운 가정
1. `@ComponentScan`의 `FilterType.REGEX`가 FQCN에 매칭된다고 가정했다(Spring 문서 기준). 이 가정이 틀리면 §3의 3번째 방어층이 무너지고 `MongoPlatformHealthConfiguration`이 component scan으로 발견될 수 있다 — 다만 `@ConditionalOnBean`이 여전히 막으므로 실질 결과는 같다.
2. `strictTestLanes` convention(`ca.strict-test-lane`)이 `failOnNoDiscoveredTests`를 켠다고 build.gradle 주석(`:129-131`)을 믿었다. convention 소스를 읽지 않았다.
3. H6의 "커밋하면 사라진다"는 `git commit -a` / `git add -u`를 쓸 경우다. `git add -A`나 IDE의 stage-all이면 문제없다.
---
## 부록 A — 발견 요약
| ID | 심각도 | 한 줄 | 근거 |
|---|---|---|---|
| C1 | Critical | Mongo를 켜면 URI 없이 드라이버 기본값으로 연결된다. README가 바인딩 안 되는 키를 가리킨다 | `README.md:36-38`, `MongoPersistenceSettings.java:14-19`, `persistence.yml`, `.env.example:297-299` |
| C2 | Critical | profile의 TLS·Stable API·타임아웃·풀 경계가 드라이버에 도달하지 않는다 (`MongoClientSettingsFactory` 호출자 0건) | `client/MongoClientSettingsFactory.java:38`, `MongoPersistenceConfig.java:26` |
| H1 | High | `APP_PERSISTENCE_MONGO_ACTIVE_PROFILE`이 필수 키인데 바인딩되는 곳이 없다 | `env-keys.yaml:4306-4319`, `MongoPersistenceSettings.java:22-37` |
| H2 | High | deadline 초과한 성공 연산이 `NOT_SENT`로 보고되어 중복 재시도를 유발한다 | `imperative/DefaultMongoImperativeExecutor.java:93-105` |
| H3 | High | reactive·changestream 34개 클래스가 배포 composition root에서 활성화 불가 | `app-bootstrap/build.gradle:98-99`, `MongoPlatformAutoConfiguration.java:187-189` |
| H4 | High | platform profile 선언 시 미고지 bean 4개 + 17키 필요, 기동 실패 4연타 | `MongoPlatformAutoConfiguration.java:330-367, 388-405`, `MongoProfileProperties.java:23-53` |
| H5 | High | health가 기동 시점 스냅샷을 라이브 관측값으로 보고. probe가 `final`이라 fork도 못 고친다 | `autoconfigure/MongoTopologyProbe.java:24-45`, `MongoPlatformHealthIndicator.java:69-72` |
| H6 | High | untracked 18파일 2,530줄(production health 2개 포함) — `git add` 없이 커밋하면 소실. 단 컴파일/strict-lane이 조용한 초록은 막는다 | `status.txt:54-68, 113-114, 155`, `untracked-files.txt`, `StrictTestLanePlugin.java:47-64` |
| H7 | High | auto-config 차단 목록이 하드코딩 fail-open이고 테스트가 0건 | `MongoOptInAutoConfigurationImportFilter.java:24-50` |
| M1 | Medium | README/CLAUDE.md가 폐기 네임스페이스를 가리키고 계약 테스트가 문서를 안 본다 | `MongoNamespaceContractTest.java:72-90` |
| M2 | Medium | 릴리스 증거 검증기 2벌, `check`가 도는 쪽이 failures·suite-name을 안 본다. 비-hermetic contract는 조용히 skip | `buildtools/mongo/MongoReleaseContractLaneVerifier.java:16-18`, `CLAUDE.md:88-90` |
| M3 | Medium | `findAndModify` 경로가 matched/modified를 항상 1/1로 보고 | `imperative/atomic/MongoAtomicOperationsTemplate.java:118` |
| M4 | Medium | reactive cursor의 결과 예산 추적기가 발동 불가 + 바이트 예산 미측정 | `reactive/cursor/MongoReactiveCursorPublisher.java:59-67` |
| M5 | Medium | `change-streams: true`가 조용히 무시된다. Javadoc은 "거부한다"고 씀 | `autoconfigure/MongoPlatformSettings.java:48-55` |
| M6 | Medium | `FlamingockLedgerAdapter`가 in-memory 비동시 맵 + fence 무시 | `migration/flamingock/FlamingockLedgerAdapter.java:28-30, 56-62` |
| M7 | Medium | `verify-mongodb-platform.sh:102`의 `check -x`가 clean 빌드에서 깨질 개연성 | `MongoVerificationPlugin.java:22-27` |
| M8 | Medium | `MongoProfileProperties` 17키 전부 필수, 예시 yml 부재 | `autoconfigure/MongoProfileProperties.java:23-53` |
| M9 | Medium | compose `mongo:7`(부동) vs 레인 `mongo:8.0.16` pin | `docker-compose.infra.yml:59`, `build.gradle:139-144` |
| M10 | Medium | CLAUDE.md가 "not shipped"라 한 change-stream source가 shipped·wired | `CLAUDE.md:121-124` vs `SpringReactiveChangeStreamSource.java:43-70` |
| M11 | Medium | CLAUDE.md가 없는 `testkit` 소스셋을 가리킴 | `CLAUDE.md:66, 87-94` vs `build.gradle:65-80` |
| M12 | Medium | change stream subscription의 batchSize/maxAwaitTime이 드라이버에 미도달 | `changestream/consumer/SpringReactiveChangeStreamSource.java:52-70` |
| L1–L7 | Low | §5 Low 절 참조. L7은 `mongoIntegrationTest` 내부 5개 레인의 태그 중복을 disjointness 검증기가 보지 않는다는 것 | §7.6 |
### 부록 A-2 — 커밋 안 된 리팩토링 판정 요약
| 갈래 | 건수 | 내용 |
|---|---|---|
| (A) 양쪽에 다 없음 = 진짜 손실 | **0** | 삭제 18 ↔ untracked 추가 18. 바이트 대조 16개 동일, 2개는 기능 확장 |
| (B) 양쪽에 다 있음 = 중복 조립 | **0** | `mongoPlatformHealthContributor` bean 생성자 1곳. testFixtures(계약) / mongoProviderTestkit(구현) FQCN 중복 0 |
| (C) untracked라 커밋에서 사라질 것 | **18파일 2,530줄** | production 2 + test 16. 컴파일 오류 + strict-lane GradleException이 조용한 실패를 막음 |
**종합: 이 leaf에서 리팩토링은 검증 표면 축소가 아니라 provider-ownership 이전이고, 순효과는 개선이다.** 남은 위험은 커밋 방식 하나뿐이다(H6).
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,742 @@
# [영역] 아웃바운드 HTTP 클라이언트 / 오브젝트 스토리지 리뷰
- 스냅샷: 2026-09-18T11:50Z / HEAD 60b6a319 + 커밋 안 된 변경 224파일
- 담당 leaf: `adapter-outbound-httpclient`, `adapter-outbound-objectstorage`
---
## 0. 최종 적용 기준
HTTP Client와 Object Storage는 독립 optional capability다. leaf가 자기 AutoConfiguration을 소유하고
bootstrap은 구현 타입을 직접 조립하지 않는다. 사용하지 않는 capability는 Build Composition에서 제외한다.
SecretSource seam, 실제 provider를 통과하는 storage test, 실제 socket path의 SSRF/TLS test를 우선한다.
## 0-A. 2026-09-21 중간 재검증
**상태: HTTP Client leaf ownership과 integration lane 정리는 진척됐지만 application composition은 아직 과도하다.**
HTTP Client leaf는 현재 자기 `AutoConfiguration.imports`를 갖는다. Object Storage도
`src/integrationTest`로 real-provider contract를 분리했고 `integration-main.yml`에서
`:adapter:outbound:objectstorage:integrationTest`가 실제 호출된다.
다만 `app-bootstrap`은 아직 HTTP Client를 `implementation`으로 기본 포함한다. 따라서 leaf ownership이
끝났다는 사실과 “파생 서비스가 capability를 선택적으로 artifact에서 제외할 수 있다”는 것은 별개다.
이번 중간 점검에서는 HTTP Client/Object Storage의 전체 security/fault provider lane을 다시 돌리지는
않았으므로 원 리뷰의 나머지 High/Medium finding을 일괄 완료 처리하지 않는다.
## 1. 커버리지
두 leaf의 **모든 소스 파일을 한 개도 빠짐없이 전문 독파**했다. main 423파일 + 테스트 8개 소스셋 166파일 = **589파일 / 48,562줄**.
| 소스셋 | 파일 | 줄 | 읽은 정도 |
|---|---:|---:|---|
| httpclient `main` | 276 | 16,470 | 전문 |
| httpclient `test` | 67 | 6,973 | 전문 |
| httpclient `testFixtures` | 34 | 2,662 | 전문 |
| httpclient `integrationTest` | 2 | 189 | 전문 |
| httpclient `httpClientPerformanceTest` | 7 | 495 | 전문 |
| httpclient `jmh` | 2 | 130 | 전문 |
| objectstorage `main` | 147 | 14,344 | 전문 |
| objectstorage `test` | 47 | 6,651 | 전문 |
| objectstorage `integrationTest` | 5 | 597 | 전문 |
| objectstorage `objectStorageAwsQualificationTest` | 2 | 51 | 전문 |
| **합계 (.java)** | **589** | **48,562** | |
측정: `find <root> -name '*.java' | wc -l`, `find <root> -name '*.java' -exec cat {} + | wc -l`.
**테스트 소스셋 8개를 통틀어 `.java`가 아닌 파일은 딱 1개다** — `objectstorage/src/integrationTest/resources/object-storage/minio-provider-evidence.json`(25줄). 이것도 전문 읽었고, 아래 §1.3(Q4)의 핵심 증거다.
비-java 중 **의도적으로 제외한 것과 이유**:
- `gradle.lockfile` 2개 — Gradle이 만드는 의존성 잠금 산출물이다. 사람이 쓴 코드가 아니고 내용이 `group:artifact:version=configuration` 나열이라 리뷰 판정이 나올 여지가 없다. 의존성 버전은 다른 에이전트 담당.
- `.jqwik-database` — jqwik이 실패 샘플을 기록하는 실행 산출물(바이너리)이다. 테스트를 돌리면 생기는 파일이지 소스가 아니다.
- 그 외 두 leaf의 `build.gradle`, `README.md`, `CLAUDE.md`, `AutoConfiguration.imports`는 전부 전문 읽었다.
추가로 읽은 것(영역 밖이지만 판정에 직결):
| 파일 | 줄 | 왜 |
|---|---:|---|
| `docs/superpowers/specs/2026-09-18-httpclient-capability-composition-ownership.md` | 39 | 이번 리팩토링의 정본 |
| `docs/superpowers/plans/2026-09-18-httpclient-capability-composition-ownership.md` | 15 | 체크리스트에 무엇이 없는지 |
| `docs/superpowers/specs/2026-09-18-secret-source-port-ownership.md` | 64 | 시크릿 해석 경계 |
| `docs/superpowers/plans/2026-09-18-secret-source-port-ownership.md` | 15 | 동일 |
| `adapter/outbound/support/.../CapabilityStartupValidationException.java` | 30 | 두 leaf가 공유하는 기동 실패 타입 |
| `adapter/outbound/support/.../EnvironmentSecretSource.java` | 22 | 시크릿 어댑터 |
| `adapter/outbound/support/.../StrictSettingsBinder.java` | 82 | httpclient 설정 바인딩의 실체 |
| `app-bootstrap/.../CaSkeletonApplication.java` | 105까지 | 컴포넌트 스캔/제외 규칙 (C1) |
| `app-bootstrap/src/systemTest/.../ShippedCompositionHarness.java`, `FiveAdapterOffInventoryTest.java`, `test/.../AdapterActivationInventory.java` | 발췌 | C1을 잡을 수 있었던 테스트의 범위 확인 |
| `docs/registries/{env-keys,mdc-keys,headers,secrets-classification,metrics,object-storage-readiness}.yaml` | 해당 절 | 레지스트리 대조 |
참고로 브리프 표의 httpclient test 줄 수(10,449)는 HEAD 기준이다. 스냅샷(=변경 적용 후)은 `test` 6,973 + `testFixtures` 2,662 + `integrationTest` 189 + perf 495 + jmh 130 = 10,449. 삭제가 아니라 소스셋 재배치다(§7).
---
### 1.1 테스트 인구조사 — 부품 검증인가, 조립 검증인가
166개를 **"스프링 컨텍스트를 실제로 만드는가"** 하나로 갈랐다.
| 분류 | 파일 | 비율 |
|---|---:|---:|
| 조립/배선 검증 — 스프링 컨텍스트를 만든다 | **9** | 5.4% |
| 조립 검증이지만 스프링 밖 — 조립기를 직접 호출한다 | **1** | 0.6% |
| 부품 검증 — 단위·계약·픽스처·성능·JMH | **156** | 94.0% |
측정 명령: `find <소스셋> -name '*.java' -exec grep -l -F -- '<패턴>' {} + | wc -l`
| 패턴 | 파일 수 | 어디 |
|---|---:|---|
| `ApplicationContextRunner` | **9** | httpclient `test` 4 + objectstorage `test` 5 |
| `withUserConfiguration` | **9** | 위와 같은 9개 |
| `AutoConfigurations.of` | **4** | httpclient `test/autoconfigure/` 전용 |
| `@SpringBootTest` | **0** | — |
| `CaSkeletonApplication` | **0** | — |
| `SpringApplicationBuilder` | **0** | — |
| `AnnotationConfigApplicationContext` | **0** | — |
| `AutoConfiguration.imports`(문자열) | **0** | — |
`CaSkeletonApplication`이 **0개**인 것은 web leaf에서 관찰된 것과 같다. 이 두 leaf의 테스트 166개 중 **배포되는 컴포지션 루트를 띄우는 것은 0개**다.
컨텍스트를 만드는 9개의 정체:
| 파일 | 러너에 심는 것 |
|---|---|
| `httpclient/test/.../autoconfigure/HttpClientPlatformActivationTest.java:39-42` | `AutoConfigurations.of(HttpClientPlatformAutoConfiguration.class)` + `SupportingBeans`(Clock, `List<DynamicCredentialBinding>`) |
| `httpclient/test/.../autoconfigure/HttpClientAutoConfigurationTest.java:32-36` | 동일 |
| `httpclient/test/.../autoconfigure/UnsafeStartupConfigurationTest.java:36-39` | 동일 |
| `httpclient/test/.../autoconfigure/ReactiveAuthenticationContractTest.java:28-32` | 동일 |
| `objectstorage/test/.../config/ObjectStorageCapabilityConfigTest.java:44-46` | `withUserConfiguration(ObjectStorageCapabilityConfig.class)` |
| `objectstorage/test/.../config/RoutingObjectStorageAdapterTest.java:50-52` | 동일 |
| `objectstorage/test/.../config/ObjectStorageScanMaintenanceConfigTest.java:17-20` | `ObjectStorageCapabilityConfig` + `ObjectStorageScanMaintenanceConfig` |
| `objectstorage/test/.../config/ObjectStorageLegacyMigrationConfigTest.java:20-23` | `ObjectStorageLegacyMigrationConfig` |
| `objectstorage/LegacyObjectStorageConfigTest.java:31-33` | `ObjectStorageConfig`(레거시) |
10번째 — 스프링 밖 조립: `objectstorage/test/.../s3/S3ProviderCompositionTest.java:67-72`가 `ObjectStorageCapabilityAssembler`를 손으로 만들어 조립/해제 계약을 검증한다. 이건 실제로 "조립"을 보는 몇 안 되는 테스트인데, 스프링을 거치지 않으므로 컴포지션 루트 문제는 원리적으로 못 본다.
도구 분포(참고):
| 도구 | 파일 |
|---|---:|
| `MockHttpServer`(MockWebServer 래퍼) | 34 |
| Mockito | 12 (전부 objectstorage) |
| ArchUnit | 5 (httpclient 4 + objectstorage 1) |
| Testcontainers | 5 (httpclient `integrationTest` 2 + objectstorage `integrationTest` 3) |
| Reactor `StepVerifier` | 7 |
| BlockHound | 2 |
| jqwik(property) | 1 |
| JMH | 2 |
**판정**: 이 영역의 테스트는 부품 검증으로는 밀도가 매우 높다(단위 1개당 계약 테스트가 붙어 있고, `ObjectStorageProviderContract` 같은 추상 계약도 있다). 그러나 **조립을 보는 눈이 5%뿐이고, 그 5%마저 전부 "부품을 손으로 심어 준 컨텍스트"다.** 배포되는 조립을 보는 테스트는 0개다. C1이 여기서 나온다.
---
### 1.2 Q2 — 166개 중 C1을 잡을 수 있었던 테스트가 있는가: **없다**
C1(9개 자식 `@Configuration`이 컴포넌트 스캔에 노출된 것)은 **본문으로 확정**한다.
- `CaSkeletonApplication.java:99-113`의 `AUTO_CONFIGURED_PACKAGES`에 `...adapter.outbound.httpclient...` 없음.
- `AutoConfiguration.imports`는 부모 1줄뿐(`httpclient/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:1`). `AutoConfigurationExcludeFilter`는 등재된 클래스만 제외하므로 자식 9개는 필터를 통과한다.
- 자식 9개 전부 클래스 레벨 조건 없는 `@Configuration(proxyBeanMethods = false)` (각 파일 첫 애노테이션 줄: `DynamicTargetAutoConfiguration:27`, `HttpClientAuthenticationAutoConfiguration:29`, `HttpClientManagementAutoConfiguration:13`, `HttpClientObservationAutoConfiguration:20`, `HttpClientProfileAutoConfiguration:37`, `HttpClientResilienceAutoConfiguration:20`, `HttpClientSecurityAutoConfiguration:16`, `HttpClientTransportAutoConfiguration:36`, `HttpServiceClientAutoConfiguration:28`). 부모만 `@AutoConfiguration` + `@ConditionalOnProperty`(`HttpClientPlatformAutoConfiguration:28-32`).
잡을 수 있는 테스트가 **하나도 없는 이유는 구조적이다**:
1. 이 결함은 **컴포넌트 스캔이 일어나야** 재현된다. 스캔을 일으키는 방법은 `@SpringBootTest`, `@ComponentScan`이 달린 설정 클래스, 또는 `SpringApplicationBuilder`뿐이다. **166개 중 이 셋을 쓰는 파일은 0개다.**
2. 유일하게 컨텍스트를 만드는 httpclient 쪽 4개는 전부 `new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(HttpClientPlatformAutoConfiguration.class))` 형태다. 이 러너는 **자기가 넘겨받은 클래스만** 등록하는 `AnnotationConfigApplicationContext`를 만든다. 스캔 대상 패키지가 없으므로 자식 9개를 "스캔으로 발견"하는 일이 원리적으로 일어날 수 없다.
3. `HttpClientPlatformActivationTest`의 off 케이스는 `doesNotHaveBean(...)` 11건을 단언하는데, 그 11건이 전부 통과한다 — **러너 안에서는 실제로 빈이 안 생기기 때문이다.** 테스트는 정확하고, 테스트가 측정하는 세계가 배포되는 세계와 다르다.
4. 자기 leaf의 `.imports` 파일을 검사하는 테스트도 없다(문자열 `AutoConfiguration.imports` 출현 0건). 저장소에 그 관행의 참고 구현이 이미 있다 — `PersistenceJpaAutoConfigurationTest.java:62-72`. httpclient는 그 관행 밖이다.
즉 **잡을 수 있었던 테스트가 있는데 안 돈 것이 아니라, 잡을 수 있는 종류의 테스트가 이 leaf에 존재하지 않는다.** 고쳐야 할 것은 C1 한 줄(제외 정규식)과, 조립을 보는 테스트가 0개라는 구조다.
---
### 1.3 Q4 — objectstorage `integrationTest` 5개 + AWS qualification 2개가 실제로 보증하는 것
먼저 결론: **이 7개 중 저장소 자신의 S3 제공자(`S3ManagedObjectProvider` / `S3ConditionalObjectControlStore` / `S3ManagedMultipartProvider`)를 실제 스토어에 대고 돌리는 것은 0개다.** M2가 확정되고 등급이 올라간다.
| 파일 | 줄 | 실제로 하는 일 |
|---|---:|---|
| `objectStorageAwsQualificationTest/.../qualification/AwsS3ManagedCommonSubsetQualificationTest.java` | 26 | **환경변수 존재만 단언한다.** `OBJECT_STORAGE_AWS_QUALIFICATION_ENABLED == "true"`, `..._BUCKET`/`..._REGION` non-blank, `..._EXPECTED_OWNER`가 `[0-9]{12}`. S3 클라이언트를 만들지 않고 요청도 보내지 않는다 |
| `objectStorageAwsQualificationTest/.../qualification/AwsS3DirectTransferQualificationTest.java` | 23 | 같은 형태 + `..._DIRECT_MUTATION_ENABLED == "true"` 한 줄 추가. 역시 요청 0건 |
| `integrationTest/.../MinioDirectTransferContractTest.java` | 25 | `minio-provider-evidence.json`을 읽고 `assertThat(evidence).contains("\"status\": \"UNSUPPORTED\"")`. MinIO를 띄우지 않는다 |
| `integrationTest/.../MinioDirectTransferFaultTest.java` | 32 | 같은 JSON에 대한 문자열 단언. MinIO를 띄우지 않는다 |
| `integrationTest/.../MinioManagedObjectContractTest.java` | 291 | 진짜 Testcontainers MinIO(다이제스트 고정). 다만 드라이브하는 대상이 **raw AWS SDK `S3AsyncClient.builder()`**이고 이 leaf의 제공자가 아니다 |
| `integrationTest/.../MinioManagedObjectFaultTest.java` | 147 | 진짜 MinIO + Toxiproxy. 역시 raw SDK |
| `integrationTest/.../S3ObjectStorageAdapterIT.java` | 102 | **deprecated 레거시** `S3ObjectStorageAdapter`(whole-`byte[]`)를 MinIO에 대고 검증 |
그리고 그 JSON이 기록하는 내용이 판정을 뒤집는다 — `integrationTest/resources/object-storage/minio-provider-evidence.json`:
- `"status": "UNSUPPORTED"`
- *"PutObject If-None-Match was accepted and overwrote an existing object"*
- *"stale PutObject If-Match returned HTTP 412 but create-if-absent control CAS is not safe"*
- *"CompleteMultipartUpload accepted If-None-Match despite a pre-existing target and overwrote it"*
즉 **MinIO는 이 leaf의 불변 생성(`ifNoneMatch("*")`)과 제어 레코드 CAS가 딛고 선 원시 연산을 지키지 않는다**는 것이 저장소 자신의 측정 결과로 체크인돼 있다. `MinioManagedObjectContractTest`의 테스트 이름이 그걸 그대로 말한다 — `checksumHeadRangeWorkButConditionalCreateIsIgnoredWhileStaleCasIsRejected`, `lowLevelMultipartWorksButCompletionCreateOnlyConditionIsIgnored`.
한편 그 사실은 바인딩 단에서 이미 강제되고 있다 — `S3ProviderBindingTest.java:56-64`가 MinIO 식별자로 direct 능력을 주장하면 `compile`이 거부함을 확인하고, `S3ProviderBindingTest.java:354-369`는 MinIO 프로필의 증거 상태를 `UNSUPPORTED`로 고정한다. **설계는 정직하다.** 문제는 그 정직함이 남기는 결론이다: MinIO는 지원되지 않고, AWS 실물은 한 번도 돌려본 적이 없으므로, **`s3/` 3,581줄 전체가 "실 스토어에 대고 한 번도 검증되지 않은 코드"다.** 단위 테스트 12개(`S3ManagedObjectProviderTest` 등)는 전부 Mockito `S3AsyncClient`를 상대로 요청 필드만 캡처해 단언한다.
추가 근거 하나 더: `ObjectStorageProviderContract`(247줄, 스킵 없는 제공자 계약)를 **상속하는 클래스는 `LocalDevObjectStorageProviderTest` 단 하나다**(전수 grep). `s3` 패키지의 테스트들은 이 계약의 `static operation()` / `producer()` 헬퍼만 빌려 쓴다. 즉 "모든 제공자가 통과해야 하는 계약"을 S3 제공자는 통과한 적이 없다.
마지막으로 `ObjectStorageReadinessRegistryTest.java:23`의 `KNOWN_PROVIDERS = Set.of("filesystem-local-dev")` — 레지스트리 검증기 자체가 `filesystem-local-dev` 외의 provider_type을 **unknown으로 거부**한다(`:82-91`). 즉 S3 카드는 추가하고 싶어도 이 테스트를 같이 고치지 않으면 추가할 수 없다. 레지스트리가 filesystem 100%인 것은 우연이 아니라 강제다.
---
## 2. 이 영역은 무엇을 하는가
### 2.1 httpclient — "RestClient 얇은 래퍼"가 아니라 자체 복원력 프레임워크다
패키지별 main 줄 수(측정값):
| 패키지 | 줄 | 파일 | 하는 일 |
|---|---:|---:|---|
| `restclient` | 2,018 | 19 | 블로킹 실행 경로(시도 실행기, 리다이렉트 코디네이터, 응답 매퍼, 바이트 상한, RestClient 런타임 팩토리) |
| `resilience` | 1,746 | 39 | **재시도 적격성 엔진, 증거 분류기, 데드라인, 백오프, 재시도 예산, 서킷/레이트/벌크헤드 파이프라인** |
| `autoconfigure` | 1,466 | 16 | 마스터 스위치, 설정 바인딩, 기동 검증, 전송 등록, 게이트웨이 발행, actuator |
| `webclient` | 1,458 | 17 | 리액티브 실행 경로 + SSE + 스트리밍 |
| `profile` | 1,271 | 29 | Named Client Profile 모델, 기동 검증기(30여 개 위반 코드), 런타임 세대/드레인 레지스트리 |
| `service` | 1,164 | 14 | `@HttpExchange` 타입드 클라이언트 스캐너/프록시 + 커널 어댑터 |
| `security` | 1,146 | 21 | 대상 정책, 헤더 정책, TLS 자재/정책, 리다이렉트 평가, URI 템플릿 확장 |
| `dynamic` | 989 | 11 | **H3 SSRF 방어**(정규화→허용목록→전수 DNS 검증→주소 핀) |
| `auth` | 926 | 18 | Basic/API-Key/Static-Bearer/OAuth2 자격증명, 단일비행 토큰 로더 |
| `api/*` | 1,264 | 49 | 프레임워크 무의존 공개 타입(오퍼레이션, 바디, 결과, 안정 예외 23종) |
| `apache`/`jdk`/`reactor`/`http3` | 1,717 | 21 | 전송 SPI 4종 구현 + 실패 분류기 4종 |
| `transport` | 365 | 10 | 전송 SPI + 능력 검증기 |
| `observation` | 381 | 6 | 메트릭 어휘, 태그 정책, 안전 로그 이벤트 |
| `migration`/`spring7` | 271 | 7 | RestTemplate 인벤토리/브리지, Spring 7 서비스 그룹 |
**판정: 자체 복원력 프레임워크다.** `RestClient`/`WebClient`는 소켓을 잡는 마지막 한 겹으로만 쓰이고(`BlockingClientRuntime.java:85`, `ReactiveClientRuntime.java:72` — 둘 다 package-private 접근자), 나머지는 전부 이 leaf가 직접 구현했다. Resilience4j는 `CircuitBreaker`/`RateLimiter` 원시 연산만 쓰고 재시도 판단은 전혀 위임하지 않는다(`build.gradle:48-49` 주석이 그렇게 선언하고, `resilience/DefaultRetryEligibilityEngine.java`가 그대로 구현).
16,470줄의 근거는 설득력이 있다. "메서드만 보고 재시도하지 않는다"(`RetryContext`에 HTTP 메서드가 아예 없다, `resilience/RetryContext.java:21-38`), "보냈는지 안 보냈는지를 증거로 판정한다"(`AttemptStage.provesNotSent`, `DefaultExecutionEvidenceClassifier`), "모호하면 세 번째 답을 준다"(`AmbiguousFailure`) — 이 세 가지를 제대로 하려면 실제로 이 정도 코드가 필요하다.
### 2.2 objectstorage — 두 개의 어댑터가 한 leaf 안에 공존
| 패키지 | 줄 | 하는 일 |
|---|---:|---|
| `s3` | 3,581 | AWS S3 / MinIO 비동기 제공자(관리형 단건, 멀티파트, 다이렉트, 조건부 컨트롤 스토어) |
| `control` | 2,470 | 제어 레코드 14종 + 정규 JSON 코덱(직접 구현한 canonical reader/writer) |
| `config` | 1,883 | 비활성 기본 바인딩 컴파일러, 능력 조립기, 라우팅 어댑터 3종 |
| `direct` | 1,670 | presigned 그랜트 상태기계·정책·리댁터 |
| `kernel` | 1,463 | 오퍼레이션 커널/상태기계/에포크/정책 스냅샷 |
| `filesystem` | 841 | `filesystem-local-dev` 제공자(경로 가드, 스트림 전송, 단일프로세스 CAS) |
| `maintenance` | 609 | 레거시 입양(Ed25519 승인 검증 포함) |
| `codec` | 539 | Crockford Base32, 데이터/컨트롤 키, 핸들, 지문 |
| `multipart` | 318 | 관리형 멀티파트 코디네이터 |
| `readiness` | 294 | 능력 카드 / 증거 / 준비도 레벨 |
| `provider` | 244 | 제공자 SPI |
| 최상위 3파일 | 432 | **deprecated 레거시** `ObjectStoragePort`(whole-`byte[]`) + filesystem/S3 어댑터 |
**대상**: S3와 MinIO **둘 다** — 단, 정확한 릴리스만 허용하는 닫힌 allowlist다(`s3/S3ProviderType.java:7-8`, `s3/S3ProviderVersion.java:5-7`). 로컬 파일시스템 제공자도 있고(`filesystem/`), 제공자 선택은 env가 아니라 **설정 트리**로 한다: `app.object-storage.providers.<id>.type` (`config/ObjectStorageProviderSettings.java:8`). 부트스트랩에 `objectstorage.yml`이 없으므로 env 한 줄로 켜지는 구조가 아니다.
`src/.data/objectstorage`, `src/sample-portfolio/.data/objectstorage`는 **레거시** filesystem 어댑터의 기본 경로다(`ObjectStorageSettings.java:21` `./.data/objectstorage`), 새 `filesystem-local-dev` 제공자의 루트가 아니다. 새 제공자는 `providers.<id>.root`를 명시하지 않으면 기동 실패한다(`filesystem/FilesystemLocalDevProviderContribution.java:23-27`).
---
## 3. 런타임 토글 판정 — 꺼지면 정말 꺼지는가
### 3.1 httpclient
> **전제**: 이 토글 메커니즘 전체가 **아직 커밋되지 않은 코드**다. `autoconfigure/` 16파일과 `AutoConfiguration.imports`는 untracked이고(§7), 구 위치(`app-bootstrap`)는 워킹트리에서 이미 삭제됐다. 즉 **HEAD를 그대로 체크아웃하면 지금의 토글 구조는 존재하지 않고, `git add` 없이 커밋하면 capability 자체가 사라진다.**
- **끄는 키**: `APP_HTTPCLIENT_ENABLED` → `app.httpclient.enabled` (`src/app-bootstrap/src/main/resources/config/httpclient.yml:7`, 기본 `false`).
- **설계상 의도**: `HttpClientPlatformAutoConfiguration`이 유일한 진입점이고 `@ConditionalOnProperty(havingValue="true")`로 잠긴다(`autoconfigure/HttpClientPlatformAutoConfiguration.java:28-32`). 나머지 9개 설정은 `@Import`로만 들어온다(`:33-43`). 설정 바인딩도 `@ConfigurationProperties`를 일부러 안 붙이고 게이트 안에서 수동 바인딩한다(`autoconfigure/HttpClientPlatformSettings.java:16-22`, `HttpClientPlatformAutoConfiguration.java:58-59`).
- **leaf 단위 검증**: `test/.../autoconfigure/HttpClientPlatformActivationTest.java`가 `ApplicationContextRunner`로 11종 빈 부재를 단언한다. 이 테스트는 진짜다.
- **그러나 실제 컴포지션 루트에서는 성립하지 않는다 → C1 참조.** `app-bootstrap`의 컴포넌트 스캔이 `dev.caskeleton.adapter`를 통째로 스캔하는데(`CaSkeletonApplication.java:42-48`), 제외 정규식(`:99` 이하 `AUTO_CONFIGURED_PACKAGES`)에 `dev.caskeleton.adapter.outbound.httpclient.autoconfigure`가 **없다**. 9개 자식 `@Configuration`이 스위치와 무관하게 스캔된다.
- **껐을 때 남는 클래스패스 비용(토글과 무관, 항상)**: `app-bootstrap/build.gradle:114`가 `implementation`이므로 Apache HC5, Reactor Netty, **Jetty client**, Resilience4j 5종, spring-webflux, spring-security-oauth2-client, Jackson 2+3이 항상 런타임 클래스패스에 있다(`httpclient/build.gradle:25-68`). 이건 CLAUDE.md:62-63이 "빌드 포함은 런타임 활성화와 별개"라고 명시적으로 인정한 선택이다(M5 참조).
- **필수 env**: 없음. `APP_HTTPCLIENT_ENABLED` 외에는 전부 배포별이고 `docs/httpclient/env-fields.yaml`에 별도 등록. Redis/외부 의존 없음.
### 3.2 objectstorage
- **끄는 키**: `app.object-storage.enabled` (기본 `false`, `config/ObjectStorageCapabilitySettings.java:9`). `app.object-storage.legacy.enabled`는 별개 스위치.
- **부트스트랩에 아예 없다.** `app-bootstrap/build.gradle`에 `:adapter:outbound:objectstorage` 의존이 없고, `modules.json`의 `app-bootstrap.allowed_dependencies`에도 없다. 유일한 소비자는 `sample-portfolio/build.gradle:54` `runtimeOnly`. → 프로덕션 컴포지션 루트 기준으로 "꺼짐"이 아니라 **부재**다(M1).
- **sample-portfolio에서 켜졌을 때**: `ObjectStorageCapabilityConfig`가 무조건부 `@Configuration`이라(`config/ObjectStorageCapabilityConfig.java:22-24`) `app.object-storage.enabled=false`여도 빈 4개가 항상 생긴다 — 제공자 기여 2개(`:28`, `:34`), 바인딩 컴파일러(`:39`), 조립기(`:54`). 다만 **이 4개는 자원을 만들지 않는다**: `describe()`는 부작용 금지가 인터페이스 계약이고(`config/ObjectStorageProviderContribution.java:9-11`), S3 클라이언트/프리사이너/스레드풀은 `create()`에서만 생기며 `create()`는 `enabled=true`일 때만 불린다(`ObjectStorageCapabilityConfig.java:60-65`). 테스트가 이걸 명시적으로 단언한다(`test/.../config/ObjectStorageCapabilityConfigTest.java:139-158` "disabledContributionIsNeverDescribedConstructedOrClosed", `:51` 디렉터리 미생성).
- **S3/MinIO 없이 기동되는가**: 된다. AWS SDK 클래스는 클래스패스에 있지만 로딩되는 시점이 `create()`뿐이다.
- **sample의 실제 설정**: `sample-portfolio/src/main/resources/application.yml:318-323` — canonical은 `enabled: false`, **레거시 filesystem은 `enabled: true`**. 즉 샘플이 실제로 도는 경로는 deprecated whole-`byte[]` 어댑터다.
**요약 판정**: objectstorage 토글은 "꺼지면 정말 꺼진다"가 코드·테스트 양쪽에서 성립한다. httpclient 토글은 **leaf 단위로는 성립하고 컴포지션 루트에서는 성립하지 않는다** — 그리고 그 차이를 만든 것이 이번 커밋 안 된 리팩토링이다.
---
## 4. 구조 판정
| 축 | 판정 | 근거 |
|---|---|---|
| 의존 방향 (modules.json 대조) | **OK** | httpclient 허용=`domain-core, application-core, shared-contract, adapter-outbound-support`. 실제 `build.gradle:20-22`는 `application-core`, `shared-contract`, `adapter:outbound:support` 3개(domain-core 미사용 — 허용 범위 내). objectstorage 허용=`application-core, shared-contract`, 실제 `build.gradle:37-38` 동일. 초과 없음 |
| 경계 누수 — DTO/entity/framework 타입 | **OK (httpclient)** / **매우 우수 (objectstorage)** | httpclient: `api` 패키지 49파일에 Spring/Apache/Netty/Jetty/Resilience4j import 0건, `PublicApiArchitectureTest`가 강제. objectstorage: `application-core/.../objectstorage/**` 88파일에 `java.io`·`InputStream`·`OutputStream`·`ByteBuffer` **0건** (전수 grep). IO는 `ObjectChunkSink/Source` 콜백으로 뒤집어 놓았다 |
| 비즈니스 규칙 위치 | **OK** | 두 leaf 모두 기술적 복원력/전송 정책만 보유. 도메인 보상·유스케이스 순서는 없음 |
| port 인터페이스가 HTTP 개념 노출 | **해당 없음(설계상)** | httpclient는 application port를 구현하지 않는다. 자기 API(`HttpServiceRegistry` 등)를 발행하고 application이 그걸 쓰는 형태. 즉 `HttpStatus`/헤더가 application에 보이는 것은 **application이 이 leaf를 import할 때뿐**이고, CLAUDE.md:54-55가 그걸 금지한다. 다만 강제 수단이 이 leaf 안에 없다(M6) |
| 테스트 전략 적합성 — 부품 | **매우 우수** | 166파일 17,748줄 전수 독파 기준. 단위당 계약 테스트가 붙어 있고, `ObjectStorageProviderContract`(스킵 없는 추상 계약)·`AllStableTransportsContractTest`(전송별 동일 계약)·BlockHound 자기검증·jqwik property·다이제스트 고정 Testcontainers까지 갖췄다 |
| 테스트 전략 적합성 — **조립** | **불충분** | 166개 중 스프링 컨텍스트를 만드는 것이 9개(5.4%), 배포되는 컴포지션 루트를 띄우는 것이 **0개**다. `@SpringBootTest`·`CaSkeletonApplication`·`SpringApplicationBuilder` 모두 0건. C1·H8·L9가 전부 이 공백에서 나온다 (§1.1, §1.2) |
| 테스트 레인 배선 | **구멍 있음** | 중복 실행 3건 + "MinIO 계약"으로 이름 붙었지만 JSON 문자열만 단언하는 레인 2건 + 환경변수만 단언하는 AWS qualification 2건 (M7, §1.3) |
**objectstorage → application-core 포트 경계에 대한 별도 판정**: 브리프가 물은 "스트림이 port를 통해 새는가"에 대한 답은 **안 샌다, 그리고 대안이 제대로 설계돼 있다**. `ObjectContentProducer.produce(context, sink)`가 어댑터 소유 싱크에 chunk를 밀어 넣고, `ObjectChunkSink.scoped`가 호출 범위 밖 사용을 무효화하며(`application-core/.../content/ObjectChunkSink.java:11-25`), 배열은 `write` 반환까지만 유효하다고 계약에 적혀 있다. S3 업로드는 이 싱크를 reactive-streams demand에 그대로 연결해 백프레셔까지 유지한다(`s3/S3AsyncRequestBodyBridge.java:137` `awaitDemand()`).
---
## 5. 발견
### Critical
#### C1. 커밋 안 된 리팩토링이 httpclient 마스터 스위치를 무력화했다 — 기본값(off)으로 `app-bootstrap` 기동이 깨질 가능성이 높다
- **현상**: 이번 변경이 9개 capability `@Configuration`을 `dev.caskeleton.bootstrap.autoconfigure.httpclient` → `dev.caskeleton.adapter.outbound.httpclient.autoconfigure`로 옮겼다. 앞쪽 패키지는 컴포넌트 스캔 제외 정규식에 걸려 있었고, 뒤쪽 패키지는 **걸리지 않는다.**
- **근거**:
- 스캔 대상: `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/CaSkeletonApplication.java:42-48` — `basePackages`에 `"dev.caskeleton.adapter"` 포함.
- 제외 규칙: 같은 파일 `:49-57` — `TypeExcludeFilter`, `AutoConfigurationExcludeFilter`, REGEX `AUTO_CONFIGURED_PACKAGES`.
- `AUTO_CONFIGURED_PACKAGES` 정본: 같은 파일 `:99-113`. 열거된 9개 패턴 중 `...adapter.outbound.httpclient...`는 **없다**. (`bootstrap.autoconfigure.*`는 있다 — 이동 전 위치가 바로 여기였다.)
- `AutoConfigurationExcludeFilter`는 `AutoConfiguration.imports`에 등재된 클래스만 제외한다. 등재된 것은 부모 1개뿐: `httpclient/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:1`.
- 자식 9개는 전부 평범한 `@Configuration(proxyBeanMethods = false)`다 — `HttpClientTransportAutoConfiguration.java:36`, `HttpClientProfileAutoConfiguration.java:147`, `HttpServiceClientAutoConfiguration.java:28`, `DynamicTargetAutoConfiguration.java:117`, `HttpClientResilienceAutoConfiguration.java:192`, `HttpClientSecurityAutoConfiguration.java:216`, `HttpClientAuthenticationAutoConfiguration.java:29`, `HttpClientObservationAutoConfiguration.java:109`, `HttpClientManagementAutoConfiguration.java:138`. `@Configuration`은 `@Component` 메타애노테이션이므로 스캐너가 각각 독립적으로 등록한다.
- `app-bootstrap/build.gradle:114`가 `implementation project(':adapter:outbound:httpclient')` — 클래스가 실제로 스캔 경로에 있다.
- **왜 문제인가**: 두 단계로 깨진다.
1. `app.httpclient.enabled=false`여도 `HttpClientSecurityAutoConfiguration`(TlsPolicyValidator, TlsMaterialProvider), `HttpClientObservationAutoConfiguration`(TagPolicy, BlockingExecutionSupport), `HttpClientAuthenticationAutoConfiguration`(secretResolver, CredentialProviderRegistry, ReactiveRequestCredentialProvider), `HttpClientTransportAutoConfiguration`(Apache/JDK/Reactor 전송 제공자 3개) 빈이 생성된다. "off면 빈이 하나도 없다"는 README·CLAUDE.md·클래스 javadoc의 핵심 주장이 그 자리에서 거짓이 된다.
2. 더 나쁘게, `HttpClientProfileAutoConfiguration.httpClientRuntimeRegistry(...)`가 파라미터로 `HttpClientPlatformSettings`를 요구한다(`HttpClientProfileAutoConfiguration.java:166-168`). 그 빈은 게이트가 열렸을 때만 만들어진다(`HttpClientPlatformAutoConfiguration.java:57-60`). 스캔으로 들어온 `HttpClientProfileAutoConfiguration`은 게이트와 무관하게 살아 있으므로 **`UnsatisfiedDependencyException`으로 컨텍스트 리프레시가 실패**한다. `HttpServiceClientAutoConfiguration`(모든 빈이 `ClientRuntimeRegistry` 요구)도 같다.
- 이것은 이동시킨 본인이 예측한 실패 모드와 **정확히 같은 문장**이다. `CaSkeletonApplication.java:93-97` javadoc: *"a component scan finds them regardless — so an all-off or partially configured deployment failed to start on an unsatisfied dependency rather than simply not installing the control."* 그리고 `HttpClientPlatformAutoConfiguration.java:20-23` javadoc: *"Wrapping them in a conditional parent would have changed nothing — the component scanner finds each child on its own — so the children had to leave the scan together with the switch."* 이번 이동은 자식들을 스캔 **안으로** 다시 넣었다.
- **왜 CI가 못 잡았나** (테스트 166개 전수 독파 후 확정 — §1.2): 이 결함을 잡을 수 있는 테스트가 두 leaf에 **0개**다. `@SpringBootTest` 0건, `CaSkeletonApplication` 언급 0건, `SpringApplicationBuilder` 0건, 자기 `.imports`를 검사하는 테스트 0건. leaf 쪽 새 테스트는 `ApplicationContextRunner`로 부모 auto-config만 등록하므로 컴포넌트 스캔을 절대 실행하지 않는다(`test/.../autoconfigure/HttpClientPlatformActivationTest.java:39-42`). 진짜 컴포지션 루트를 띄우는 유일한 테스트는 `app-bootstrap/src/systemTest/.../FiveAdapterOffInventoryTest`인데, 그 인벤토리는 JPA/MONGO/MESSAGING/NOTIFICATION/GRAPHQL **다섯 개만** 다루고(`test/.../activation/AdapterActivationInventory.java:31-37`) httpclient는 대상이 아니며, `systemTest` 레인은 `system()`이라 `check`/`ci`에 붙지 않는다(`app-bootstrap/build.gradle:54-60`, `check`에 `dependsOn` 없음).
- **작업 계획서가 이걸 보장한다고 주장한다**:
- `docs/superpowers/specs/2026-09-18-httpclient-capability-composition-ownership.md:21` — *"Runtime activation remains app.httpclient.enabled=true. When absent or false the root auto-configuration creates no client, pool, transport, thread, scheduler, or endpoint."*
- `docs/superpowers/plans/2026-09-18-httpclient-capability-composition-ownership.md:10` — `[x] Prove disabled capability creates no runtime beans`. 이 항목을 만족시킨 증거가 `ApplicationContextRunner` 테스트인데, 그 러너는 **구조적으로** 컴포넌트 스캔을 실행할 수 없다. 즉 체크된 항목이 증명하지 못하는 것을 증명했다고 기록돼 있다.
- 같은 plan `:13` — `[x] Run HTTP-client unit/security/integration regression, bootstrap test/architecture regression`. `test`와 `architectureTest`는 실제 컴포지션 루트를 띄우지 않는다. `systemTest`는 목록에 없다.
- 계획서 15개 항목 어디에도 **"컴포넌트 스캔 제외 목록을 갱신한다"**가 없다. 구 패키지가 우연히 제외 정규식 안에 있었다는 사실이 계획에 반영되지 않았다.
- 그리고 같은 spec `:39`가 전제를 확정한다 — *"It does not yet flip the app-bootstrap project dependency to runtimeOnly"*. 즉 이 슬라이스가 끝난 시점에도 leaf 클래스는 `app-bootstrap`의 스캔 경로에 그대로 있다.
- **수정 방향**: `AUTO_CONFIGURED_PACKAGES`에 `|dev\\.caskeleton\\.adapter\\.outbound\\.httpclient\\.autoconfigure\\..*` 추가. 그리고 이번 변경이 노출한 진짜 구멍 — "capability autoconfigure 패키지가 제외 목록에 있는가"를 강제하는 테스트가 없다 — 을 메워야 한다. `AutoConfiguration.imports`에 등재된 클래스가 `@Import`하는 모든 `@Configuration`의 패키지가 제외 정규식에 매칭되는지 검사하는 ArchUnit 규칙이면 충분하다.
- **반론과 재반박**: 반론 — "Spring이 `@Import`로 이미 등록될 클래스를 스캔으로 중복 등록하면 그냥 같은 빈 정의로 덮어써질 뿐 아닌가?" 아니다. 게이트가 닫혀 있으면 `@Import` 경로 자체가 실행되지 않으므로 "덮어쓸 원본"이 없고, 스캔이 등록한 정의만 남는다. 게이트가 열려 있으면 같은 클래스라 정의가 하나로 합쳐져 문제가 없다 — 즉 **켠 상태에서는 멀쩡하고 끈 상태에서만 깨진다**. 그래서 개발자가 `APP_HTTPCLIENT_ENABLED=true`로 로컬 확인을 하면 절대 안 보인다.
- **미검증 표시**: 빌드를 못 돌렸으므로 "기동 실패"는 추론이다. 판정 명령: `cd src && ./gradlew :app-bootstrap:systemTest --tests '*FiveAdapterOffInventoryTest*' --console=plain`. 이 테스트가 `@BeforeAll`의 `shippedComposition("local").run(allOffArguments())`에서 `UnsatisfiedDependencyException: httpClientRuntimeRegistry`로 죽으면 확정이다. 초록이면 내 추론이 틀렸고, 왜 스캐너가 그 패키지를 건너뛰었는지가 답이다. 최소한 §5-C1-1(빈이 생긴다)만큼은 정적으로 확실하다.
---
### High
#### H1. 리액티브 프로필에는 서킷 브레이커·레이트 리미터·벌크헤드가 없다 — README는 있다고 쓰여 있다
- **현상**: `api: WEB_CLIENT` 프로필은 물리 시도가 `AttemptResiliencePipeline`을 **통과하지 않는다**.
- **근거**:
- README 주장: `httpclient/README.md:44` — "Every physical attempt passes Circuit Breaker → Rate Limiter → Bulkhead, and holds no permit while a backoff waits."
- 블로킹: `restclient/BlockingClientRuntime.java:35` 필드 보유, `restclient/BlockingAttemptExecutor.java:62-63`에서 `runtime.resiliencePipeline().execute(...)`로 감싼다.
- 리액티브: `webclient/ReactiveClientRuntime.java:28-37` 필드 목록에 `AttemptResiliencePipeline`이 **없다**. `webclient/ReactiveAttemptExecutor.java:52`는 `Mono.defer(...)`로 바로 요청을 만든다.
- 전수 grep: `resiliencePipeline` 심볼이 main에서 `resilience/AttemptResiliencePipeline.java`, `restclient/BlockingClientRuntime.java`, `restclient/RestClientRuntimeFactory.java`, `restclient/BlockingAttemptExecutor.java` 4파일에만 등장.
- 즉 리액티브에 남는 것은 `LogicalAdmissionLimiter`(논리 호출 수 상한)와 `RetryBudget`뿐이다.
- **왜 문제인가**: 실패 중인 업스트림을 `WEB_CLIENT` 프로필로 호출하면 브레이커가 절대 열리지 않는다. 구체적 시나리오: 리액티브 프로필로 502를 계속 받는 업스트림 → 매 호출이 소켓까지 나간다 → 블로킹 프로필의 동일 업스트림은 브레이커가 막아주는데 리액티브는 안 막아준다. 같은 플랫폼 안에서 API 선택이 안전 속성을 바꾼다.
- **수정 방향**: 단기 — README:44와 CLAUDE.md의 주장을 "블로킹 스택에 한한다"로 정정하고, `ClientProfileValidator`에 "WEB_CLIENT 프로필은 resilience 미지원"을 명시적 위반 코드로 추가하거나 최소한 actuator 리포트에 표시. 중기 — `ReactiveResiliencePipeline`(Mono 기반, permit을 `usingWhen`으로 획득/반납)을 만들어 대칭을 회복.
- **반론과 재반박**: 반론 — "리액티브는 이벤트 루프라 세마포어 벌크헤드가 의미가 다르다." 맞는 지적이고 `ReactiveClientRuntime.java:22-25` javadoc도 그걸 근거로 스레드풀 벌크헤드를 거부한다. 하지만 **서킷 브레이커와 레이트 리미터는 스레드 모델과 무관하다.** `AttemptCircuitBreaker.tryAcquirePermission()`은 논블로킹이고, 이 둘이 빠진 것은 설계 판단이 아니라 미구현이다 — 그 증거로 `ReactiveClientRuntime`은 벌크헤드 부재만 javadoc으로 정당화하고 브레이커/리미터 부재는 언급조차 없다.
#### H2. 리액티브 경로는 `timeout.total-call`을 강제하지 않는다
- **현상**: `Deadline`을 계산해서 `RetryContext`에 넣지만, 그 데드라인으로 호출을 **끊는 코드가 없다**.
- **근거**:
- 블로킹: `restclient/DefaultGenericHttpGateway.java:89`(호출 시작 전)와 `:191-197`(매 시도 전, `requireTimeRemaining` + `requireAttemptBudget`).
- 리액티브: `webclient/DefaultReactiveHttpGateway.java:118-125`에서 `deadline`을 계산하고, `ReactiveGatewayCall.attempt(int)`(`:246-262`)에는 어떤 가드도 없다. `webclient/` 전체에서 `DeadlineGuard` import 0건(전수 grep). `.timeout(` 호출은 SSE 게이트웨이 2곳(`DefaultReactiveSseGateway.java:81`, `:142`)뿐.
- 남는 방어는 Netty 레벨의 `responseTimeout(responseHeader)` + write/read idle 핸들러뿐(`reactor/ReactorHttpClientFactory.java:43`, `:53-63`).
- **왜 문제인가**: 업스트림이 `readIdle`(기본 3s)보다 자주 바이트를 조금씩 흘려보내면 리액티브 호출은 `totalCall`(기본 4s)을 넘겨 무한정 지속된다. 블로킹 프로필은 같은 상황에서 `HttpDeadlineExceededException`으로 끊긴다. 호출자가 `operation.deadline()`으로 부모 예산을 넘겨줘도 리액티브에서는 무시된다.
- **수정 방향**: `runCall`이 반환하는 Mono에 `.timeout(deadline.remaining(clock), Mono.error(new HttpDeadlineExceededException(...)))`를 걸고, `attempt(n)` 진입 시 `DeadlineGuard.requireTimeRemaining`을 호출.
- **반론과 재반박**: 반론 — "Reactor에서 `.timeout()`은 취소를 유발해 연결 정리가 미묘해진다." 사실이지만 이 leaf는 이미 취소 경로를 갖추고 있다(`ReactiveStreamingGateway`의 `doOnDiscard`, `ReactorFailureClassifier`의 `CancellationException` 처리, `ReactiveStreamingLifecycleTest.cancellationReleasesTheConnectionForTheNextCall`). 정리 비용이 아니라 미구현이다.
#### H3. `http.client.requests`를 포함한 시도 단위 메트릭 5종을 아무도 발행하지 않는다 — 그리고 그걸 막으려고 쓴 테스트가 통과한다
- **현상**: `AttemptObservation`이 실행 경로에서 **한 번도 생성되지 않는다.**
- **근거**:
- `observation/AttemptObservation.java:38` `public static AttemptObservation start(...)` — main 전수 grep 결과 호출자 0건. `AttemptObservation` 심볼이 main에 등장하는 곳은 자기 자신과 `LogicalCallObservation`뿐이고, 후자는 `static toTags()` 헬퍼만 쓴다(`LogicalCallObservation.java:61, 67, 73, 84`).
- 따라서 발행되지 않는 이름: `ATTEMPT_TIMER`=`http.client.requests`, `ATTEMPT_COUNTER`, `TIMEOUT`, `REQUEST_BYTES`, `RESPONSE_BYTES` (`observation/HttpClientObservationNames.java:12, 14, 18, 19, 20`).
- `http.client.requests`는 "기존 대시보드가 계속 동작하도록 Spring 표준 이름을 유지했다"고 설계상 특별히 언급된 이름이다(`HttpClientObservationNames.java:6-8`, README·support-matrix).
- **방어 테스트가 무력하다**: `test/.../observation/DeclaredMetricsAreEmittedTest.java:70`은 소스 텍스트에서 `HttpClientObservationNames.<NAME>` 문자열 출현 횟수를 센다. 이 5개는 `AttemptObservation.java` 안에 문자열로 존재하므로 카운트 ≥ 1 → 통과. 테스트가 잡으려던 실패("이름은 있는데 아무도 안 낸다")가 **한 단계 위에서 그대로 재현**된다.
- `TransportLifecycleListener`도 기본 빈이 `noop()`이므로(`autoconfigure/HttpClientTransportAutoConfiguration.java:39-43`) 풀/스테이지 콜백은 애초에 아무 데도 안 간다.
- **왜 문제인가**: 운영자가 `http.client.requests{clientName=...}`로 대시보드를 만들면 영원히 0이다. `DefaultGenericHttpGatewayTest.recordsSeparateLogicalAndAttemptMetrics`라는 이름의 테스트가 있지만 실제로는 `LOGICAL_CALL_TIMER`만 단언한다(`test/.../restclient/DefaultGenericHttpGatewayTest.java:148-154`) — 이름이 하지 않는 일을 주장한다.
- **수정 방향**: `BlockingAttemptExecutor.execute` / `ReactiveAttemptExecutor.execute`에서 `AttemptObservation.start(...)` → `stop(...)`으로 감싼다. 그리고 `DeclaredMetricsAreEmittedTest`를 "텍스트 참조"가 아니라 "실제 호출 후 `SimpleMeterRegistry`에 이름이 존재하는가"로 바꾼다 — 통합 단언 하나면 된다.
- **반론과 재반박**: 반론 — "시도 단위 메트릭은 카디널리티가 높아 일부러 껐을 수 있다." 그렇다면 `NOT_YET_EMITTED` 목록(`:40-53`)에 이유와 함께 올렸어야 한다. 그 목록은 정확히 그 용도로 만들어졌고 8개가 이미 올라가 있다. 5개가 거기 없다는 것은 의도가 아니라 누락이라는 뜻이다.
#### H4. 트레이스·상관관계 전파가 전혀 구현돼 있지 않고, 헤더 정책이 caller의 우회까지 막는다
- **현상**: 아웃바운드 요청에 `traceparent`, `tracestate`, `X-Request-Id`, `X-Correlation-Id` 중 무엇도 실리지 않는다. 그리고 호출자가 직접 넣는 것도 거부된다.
- **근거**:
- `security/HeaderPolicy.java:31-33` — `traceparent`, `tracestate`, `baggage`가 `PLATFORM_OWNED`. `:70-72`에서 caller가 넣으면 `HttpTargetRejectedException`.
- 그런데 플랫폼이 이 헤더를 **쓰는 코드가 없다**: main 전수 grep에서 `traceparent`/`tracestate`/`baggage`는 위 3줄이 유일한 출현. `MDC`, `ObservationRegistry`, `Propagator`, micrometer-tracing 의존 모두 0건.
- `HttpFailureMetadata.traceId`는 항상 `Optional.empty()`로만 생성된다(`api/error/HttpFailureMetadata.java:55, 76` — `startup()`/`validation()` 둘 다, 그리고 `with*` 메서드가 그대로 나른다).
- `SafeHttpLogEvent`(`observation/SafeHttpLogEvent.java`)는 main에서 생성 지점 0건. 그리고 **main 전체에 slf4j `Logger` 선언이 0건** — `build.gradle:68`에 `org.slf4j:slf4j-api`를 선언해 놓고 이 플랫폼은 로그를 한 줄도 남기지 않는다.
- 레지스트리 대조: `docs/registries/mdc-keys.yaml`의 `trace_id`는 `http_header_mapping: traceparent`, `propagation: [http, async, message]`, `request_id`는 `X-Request-Id`로 선언돼 있다. `docs/registries/headers.yaml:139-149` `traceparent` `direction: both`, `generated_if_missing: true`, `required_test: contract-verification:trace-propagation`.
- `DynamicTargetSettings.tracePropagation`(`autoconfigure/HttpClientPlatformSettings.java:147`)은 바인딩되고 `DynamicTargetPolicy.tracePropagation`(`dynamic/DynamicTargetPolicy.java:20`)에 저장되지만 **읽는 코드가 없다.**
- **왜 문제인가**: 이 스켈레톤은 MDC/트레이스 계약을 레지스트리로 SSOT화해 놓았는데, 유일한 아웃바운드 HTTP 경로가 그 계약을 지키지 않는다. fork 사용자는 인바운드 요청에 붙은 `trace_id`가 아웃바운드 호출로 이어질 거라 가정할 것이고, 실제로는 스팬이 끊긴다. 게다가 `HeaderPolicy`가 caller 우회를 막으므로 **애플리케이션 코드로 임시 조치할 수도 없다.**
- **수정 방향**: 이 leaf의 정책과 일관되게 처리하면 된다 — `ClientProfileValidator.validateUnsupportedSettings`(`profile/ClientProfileValidator.java:103-116`)가 이미 "바인딩되지만 아무 전송에도 닿지 않는 설정은 거부한다"는 규칙을 `timeout.dns`, `proxy.credential-provider`, `proxy.import-ambient-no-proxy` 3개에 적용하고 있다. `dynamic-targets[*].trace-propagation=true`는 **같은 종류인데 거부되지 않는다.** 최소 조치는 그것을 같은 목록에 넣는 것이고, 제대로 된 조치는 `PreparedOperation` 조립 시 현재 Observation/MDC에서 `traceparent`/`X-Request-Id`를 주입하는 것이다.
- **반론과 재반박**: 반론 — "트레이싱은 `app-bootstrap`의 `bootstrap.autoconfigure.tracing`이 소유하고, 여기서 하면 중복이다." 그렇다면 `HeaderPolicy`가 그 헤더들을 `PLATFORM_OWNED`로 선언해 caller를 막을 이유가 없다. 지금 상태는 "내가 소유한다"고 선언하고 소유물을 방치한 것이라, 어느 계층이 하든 지금은 아무도 안 하고 있다.
#### H5. Dynamic Target 정책은 같은 이름의 client 프로필을 암묵적으로 요구하고, 없으면 첫 호출에서 `NoSuchElementException`이 난다
- **현상**: `app.httpclient.dynamic-targets[0].name=webhooks`만 선언하고 `clients[*].name=webhooks`(mode=DYNAMIC)를 선언하지 않으면 기동은 성공하고 첫 호출에서 터진다.
- **근거**:
- `dynamic/DefaultDynamicTargetGateway.java:82` — `runtimes.acquire(new ClientProfileName(policyName.value()))`. 정책 이름을 그대로 프로필 이름으로 쓴다.
- `profile/ClientRuntimeRegistry.java:161-167` — 없으면 `NoSuchElementException("unregistered http client profile: ...")`. 이건 안정 예외 계층(`HttpClientException`)이 아니라 raw JDK 예외다.
- 기동 검증(`autoconfigure/HttpClientStartupValidator.java:59-93`)은 profiles만 돈다. `DynamicTargetAutoConfiguration`(`:30-50`, `:65-81`)에도 교차 검사 없음.
- `mode: DYNAMIC` + `api: WEB_CLIENT` 조합도 같은 모양으로 깨진다 — `requireBlockingRuntime`이 호출 시점에 `HttpTargetRejectedException`을 던진다(`DefaultDynamicTargetGateway.java:220-227`). `ClientProfileValidator`는 DYNAMIC+JDK/JETTY는 거부하지만(`profile/ClientProfileValidator.java:173-177`) DYNAMIC+WEB_CLIENT는 통과시킨다.
- **왜 문제인가**: 이 플랫폼의 설계 원칙은 "설정 실수는 기동에서 잡는다"인데(30개 넘는 위반 코드가 그 증거), H3 표면에서만 그 원칙이 깨진다. SSRF 검증이 필요한 경로라 프로덕션 첫 요청에서 터지면 영향이 크다.
- **수정 방향**: `HttpClientStartupValidator.validate`에 `dynamicTargets`를 넘기고, 각 정책 이름에 대해 (a) 동명 프로필 존재, (b) `mode == DYNAMIC`, (c) `api == REST_CLIENT`를 검사해 `DYNAMIC_TARGET_PROFILE_MISSING` 같은 안정 코드로 실패시킨다.
- **반론과 재반박**: 반론 — "`HttpClientPlatformActivationTest.java:193` `aDynamicTargetPolicyIsRegisteredUnderItsOwnName`이 이미 커버한다." 그 테스트는 **정상 케이스**(둘 다 선언한 경우)만 확인한다. 누락 케이스의 기동 실패를 단언하는 테스트는 없다.
#### H6. 같은 날 `SecretSourcePort`를 만들어 놓고 httpclient는 그걸 쓰지 않는다 — 인증 프로필은 첫 호출에서 터진다
- **현상**: httpclient의 시크릿 해석은 `Function<String, String> httpClientSecretResolver` 빈 하나로 되어 있고, 저장소 전체에서 이 빈을 제공하는 유일한 구현이 **무조건 예외를 던진다.**
- **근거**:
- 기본 구현: `autoconfigure/HttpClientAuthenticationAutoConfiguration.java:36-43` — `@ConditionalOnMissingBean(name="httpClientSecretResolver")`, 본문은 `throw new CapabilityStartupValidationException("no http client secret resolver is configured for reference '" + reference + "'")`.
- 전수 grep: `httpClientSecretResolver` 심볼은 저장소 전체에서 이 leaf 안 2개 파일에만 등장한다(`HttpClientAuthenticationAutoConfiguration`, `DynamicTargetAutoConfiguration:73,80`). **오버라이드 빈을 제공하는 코드가 어디에도 없다** — `app-bootstrap`에도, `sample-portfolio`에도.
- 그런데 같은 워킹트리에 제대로 된 시크릿 포트가 **방금 생겼다**: `application-core/.../application/outbound/SecretSourcePort.java`(신규), `adapter/outbound/support/.../EnvironmentSecretSource.java:9`(신규, untracked), `app-bootstrap/.../runtime/SecretSourceFactory.java:17`이 `ENVIRONMENT` 전략으로 선택. 소비자는 Redis 계열 4개 클래스뿐이다(`RedisKeys`, `RedisCacheConfig`, `RedisCapabilityConfig`, `SecretSourceValidator`).
- httpclient가 이걸 쓰지 못할 구조적 이유는 없다 — `httpclient/build.gradle:20,22`가 `application-core`와 `adapter:outbound:support`를 이미 의존하고, `modules.json`의 `adapter-outbound-httpclient.allowed_dependencies`가 둘 다 허용한다.
- **왜 문제인가**: `authentication.type`이 `BASIC`/`API_KEY_HEADER`/`API_KEY_QUERY`/`STATIC_BEARER` 중 하나인 프로필은 기동에 성공하고 **첫 요청에서** 터진다. 시크릿 해석이 요청 경로에서 일어나기 때문이다 — `auth/BasicCredentialProvider.java:50` `secretResolver.apply(reference)`, `auth/StaticBearerCredentialProvider.java:38`, `auth/ApiKeyHeaderCredentialProvider.java:57`. H3 다이나믹 타깃의 `DynamicCredentialBinding` 시크릿도 같다(`dynamic/DefaultDynamicTargetGateway.java:186`).
- 더 나쁘게, 던지는 타입이 `CapabilityStartupValidationException`이다. 그 클래스의 javadoc은 *"Configuration failure raised by an optional capability **before it can start**"*이고 `ExitCodeGenerator`로 exit 78을 선언한다(`support/.../CapabilityStartupValidationException.java:12-28`). 요청 스레드에서 던져진 `ExitCodeGenerator`는 아무 일도 하지 않는다 — 의도한 실패 계약(기동 실패 + exit 78 + 구조화 로그)이 통째로 무효가 되고, 대신 안정 예외 계층(`HttpClientException`)에도 속하지 않는 예외가 게이트웨이 밖으로 새어 나간다.
- **수정 방향**: `HttpClientAuthenticationAutoConfiguration`이 `SecretSourcePort`를 주입받아 기본 리졸버로 삼는다(`port.resolve(ref).orElseThrow(...)`). 최소 조치로는 `HttpClientStartupValidator`에 "credential을 붙이는 authentication type인데 오버라이드 리졸버 빈이 없다"를 기동 위반으로 추가해, 첫 호출이 아니라 기동에서 실패시킨다.
- **반론과 재반박**: 반론 — "시크릿 백엔드는 배포가 정하는 것이고, 플랫폼이 강제로 env를 읽으면 Vault 같은 백엔드를 쓰는 배포를 막는다." 맞는 원칙이고 `HttpClientAuthenticationAutoConfiguration.java:24-26` javadoc도 그렇게 쓴다. 하지만 그 원칙을 만족시키는 추상이 **바로 옆에 방금 생겼고**(`SecretSourcePort` — 백엔드 선택은 `SecretSourceFactory`가 하고 포트는 프레임워크 무관), 그걸 쓰면 원칙을 지키면서 기본값도 동작한다. 지금 상태는 원칙을 지킨 게 아니라 두 슬라이스가 같은 날 같은 워킹트리에 들어오면서 접합부를 안 만든 것이다.
#### H7 (원래 M2에서 상향). S3 제공자 3,581줄은 실 스토어에 대고 한 번도 검증된 적이 없는데, 설정 한 줄이면 프로덕션에 붙는다
- **근거**: `docs/registries/object-storage-readiness.yaml`의 claim 9개 전부 `provider_type: filesystem-local-dev`. 소유 테스트도 `KNOWN_PROVIDERS = Set.of("filesystem-local-dev")`로 고정(`test/.../readiness/ObjectStorageReadinessRegistryTest.java:23`). 반면 `s3` 패키지는 3,581줄이고 `S3ObjectStorageProviderContribution`이 항상 빈으로 등록된다(`config/ObjectStorageCapabilityConfig.java:33-36`).
- **왜 문제인가**: `objectstorage/CLAUDE.md:44`의 Forbidden이 "`docs/registries/object-storage-readiness.yaml`의 정확한 행을 넘어서는 주장"을 금지한다. `type: aws-s3-general-purpose`로 배포하는 것은 정의상 행이 0개인 주장인데, 기동 시 이를 막는 코드가 없다. `ObjectStorageBindingCompiler`는 프로파일/증거 검증은 하지만(`config/ObjectStorageBindingCompiler.java:179-191`) readiness 레지스트리는 읽지 않는다.
- **수정 방향**: 둘 중 하나. (a) S3/MinIO 카드를 레지스트리에 (R0이어도) 추가하고 `KNOWN_PROVIDERS`를 확장, (b) `ObjectStorageBindingCompiler`가 선택된 `providerType`에 해당하는 카드가 레지스트리에 존재하는지 기동 시 확인. README:61-62가 "legacy S3/MinIO adapter ... advances no S3 readiness card"라고 쓰고 있지만, 이 문장은 **레거시** 어댑터 얘기지 `s3/` 패키지의 새 제공자 얘기가 아니다 — 그 자체가 문서 모호성이다.
- **반론과 재반박**: 반론 — "S3 제공자는 아직 아무 데도 배선되지 않았으니 실질 위험이 없다." 배선은 설정 한 줄(`providers.x.type`)이고, 코드는 그 한 줄을 받으면 완전히 동작한다. "아직 안 쓴다"는 레지스트리가 보장해야 할 것을 우연에 맡기는 것이다.
- **테스트 전수 독파 후 상향(§1.3)**: 처음엔 "레지스트리 카드가 없다"는 문서 문제로 봤다. 7개 qualification/integration 테스트를 본문으로 읽고 나니 문서 문제가 아니다.
- AWS qualification 레인 2개는 **환경변수 존재만 단언**한다. S3 클라이언트를 만들지 않는다(`qualification/AwsS3ManagedCommonSubsetQualificationTest.java:12-25`, `AwsS3DirectTransferQualificationTest.java:12-22`). 레인 이름이 약속하는 "AWS 적격성"을 하나도 보증하지 않는다.
- MinIO "contract/fault"로 이름 붙은 4개 중 2개(`MinioDirectTransferContractTest.java`, `MinioDirectTransferFaultTest.java`)는 **체크인된 JSON 문자열을 단언**할 뿐 MinIO를 띄우지 않는다. 그런데 `objectstorage/build.gradle:70-94`는 이 둘을 각각 *"Runs the non-skipping exact-release MinIO managed object contract"*, *"digest-pinned MinIO/Toxiproxy fault contract"* 레인으로 설명한다 — 레인 설명과 테스트 본문이 어긋난다.
- 진짜 MinIO를 띄우는 2개(`MinioManagedObjectContractTest.java`, `MinioManagedObjectFaultTest.java`)는 **raw AWS SDK `S3AsyncClient`를 직접 드라이브**한다. 이 leaf의 `S3ManagedObjectProvider`/`S3ConditionalObjectControlStore`/`S3ManagedMultipartProvider`를 통과하지 않는다.
- 남은 `S3ObjectStorageAdapterIT.java`는 **deprecated 레거시** 어댑터를 검증한다.
- 결정타: 스킵 없는 제공자 계약 `contract/ObjectStorageProviderContract.java`(247줄)를 **상속하는 클래스는 `LocalDevObjectStorageProviderTest` 하나뿐이다**(전수 grep). s3 테스트들은 그 계약의 `static operation()`/`producer()` 헬퍼만 빌려 쓴다.
- 그리고 저장소 자신의 측정 결과가 MinIO를 배제한다 — `integrationTest/resources/object-storage/minio-provider-evidence.json`: `"status": "UNSUPPORTED"`, *"PutObject If-None-Match was accepted and overwrote an existing object"*, *"CompleteMultipartUpload accepted If-None-Match despite a pre-existing target and overwrote it"*. 이 leaf의 불변 생성과 제어 CAS가 딛고 선 원시 연산이다.
- **상향 이유**: "카드가 없다"가 아니라 **"실 스토어 검증이 0이고, 유일하게 돌려본 호환 스토어는 핵심 원시 연산을 지키지 않는다고 저장소 자신이 기록해 두었다"**이다. 그 상태에서 `providers.x.type=aws-s3-general-purpose` 한 줄로 프로덕션 경로가 열린다. fork 사용자가 "S3 지원됨"으로 읽을 표면(README, `s3/` 패키지 크기, `S3ProviderQualifier`)은 충분히 크다.
- **설계가 정직한 부분은 인정해야 한다**: 바인딩 단이 MinIO의 direct 능력 주장을 거부하고(`S3ProviderBindingTest.java:56-64`), MinIO 프로필 증거를 `UNSUPPORTED`로 고정하며(`:354-369`), readiness 검증기가 `filesystem-local-dev` 외 provider_type을 unknown으로 거부한다(`readiness/ObjectStorageReadinessRegistryTest.java:23, 82-91`). 즉 **과대 주장은 막혀 있다.** 막혀 있지 않은 것은 "검증되지 않은 제공자로 실제 배포하는 것"이다.
#### Q3. H1~H6을 166개 테스트가 왜 못 잡았는가 — 한 줄씩
테스트 전수 독파 후 확정. 공통 패턴은 하나다: **부품은 직접 생성해 검증하고, 그 부품이 실행 경로에 연결됐는지는 아무도 안 본다.**
| 발견 | 왜 못 잡았나 | 근거 |
|---|---|---|
| **H1** 리액티브에 브레이커·리미터·벌크헤드 없음 | `CircuitBreaker` 심볼이 테스트 166개 중 **픽스처 1개**(`testFixtures/.../RecordingResilienceComponents.java`)에만 등장한다. 브레이커가 열리는지를 게이트웨이를 통해 단언하는 테스트가 0개이고, 같은 시나리오를 블로킹/리액티브 양쪽에 돌려 대칭을 확인하는 테스트도 0개다 | `resilience/AttemptResiliencePipelineTest.java`는 파이프라인을 직접 생성해 검증한다 — 파이프라인이 리액티브 런타임에 **연결돼 있지 않다는 사실**은 이 테스트의 시야 밖이다 |
| **H2** 리액티브가 `timeout.total-call`을 강제 안 함 | `HttpDeadlineExceededException`이 테스트 166개 중 **`resilience/DeadlineCalculatorTest.java` 1개**에만 등장한다. 그것도 순수 계산 단위 테스트다. 게이트웨이를 통해 데드라인 초과를 단언하는 테스트는 블로킹에도 리액티브에도 없다 | 반대로 `webclient/ReactiveSseGatewayTest.closesSilentStreamAtStreamingIdleTimeout`은 초록이라 "리액티브 타임아웃이 검증됐다"처럼 보인다 — 그건 SSE 게이트웨이 전용 `.timeout()`이지 `total-call`이 아니다 |
| **H3** 시도 단위 메트릭 5종 미발행 | 방어 테스트가 **소스 텍스트를 센다**: `test/.../observation/DeclaredMetricsAreEmittedTest.java:70` `countOccurrences(platformSources, "HttpClientObservationNames." + name)`. `readPlatformSources()`(`:107-119`)가 `main/java`의 모든 `.java`를 이어붙이므로, 이름이 `AttemptObservation.java` 안에 문자열로 존재하기만 하면 통과한다 | 보강 3건: ① `observation/HttpClientTagPolicyTest.java:47`이 `AttemptObservation.start(...)`를 **테스트에서 직접 호출**해 클래스에 커버리지를 만든다(프로덕션 호출자는 0건) ② `restclient/DefaultGenericHttpGatewayTest.java:137-156` `recordsSeparateLogicalAndAttemptMetrics`는 이름과 달리 `LOGICAL_CALL_TIMER`만 단언한다 ③ `testFixtures/.../ObservabilityContract.java:62-63`은 서로 다른 두 상수가 다르다는 **동어반복**으로 끝난다 |
| **H4** 트레이스·상관관계 전파 미구현 | **`traceparent` 문자열이 테스트 166개 중 0개 파일에 등장한다.** 아웃바운드 요청에 그 헤더가 실리는지 확인하는 테스트가 아예 존재하지 않는다 | 있는 것은 반대 방향뿐이다 — `security/TrustedRequestPolicyTest.java:49-55`는 caller가 플랫폼 소유 헤더를 넣으면 거부됨을 단언한다. 거부 테스트가 초록이면 "헤더 정책이 검증됐다"로 읽히지만, 플랫폼이 그 헤더를 **넣는지**는 누구도 묻지 않았다 |
| **H5** Dynamic Target이 동명 프로필을 암묵 요구 | `autoconfigure/HttpClientPlatformActivationTest.java:193`이 **정상 케이스만** 단언한다(둘 다 선언). 누락 케이스에서 기동이 실패해야 한다는 단언이 없고, `UnsafeStartupConfigurationTest`의 거부 목록에도 이 조합이 없다 | 첫 호출에서 터지는 결함은 `ApplicationContextRunner` 계열이 구조적으로 못 본다 — 러너는 컨텍스트를 만들고 끝나지 호출을 하지 않는다 |
| **H6** `SecretSourcePort`를 안 쓰고 인증 프로필은 첫 호출에서 터짐 | **테스트가 결함 직전에서 멈춘다.** `autoconfigure/ReactiveAuthenticationContractTest.java:62-63`이 `authentication.secret-reference=secret://env/EVENTS_TOKEN`을 설정하고 `assertThat(context).hasNotFailed()` 하나만 단언한다. H6이 말하는 그대로다 — "기동은 된다". 그 다음 한 줄(요청 보내기)이 없어서 "첫 호출에서 터진다"가 드러나지 않는다 | 같은 파일 `:41`도 `hasNotFailed()`뿐이다. 시크릿 참조를 실제로 해석하는 경로를 타는 테스트는 166개 중 0개다 |
---
#### H8. SSRF 방어의 "핀을 실제 소켓에 강제하는" 두 클래스는 테스트 참조가 0건이고, 어떤 하네스도 그 경로를 배선하지 않는다
- **현상**: DNS 재바인딩 방어의 마지막 한 칸 — 검증된 IP로 소켓을 고정하는 부분 — 이 어떤 테스트에서도 실행되지 않는다.
- **근거**:
- 전수 grep: `ValidatedAddressResolverGroup`(Reactor Netty 측), `ApacheDnsResolverFactory`(Apache 측) 두 심볼이 테스트 166개 중 **0개 파일**에 등장한다. main에서는 각각 `reactor/ReactorHttpClientFactory.java:66`, `apache/ApacheClientFactory.java:62-63`이 쓴다.
- 하네스가 배선하지 않는다: `testFixtures/.../TestGateways.java:67-68`이 `new ApacheBlockingTransportProvider()` / `new JdkBlockingTransportProvider()`를, `ReactiveTestGateways.java:58`이 `new ReactorNettyTransportProvider()`를 **무인자 생성자**로 만든다. 그 생성자는 `this(Optional.empty(), profile -> Optional.empty(), profile -> Optional.empty())`다(`ApacheBlockingTransportProvider.java:46-48`, `ReactorNettyTransportProvider.java:44-46`) — 즉 `tlsMaterialResolver`와 `resolverFactory`가 **둘 다 빈 값**이다. 그래서 `ApacheClientFactory`는 `orElseGet(ApacheDnsResolverFactory::systemDefault)`로 떨어진다.
- 검증되는 것: `dynamic/DynamicTargetSecurityTest.java`와 `testFixtures/.../DynamicTargetSecurityContract.java`가 정규화·IP 분류·모든 답변 검증·`CallScopedDnsPin`을 **부품 단위로** 촘촘히 검증한다. 좋은 테스트다. 다만 "핀이 실제 커넥션 팩토리를 통해 소켓에 적용되는가"는 그 밖이다.
- **왜 문제인가**: SSRF 방어에서 실무상 가장 자주 깨지는 지점이 정확히 여기다(검증은 통과했는데 재해석된 주소로 연결). 위쪽 전부가 초록이므로 이 구멍은 계측되지 않는다.
- **수정 방향**: `TestGateways.forProfile`에 resolverFactory를 넘길 수 있게 하고, 계약 테스트 하나를 추가한다 — 검증 단계에서 A를 반환하고 연결 단계에서 B(내부 IP)를 반환하는 리졸버를 주입해 **연결이 A로 갔음**을 단언한다. 지금 하네스 구조로는 그 테스트를 쓸 수조차 없다는 점이 더 큰 문제다.
- **반론과 재반박**: 반론 — "핀 자체가 검증됐으면 충분하다." 아니다. 이 leaf는 같은 종류의 실패(부품은 맞는데 경로에 연결 안 됨)를 H1·H3에서 이미 두 번 냈다. 그 실패 유형이 반복되는 저장소에서 "연결됐을 것"은 근거가 아니다.
#### H9. `integrationTest` 레인의 유일한 실패주입 계약이 사실상 동어반복이다
- **근거**: `httpclient/src/integrationTest/.../contract/FailureInjectionContractTest.java:77-80` — Toxiproxy로 실패를 주입한 뒤 증거를 `isIn(NOT_SENT, SENT_NO_RESPONSE, PARTIAL_RESPONSE)`로 단언한다. `ExecutionEvidence`의 값은 이 셋 + `RESPONSE_RECEIVED` 네 개뿐이다. 실패한 호출에서 `RESPONSE_RECEIVED`가 아닌 것은 정의상 자명하다.
- **왜 문제인가**: 이 leaf의 재시도 안전성 전체가 "증거를 **정확히** 분류한다"에 걸려 있다(`AttemptStage.provesNotSent` → 재시도 허용). 그 분류가 맞는지를 실제 네트워크 실패로 확인하는 유일한 자리인데, 어떤 값이 나와도 통과한다. 예컨대 연결 거부가 `SENT_NO_RESPONSE`로 잘못 분류되면 비멱등 요청이 재시도되지 않아야 하는데도 안전 판정이 뒤집힌다 — 이 테스트는 그걸 못 잡는다.
- **수정 방향**: 주입한 결함 종류별로 기대 증거를 **정확히 하나** 단언한다(연결 거부 → `NOT_SENT`, 응답 중 절단 → `PARTIAL_RESPONSE`).
---
### Medium
#### M1. objectstorage는 프로덕션 컴포지션 루트에 연결돼 있지 않은데, 부트스트랩은 연결된 것처럼 선언해 놓았다
- **근거**: `src/config/architecture/modules.json`의 `app-bootstrap.allowed_dependencies` 15개에 `adapter-outbound-objectstorage` 없음. `app-bootstrap/build.gradle`에 해당 project 의존 없음. 유일 소비자는 `sample-portfolio/build.gradle:54`(`runtimeOnly`).
- **그런데** `CaSkeletonApplication.java:75`의 `@ConfigurationPropertiesScan` basePackages에 `"dev.caskeleton.adapter.outbound.objectstorage"`가 들어 있다. 클래스패스에 없으니 무해하지만, **컴포지션 루트가 이 leaf를 소유한다고 선언**하면서 빌드는 그렇지 않은 드리프트다.
- **영향**: fork 사용자가 README("Activation and routing ... `app.object-storage`")를 읽고 `APP_OBJECT_STORAGE_ENABLED=true`류를 찾다가 부트스트랩에 `objectstorage.yml`도, gradle 의존도 없다는 걸 나중에 발견한다.
- **수정 방향**: 둘 중 하나. (a) `modules.json` + `app-bootstrap/build.gradle` + `config/objectstorage.yml`을 추가해 실제로 편입, (b) `@ConfigurationPropertiesScan`에서 그 줄을 제거하고 README에 "샘플 전용 / 편입은 fork의 몫"이라고 명시.
#### M3. 서킷 브레이커·레이트 리미터가 Resilience4j 기본값 고정이고 설정 surface가 없다
- **근거**: `resilience/ResilienceRegistry.java:36-39` — `CircuitBreakerRegistry.ofDefaults()`, `RateLimiterRegistry.ofDefaults()`. `restclient/RestClientRuntimeFactory.java:133-142`가 프로필 이름으로 조회만 한다. `HttpClientPlatformSettings`(242줄)에 breaker/limiter/bulkhead 필드가 **하나도 없다** — `Pool`, `Timeout`, `Redirect`, `Request`, `Response`, `Authentication`, `Retry`, `Observability`, `Tls`, `Proxy`가 전부다.
- **결과**:
- 브레이커: Resilience4j 기본 `minimumNumberOfCalls=100`, `slidingWindowSize=100`. 초당 1회 호출하는 업스트림은 100번 실패할 때까지 절대 안 열린다. `waitDurationInOpenState=60s`도 조정 불가.
- 레이트 리미터: 기본 `limitForPeriod=50 / 500ns` — 사실상 무제한이라 **비용만 있고 효과가 없다**. 더 나쁜 것은 `AttemptRateLimiter.resilience4j`가 `delegate.acquirePermission(1)`을 쓴다는 점(`resilience/AttemptRateLimiter.java:26-28`). 이 호출은 기본 `timeoutDuration=5s`까지 **블로킹 대기**한다. 프로필 기본 `timeout.total-call`은 4s(`HttpClientPlatformSettings.java:173`)라, 리미터가 실제로 포화하는 설정으로 바뀌는 순간 데드라인 바깥에서 최대 5초가 소모된다.
- 벌크헤드 permit은 `pool.max-total-connections`로 유도(`RestClientRuntimeFactory.java:139`), 논리 admission은 `maxPendingAcquires + maxTotalConnections`(`:109-111`). 유도 규칙은 합리적이지만 독립 조정이 불가능하다.
- **수정 방향**: `ClientSettings`에 `resilience` 블록(브레이커 임계/윈도, 리미터 limit/period/timeout, 벌크헤드 permit)을 추가하거나, 최소한 `RateLimiter`를 `tryAcquirePermission()`(논블로킹)으로 바꾸고 현재 기본값을 문서화한다.
- **반론과 재반박**: 반론 — "기본값으로 충분하고, 설정 표면을 늘리면 오설정이 늘어난다." 이 leaf의 다른 모든 설정은 정반대 철학을 따른다 — `Request.maxBodyBytes`는 프로덕션에서 기본값 0을 거부하고(`profile/ClientProfileValidator.java:274-276`), TLS 프로필 ID도 필수다. 유독 브레이커만 "프레임워크 기본값에 맡긴다"는 것은 일관성이 없고, actuator가 `retryPolicy`는 보여주면서 브레이커 설정은 안 보여준다(`autoconfigure/HttpClientActuatorEndpoint.java:190-199`).
#### M4. `DirectTransferCoordinator`의 presigned 자재 캐시가 무제한이고, 다운로드 그랜트는 절대 제거되지 않는다
- **근거**: `direct/DirectTransferCoordinator.java:46-47` — `private final Map<String, DirectGrantProvider.DirectGrantMaterial> issued = new ConcurrentHashMap<>();`. 업로드는 `completeUpload`에서 제거(`:126`)되지만, **다운로드 경로는 `:188`에서 `put`만 하고 어디서도 `remove`하지 않는다.** TTL도, 최대 크기도 없다.
- 클래스 javadoc(`:35-37`)은 "bounded process-local replay cache"라고 쓴다. bounded가 아니다.
- **왜 문제인가**: 다운로드 그랜트 N건 발급 = presigned URI + 서명 헤더 N건이 힙에 영구 상주. 만료된 bearer 자재가 프로세스 생애 내내 메모리에 남는 것 자체가 노출면이다.
- **완화 요인**: `DirectTransferCoordinator`는 main 전체에서 참조 0건이다(전수 grep). 어떤 composition도 이걸 만들지 않는다 — `config/RoutingObjectDirectGrantAdapter.java`는 private 생성자만 있는 빈 자리표시자다. 즉 **잠재 결함**이지 현재 가동 중인 누수는 아니다. 같은 이유로 `ManagedMultipartCoordinator`, `DirectMultipartCoordinator`, `MultipartOperationResolver`, `S3ObjectOperationResolver`도 배선되지 않은 상태다(합계 약 2,000줄).
- **수정 방향**: `issued`를 `expiresAt` 기준으로 만료시키는 bounded 맵으로 바꾸고, 다운로드 경로에도 제거 시점을 정의한다. 배선 시점 전에 고치는 편이 싸다.
#### M5. 토글을 꺼도 클래스패스는 그대로고, 그 부작용이 앱 전역 기본 RequestFactory를 바꾼다
- **근거**: `httpclient/build.gradle:35-37` — Apache HC5, reactor-netty-http, **jetty-client**가 전부 `implementation`(런타임). `app-bootstrap/build.gradle:114`도 `implementation`.
- HTTP/3용 jetty-http3만 `compileOnly`로 제대로 분리해 놓았고(`:45-46`, 이유도 주석에 명시), jetty-client 본체는 런타임에 남는다. 그런데 stable 경로에서 jetty-client를 쓰는 곳은 없다 — `JettyHttp3TransportProvider`뿐이고 그건 auto-config가 절대 등록하지 않는다.
- **부작용(미검증, 확인 필요)**: Spring Boot의 `ClientHttpRequestFactoryBuilder.detect()`는 클래스패스 우선순위(Apache HC5 > Jetty > Reactor Netty > JDK)로 고른다. 이 leaf를 넣는 것만으로 앱 안의 **다른 모든** `RestClient.Builder`/`RestTemplateBuilder`의 기본 팩토리가 Apache HC5로 바뀐다. `app.httpclient.enabled=false`여도 그렇다.
- **수정 방향**: 최소한 CLAUDE.md:62-63의 "빌드 포함은 별개" 문장에 이 구체적 귀결을 적는다. jetty-client는 jetty-http3와 함께 `compileOnly`로 내릴 수 있는지 검토(HTTP/3 전송만 쓰므로 가능해 보인다).
- **확인 명령**: `cd src && ./gradlew :app-bootstrap:dependencies --configuration runtimeClasspath | grep -i jetty`
#### M6. `application-core`가 httpclient를 import하지 못하게 막는 강제 장치가 이 leaf 안에 없다
- **근거**: `httpclient/CLAUDE.md:54-55`가 "Application/domain code must not import this module's gateways, operation descriptors, URI types, Spring HTTP types, engine clients, retry types, or wire DTOs"라고 금지한다. 이 leaf의 ArchUnit 테스트 2종(`HttpClientModuleBoundaryTest`, `PublicApiArchitectureTest`)은 **leaf 내부 패키지 간** 규칙만 검사한다(테스트 메서드 12개 전수 확인).
- 방향이 반대라 leaf 테스트로는 원천적으로 못 잡는다 — application-core나 아키텍처 레인에 규칙이 있어야 한다. `modules.json` 의존 게이트는 `application-core`가 `httpclient`에 의존하지 못하게 하므로 **컴파일은 막힌다.** 즉 실질 위험은 낮고, 문제는 "CLAUDE.md가 이 leaf의 테스트가 지키는 것처럼 읽힌다"는 점이다.
- **수정 방향**: CLAUDE.md:54-55에 "이 규칙은 Gradle 의존 게이트가 강제한다"고 명시하거나, `architectureTest` 레인에 명시 규칙을 추가.
#### M7. 테스트 레인 배선에 남은 구멍
- `httpclient/build.gradle:144-146`: `test`는 `httpclient-blockhound`만 제외한다. `httpclient-contract`(5개)·`httpclient-security`(2개) 태그 테스트는 `test`와 전용 레인에서 **두 번** 실행된다. `check`가 두 레인을 모두 부르므로(`:254-258`) 매 빌드마다 중복.
- `spring62ApiSurfaceScan` 레인은 태그 `httpclient-spring62-surface`를 쓰는데 그 태그를 단 테스트는 1개뿐이고, `test`에서도 같이 돈다.
- `objectstorage/build.gradle:70-94`: `objectStorageMinioContractTest`와 `objectStorageMinioFaultTest` 두 qualification이 **같은 `integrationTest` 소스셋**을 보게 바뀌었다. 클래스 이름으로 분리하므로 동작은 하지만, 같은 소스셋을 3개 태스크(`integrationTest` 레인 + 2개 qualification)가 각각 실행한다 — `integrationTest` 레인은 필터가 없으므로 4개 qualification 테스트를 **전부 다시** 돌린다.
- `app-bootstrap`의 `systemTest` 레인이 `check`/`ci`에 붙어 있지 않아 C1 같은 컴포지션 결함을 잡을 위치가 비어 있다.
- 그리고 전수 독파로 드러난 것: `objectStorageMinioContractTest` / `objectStorageMinioFaultTest` 레인이 지정하는 클래스 4개 중 **2개는 MinIO를 띄우지 않는다.** `qualification/MinioDirectTransferContractTest.java`(25줄)와 `MinioDirectTransferFaultTest.java`(32줄)는 체크인된 `minio-provider-evidence.json`에 `contains("\"status\": \"UNSUPPORTED\"")`를 단언할 뿐이다. 레인 설명(*"Runs the non-skipping exact-release MinIO managed object contract"*)과 본문이 어긋난다 — Docker 없이도 초록이다.
- `objectStorageAwsQualificationTest` 소스셋 2개도 같은 종류다(§1.3). 레인이 `OBJECT_STORAGE_AWS_*` 환경변수를 요구하고 그 변수의 **존재만** 확인한 뒤 끝난다.
#### M8. 문서-코드 드리프트 (코드가 사실)
| 문서 | 주장 | 실제 |
|---|---|---|
| `httpclient/CLAUDE.md:40-41` | testkit이 `src/testkit/java` 소스셋 | `src/testFixtures/java` (java-test-fixtures 변형). `build.gradle:1-6`의 `java-test-fixtures` 플러그인과 `:109-122`의 `testFixturesImplementation`이 정본 |
| `docs/httpclient/repository-adaptation.md:30` | 같은 주장 반복 | 동일 |
| `httpclient/build.gradle:71-73` 주석 | "the testkit source set inherits them by extending testImplementation" | 바로 아래 `:106-108` 주석이 "moving to testFixtures makes that surface explicit"이라고 그 문장을 부정한다 |
| `httpclient/CLAUDE.md:75` | 레인 이름 `spring62CompatibilityTest` | 실제 태스크명 `spring62ApiSurfaceScan` (`build.gradle:205`). `spring70CompatibilityTest`는 일치 |
| `httpclient/README.md:44` | 모든 물리 시도가 브레이커→리미터→벌크헤드 통과 | 블로킹만 (H1) |
| `docs/registries/env-keys.yaml` | object-storage 키 0건 | `app.object-storage.*` 전체 표면이 SSOT 바깥. httpclient는 `docs/httpclient/env-fields.yaml:13-21`에서 왜 분리했는지 명시적으로 설명한 반면, objectstorage는 설명도 없다 |
---
### Low
- **L1.** `dynamic/ValidatedDnsResolver.approved` 맵(`:37`)은 `CallScopedDnsPin` 도입 이후 사실상 유물이다. `resolve()`가 채우고 게이트웨이가 `forget()`으로 지우지만, 핀은 ThreadLocal로 따로 전달된다(`dynamic/DefaultDynamicTargetGateway.java:105-106`). 정상 경로에서는 정리되나 `approvedAddresses(String)` 공개 메서드는 main에서 호출자가 없다. 삭제 후보.
- **L2.** `filesystem/LocalDevObjectControlStore.locks`(`:26`)는 CAS된 키마다 모니터 객체를 하나씩 쌓고 제거하지 않는다. local-dev 전용이라 영향은 작다.
- **L3.** 레거시 `FilesystemObjectStorageAdapter.get()`이 `Files.readAllBytes`로 크기 제한 없이 읽는다(`:71`). 같은 어댑터의 `put`도 whole-`byte[]`다 — 이건 deprecated `ObjectStoragePort` 계약 자체의 성질이라 어댑터가 고칠 수 없다. 현재 유일한 상한은 Spring Boot 기본 multipart 제한(1MB)인데, 이 저장소 어디에도 `spring.servlet.multipart.*` 설정이 없으므로 **우연한 보호**다. 샘플이 실제로 이 경로를 켜 두고 있다(`sample-portfolio/.../application.yml:319-323`).
- **L4.** `webclient/DefaultReactiveSseGateway.java:123` — `credentialProvider().resolve(...).block(setupDeadline)`. 현재 등록되는 리액티브 제공자 4종은 전부 동기 계산이라 즉시 완료되지만(`autoconfigure/HttpClientAuthenticationAutoConfiguration.java:82-87`), 재접속 시 `retryWhen`이 이벤트 루프 스레드에서 재구독하면 `block()`이 루프에서 호출될 수 있다. BlockHound 레인이 SSE 재접속을 커버하는지는 미확인(`BlockHoundEventLoopTest`의 3개 테스트는 gateway·retry backoff만).
- **L5.** `resilience/Http2EvidenceMapper`는 main에서 호출자가 없다. `BlockingAttemptExecutor.java:109`가 항상 `ProtocolEvidence.none()`을 넘기므로, 설계가 약속한 "HTTP/2 REFUSED_STREAM은 NOT_SENT로 승격"은 실행 경로에 없다. `Http2EvidenceMapperTest` 5개가 클래스 단위로만 검증한다.
- **L6.** `security/TlsRuntimeRotationCoordinator`가 어떤 auto-config에서도 빈으로 발행되지 않는다. `ClientRuntimeRegistry.swap`과 세대 드레인이 완전히 구현돼 있는데도 런타임 인증서 회전 진입점이 없다. CLAUDE.md:26이 "runtime generations"를 책임으로 선언한다.
- **L7.** `observation/SensitiveValueRedactor`, `auth/ProxyCredentialProvider`도 main 호출자 0건.
- **L8.** `ObjectStorageScanMaintenanceConfig`(`config/:9-19`)는 무조건부 `@Configuration`이고 그 안의 빈이 `AssembledCapability`를 요구한다. `scan-maintenance.enabled=true` + `app.object-storage.enabled=false` 조합이면 미충족 의존으로 기동 실패한다 — C1과 같은 모양이지만 둘 다 opt-in이라 영향이 작다.
- **L9.** 포워드 프록시 기능은 **플랫폼 호출을 통해 한 번도 검증되지 않는다.** `test/.../testkit/ForwardProxyContractTest.java`의 3개 테스트 중 2개는 raw `java.net.Socket`으로 픽스처 프록시에 직접 `CONNECT`를 쏘고(`:20-33`, `:55-70`), 1개는 `ProxyCredentialProvider`를 단독 생성해 헤더 이름만 본다(`:35-53`). 프로필에 `proxy`를 설정하고 게이트웨이로 요청을 보내는 테스트는 166개 중 0개다. main에서 `ProxyCredentialProvider` 호출자가 0건인 것(L7)과 짝을 이룬다.
- **L10.** `test/.../s3/S3SdkApiCharacterizationTest.java:102-108`이 AssertJ의 `assertThatCode`와 **같은 이름의 private 헬퍼**를 정의한다. 실제로는 호출해서 `ReflectiveOperationException`이면 `LinkageError`로 바꾸는 것뿐이라 동작은 맞지만, `:76-79`의 `allSatisfy(builder -> assertThatCode(...))`는 AssertJ 단언처럼 읽히면서 아무 단언 객체도 만들지 않는다. 읽는 사람을 속이는 이름이다.
---
## 6. 바꾸지 말 것 (Keep)
### K1. objectstorage가 `InputStream` 대신 스코프 chunk 콜백을 port로 삼은 것
- **무엇**: `application-core/.../objectstorage/content/`의 `ObjectContentProducer/Consumer` + `ObjectChunkSink/Source` + `ObjectContentProductionContext`. application 쪽 88개 파일에 `java.io`가 **0건**.
- **왜 지금 이게 맞는가**: 스트리밍 오브젝트 스토리지에서 `InputStream`을 port에 태우면 (a) 누가 닫는지, (b) 재시도 시 재생 가능한지, (c) 취소 시 커넥션이 어떻게 되는지가 전부 계약 밖으로 나간다. 여기서는 배열이 `write` 반환까지만 유효하다고 계약에 박아 넣고(`ObjectChunkSink.java:5`), `context.invalidate()`로 콜백 범위를 강제하며(`filesystem/LocalObjectStreamTransfer.java:87`), 그 결과 S3 어댑터는 같은 싱크를 reactive-streams demand에 직결해 백프레셔를 유지할 수 있다(`s3/S3AsyncRequestBodyBridge.java:137`). 로컬 파일시스템과 S3 비동기 클라이언트라는 완전히 다른 두 IO 모델이 **application 코드 변경 없이** 같은 port 뒤에 들어간다 — 이건 `InputStream` port로는 불가능하다.
- **언제 재검토**: application 쪽에서 이 콜백 형태를 감당하기 어려운 유스케이스(예: 사용자가 스트림을 오래 들고 있어야 하는 경우)가 나오면. 그때도 port를 바꾸는 게 아니라 어댑터 측 브리지를 추가하는 방향이 맞다.
### K2. httpclient가 재시도 판정에서 HTTP 메서드를 아예 제거한 것
- **무엇**: `resilience/RetryContext.java:21-38`에 `HttpMethod` 필드가 없다. 대신 `OperationIdempotency`(명시 선언), `BodyReplayability`, `ExecutionEvidence`, `firstByteDelivered`, 데드라인, 예산이 들어간다. `safelyIdempotent()`(`:71-76`)는 키를 **실제로 전송했는지**까지 본다.
- **왜 지금 이게 맞는가**: "GET이면 재시도해도 된다"는 관행은 GET RPC 엔드포인트에서 틀리고, "POST면 안 된다"는 관행은 Idempotency-Key를 쓰는 결제 API에서 과도하게 보수적이다. 이 leaf는 대신 `@HttpOperationPolicy(idempotency=...)`를 필수로 만들고(`service/ServiceOperationDescriptorScanner.java:54-58`), 키를 헤더로 렌더링하는 책임까지 플랫폼이 가져갔다(`security/TrustedTargetPolicy.java:105-132`). `RetryEligibilityEngineTest`의 18개 케이스와 `aKeyThatWasNeverSentDoesNotMakeARepeatSafe`가 그 결정을 고정한다.
- **언제 재검토**: 재검토 대상이 아니다. 이건 이 leaf가 16,470줄인 이유이자 그 크기를 정당화하는 유일한 근거다.
### K3. 위험 설정을 "표현 가능하되 거부 가능"하게 만든 패턴
- **무엇**: `tls.trust-all`, `tls.hostname-verification`, `tls.allow-plain-http`가 설정에 존재하지만 **true를 받아들이는 코드 경로가 없다.** `TlsSettings.java:13-15` javadoc이 그렇게 선언하고, `TlsPolicyValidator`(`security/:18-39`)와 `ClientProfileValidator.validateTls`(`profile/:226-244`)가 둘 다 거부한다. `TlsProfile`(실제로 자재를 만드는 레코드)에는 `trustAll` 컴포넌트가 아예 **없다**.
- **왜 지금 이게 맞는가**: 이 옵션들을 아예 없애면 운영자가 "인증서 검증을 끄고 싶다"를 표현할 방법이 없어 SDK를 직접 만지는 우회를 하게 된다. 표현은 허용하고 기동에서 명확한 코드(`TRUST_ALL_FORBIDDEN`)로 죽이면, 의도가 로그에 남고 우회 동기가 사라진다. 브리프가 물은 "인증서 검증을 끄는 스위치가 있는가"에 대한 답은 **"있지만 작동하지 않고, 있는 이유가 작동하지 않기 위해서"**다.
- **언제 재검토**: 사내 CA를 쓰는 배포가 늘어 `trust-material-reference` 경로가 실제로 널리 쓰이게 되면, 그때도 `trust-all`이 아니라 참조 경로를 개선한다.
### K4. Dynamic Target의 SSRF 방어를 "차단 목록"이 아니라 "글로벌 유니캐스트 허용 목록"으로 뒤집은 것
- **무엇**: `dynamic/IpAddressClassifier.globallyRoutableUnicast`(`:91-137`). JDK 술어(loopback/link-local/site-local/multicast/any) + 명시 특수목적 대역(0/8, 100.64/10, 192.0.0/24, 192.0.2/24, 198.51.100/24, 203.0.113/24, 198.18/15, 240/4, fc00::/7, 2001:db8::/32, 2001::/32, 100::/64) + 메타데이터 주소 4종 + 운영자 CIDR. **허용되지 않으면 거부**.
- **왜 지금 이게 맞는가**: 차단 목록은 빠뜨린 대역이 곧 취약점이고, IANA가 대역을 추가할 때마다 갱신 부채가 생긴다. 허용 목록은 부담을 뒤집는다. 여기에 (a) IPv4-mapped IPv6 정규화(`:37-57`), (b) **모든** A/AAAA 답변 검증(`ValidatedDnsResolver.java:56-63`), (c) 승인 주소를 소켓까지 핀(`CallScopedDnsPin` + `ApacheDnsResolverFactory.validated` + `ValidatedAddressResolverGroup`), (d) 홉마다 재검증·재핀(`DefaultDynamicTargetGateway.java:94-138`), (e) CIDR 파싱 시 호스트명 거부(`:166-194`)가 붙어 있다. DNS 리바인딩까지 실제로 막는 구현은 흔하지 않다.
- **언제 재검토**: IPv6 대역이 새로 할당되거나(2000::/3 가정이 깨지면), CGNAT 대역을 정당한 아웃바운드 대상으로 써야 하는 배포가 생기면. 후자는 `blocked-cidrs`의 반대 방향이라 정책 확장이 필요하다.
### K5. httpclient 설정을 `@ConfigurationProperties`로 만들지 **않은** 결정
- **무엇**: `HttpClientPlatformSettings`에 애노테이션이 없고(`:16-22`), 게이트 안에서 `StrictSettingsBinder`로 수동 바인딩한다. 그리고 환경변수는 record 트리에서 역산한 화이트리스트로 따로 검사한다(`HttpClientEnvironmentKeys.rejectUnrecognised`).
- **왜 지금 이게 맞는가**: `@ConfigurationPropertiesScan`은 선택적이지 않다 — 스캔에 걸리면 모든 배포에서 바인딩되고, 잘못된 값이면 **그 capability를 안 쓰는 배포까지** 기동 실패시킨다. 그러면 옵션 기능이 필수 기능이 된다. 환경변수 쪽 처리도 근거가 정확하다: Spring이 `APP_HTTPCLIENT_CLIENTS_0_BASE_URL`을 바인딩할 때는 `base-url`로, 열거할 때는 `base.url`로 보고하기 때문에 `NoUnboundElementsBindHandler`로는 오타를 못 잡는다(`HttpClientPlatformSettingsBinder.java:14-19`). 그래서 방향을 뒤집었다.
- **이번 리팩토링이 이 패턴을 공유 자산으로 올린 것도 맞는 방향이다**: fileserver와 httpclient가 각자 복제하고 있던 바인더가 `adapter/outbound/support/StrictSettingsBinder`로 합쳐졌고(`:26-32`가 BOOT-011로 중복 근거를 기록), 유일한 실질 차이(어떤 property source에 unbound 검사를 적용할지)만 파라미터로 남겼다. 통합하면서 기능을 잃지 않은 드문 사례다.
- **언제 재검토**: Spring Boot가 프로퍼티 스캔에 조건부 등록을 지원하게 되면. 그 전까지는 이게 유일하게 정직한 방법이다.
### K6. objectstorage의 "선택되기 전까지 아무것도 만들지 않는다" 조립 규약
- **무엇**: `ObjectStorageProviderContribution`이 `describe`(부작용 금지)와 `create`(선택 후에만, 부분 할당 정리 책임 포함)로 갈려 있다(`config/ObjectStorageProviderContribution.java:9-11`). `ObjectStorageCapabilityAssembler.assemble`(`:24-58`)은 **모든 바인딩을 먼저 컴파일**하고, 실제 선택된 제공자만 역순 정리 보장과 함께 구성한다.
- **왜 지금 이게 맞는가**: httpclient가 C1에서 잃어버린 성질을 objectstorage는 **다른 방법으로** 유지하고 있다 — 설정 클래스는 무조건부로 스캔되지만 그 안의 빈이 자원을 만들지 않으므로 무해하다. 그리고 그것이 우연이 아님을 6개 테스트가 고정한다(`ObjectStorageCapabilityConfigTest`의 `disabledContributionIsNeverDescribedConstructedOrClosed`, `unselectedContributionIsDescribedButNeverConstructedOrClosed`, `selectedContributionConstructionFailureCleansItsPartialAllocation`, `contributionIsConstructedOnceOnlyWhenSelectedAndClosedOnce` 등). **부작용 없는 무조건부 빈 + 자원을 쥔 조건부 빈**이 "설정 클래스를 조건부로 만든다"보다 견고한 패턴이다.
- **언제 재검토**: 제공자 기여가 생성자에서 비용을 치러야 하는 경우가 생기면. 그때는 계약을 바꾸는 게 아니라 `describe`를 lazy로 만든다.
### K7. S3 관리형 제공자의 "증거 없으면 거부" 스타일
- **무엇**: `s3/S3ManagedObjectProvider.create`(`:37-70`)가 `ifNoneMatch("*")`(불변 생성), `checksumSHA256`(요청+응답 양방향 검증), `serverSideEncryption(AES256)` 강제, `expectedBucketOwner`를 한 번에 건다. `transfer`는 HEAD 증거와 GET 응답(ETag·versionId·SSE·Content-Range)이 정확히 일치하지 않으면 거부한다(`:137-166`). 컨트롤 레코드는 64KB 상한 + ETag 기반 CAS + **응답 유실 시 재조정**(`s3/S3ConditionalObjectControlStore.java:110-122`). `S3ProviderBinding.validateProvisioning`(`:267-271`)은 `autoCreateBucket`과 `publicAcl`을 아예 거부한다.
- **왜 지금 이게 맞는가**: 브리프가 물은 "서버측 암호화, 버킷 정책, 퍼블릭 액세스 차단"에 대한 답이 전부 여기 있고, 방향이 옳다 — 런타임 프로비저닝을 하지 않고(버킷 생성/정책 변경은 인프라의 일), 암호화는 요청에 걸고 응답에서 다시 확인한다. 레거시 어댑터가 `autoCreateBucket=true`를 기본값으로 갖는 것과 대비된다(`ObjectStorageSettings.java:46`).
- **언제 재검토**: KMS(SSE-KMS)를 써야 하면 `ServerSideEncryption.AES256` 하드코딩을 정책화해야 한다. 지금 `ObjectEncryptionRequirement`가 설정에 존재하지만 S3 제공자는 그걸 읽지 않고 AES256을 고정한다 — 그 자체는 안전한 방향의 불일치다.
### K8. HTTP/3를 "라벨"이 아니라 "경계"로 만든 처리
- **무엇**: `jetty-http3-client-transport`가 `compileOnly`(`build.gradle:45`), stable starter는 이 전송을 절대 등록하지 않고(`autoconfigure/HttpClientTransportAutoConfiguration.java:29-35`), 정확한 승인 문자열이 필요하며(`http3/Http3ExperimentalAcknowledgement.java:11`), 클래스가 없으면 TCP로 폴백하지 않고 **기동 실패**한다(`http3/JettyHttp3TransportProvider.java:123-129`), wire 증명 없이는 promotable이 아니다(`Http3CapabilityReport.java:83-85`).
- **왜 지금 이게 맞는가**: javadoc이 과거 결함을 그대로 기록한다 — 예전엔 `HttpClientTransportOverHTTP`(평범한 HTTP/1.1)를 만들어 놓고 HTTP/3라고 보고했다. 지금은 클래스 프로브가 **제공자가 실제로 생성하는 클래스명**을 검사하므로 둘이 다시 어긋나면 로딩에서 죽는다. 실험적 기능을 다루는 법의 좋은 본보기다.
- **언제 재검토**: 이 빌드가 실제 HTTP/3 서버를 세울 수 있게 되면 `wireVerified`를 true로 만들 수 있다.
---
## 7. 커밋 안 된 리팩토링이 이 영역에 미친 영향
### 7.0 먼저: diff 수치를 액면으로 읽으면 안 된다
`full.diff`는 `git diff HEAD`라서 **untracked 파일을 담지 않는다.** 저장소 전체로는 tracked −22,532 / +2,374인데, untracked 175파일이 +21,270을 더한다 → 실제 순증감 ≈ **+1,112**. 즉 −22,532는 대부분 **이동의 한쪽 면만 보인 것**이다.
내 영역만 정확히 계산하면 이렇다 (lockfile 제외, 줄 단위 실측):
| | tracked 삭제 | untracked 추가 | 순증감 |
|---|---:|---:|---:|
| httpclient 조립 코드 (bootstrap main 16파일 → leaf `autoconfigure/` 16파일) | −1,466 | +1,466 | 0 |
| httpclient 조립 테스트 (bootstrap test 6파일 → leaf `test/autoconfigure/` 6파일) | −1,004 | +1,004 | 0 |
| httpclient Toxiproxy 2파일 (`test`+`testFixtures` → `integrationTest`) | −189 | +189 | 0 |
| httpclient Boot 등록 파일 | — | +1 | **+1** |
| **httpclient 소계** | **−2,659** | **+2,660** | **+1** |
| objectstorage MinIO/S3 통합 5파일 + 증거 JSON (2개 소스셋 → `integrationTest`) | −622 | +622 | **0** |
| `adapter/outbound/support` 신규 3 main + 2 test | — | +179 | +179 |
| 문서·빌드 스크립트 (`CLAUDE.md`, `build.gradle` ×3, `repository-adaptation.md`, `ObjectStorageArchitectureContractTest`) | −54 | +43 | −11 |
**httpclient 슬라이스는 1,466줄 조립 코드 + 1,004줄 테스트가 바이트 단위로 그대로 옮겨간 것이고, 순증은 `AutoConfiguration.imports` 한 줄이다.** objectstorage 슬라이스는 순증 0 — 완전한 이동이다.
### 7.1 무엇이 바뀌었나
| 범주 | 내용 |
|---|---|
| **이동 (main)** | `dev.caskeleton.bootstrap.autoconfigure.httpclient` 16파일 → `dev.caskeleton.adapter.outbound.httpclient.autoconfigure`. 내용 동일, 패키지 선언과 import만 변경 |
| **이동 (test)** | 같은 6파일이 leaf로. `HttpClientPlatformActivationTest` 253줄은 패키지 라인 외 **바이트 동일**(diff의 삭제분과 스냅샷의 untracked 본문을 대조 확인) |
| **이동** | httpclient `ToxiproxyFixture` + `FailureInjectionContractTest` → 신규 `integrationTest` 소스셋. Testcontainers 3종이 `testImplementation`/`testFixturesImplementation` → `integrationTestImplementation` |
| **통합** | objectstorage `objectStorageMinioContractTest` + `objectStorageMinioFaultTest` 두 소스셋 → 단일 `integrationTest`. `S3ObjectStorageAdapterIT`와 evidence JSON도 `test` → `integrationTest` |
| **신규 (진짜 추가)** | `adapter/outbound/support`에 `StrictSettingsBinder`(82), `CapabilityStartupValidationException`(30), `EnvironmentSecretSource`(22) + 테스트 2개. 앞의 둘은 httpclient와 fileserver가 각자 갖고 있던 복제본의 통합이고(`StrictSettingsBinder.java:26-33` 주석이 BOOT-011로 근거를 밝힘), 셋째는 `secret-source-port-ownership` 슬라이스 산물 |
| **신규** | `httpclient/src/main/resources/META-INF/spring/...AutoConfiguration.imports` 1줄 |
| **추가 의존** | httpclient에 `spring-boot-actuator` + `actuator-autoconfigure` (actuator endpoint가 leaf로 왔으니 필연) |
| **제거** | `test` 레인의 `excludeTags 'httpclient-fault'` (fault 테스트가 소스셋으로 분리됐으므로 불필요) |
| **문서** | httpclient `CLAUDE.md`, `docs/httpclient/repository-adaptation.md`의 composition 소유권 문장 갱신 |
### 7.2 세 갈래 판정: 사라진 것 / 중복된 것 / 커밋하면 사라질 것
**(a) 양쪽에 다 없는 것 = 진짜 손실: 없다.**
파일 단위로 대조했다. tracked에서 지워진 30개 파일 전부가 untracked 쪽에 대응 파일을 갖는다(httpclient 24개, objectstorage 6개). 줄 수도 위 표대로 일치한다. **테스트는 한 줄도 사라지지 않았다.** `test` 소스셋 줄 수가 10,449 → 6,973으로 줄어 보이는 것은 소스셋 분할의 착시다(§1).
**(b) 양쪽에 다 있는 것 = 중복 조립 / 빈 충돌: 없다.** — 확인함.
- `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/` : **파일 0개**(빈 디렉터리만 남음). test 쪽도 0개.
- `app-bootstrap`의 `META-INF/spring/...AutoConfiguration.imports` 5줄에 httpclient 항목 **없음**(fileserver, jpa, messaging, activation, notification만).
- `app-bootstrap/src/main/java` 전체에서 `httpclient` 문자열 grep **0건** — spec의 "app-bootstrap must not import HTTP-client implementation or auto-configuration types"(`:25`)와 plan 항목 12가 실제로 지켜졌다.
- 따라서 같은 빈이 두 번 등록되는 충돌은 없다. **C1은 중복 등록 문제가 아니라, 남은 한 벌이 게이트 바깥에서 스캔된다는 문제다** — 성격이 다르다.
**(c) `git add` 없이 커밋하면 진짜로 사라지는 것: capability 전체.**
이게 가장 큰 운영 리스크다. 지금 상태에서 `git commit -a`(= tracked만)를 하면:
- httpclient 조립 코드 1,466줄 + 조립 테스트 1,004줄 + `AutoConfiguration.imports`가 **양쪽 다 없어진다.** 구 위치는 삭제가 커밋되고 신 위치는 untracked라 커밋되지 않는다. 결과는 "HTTP 클라이언트 플랫폼이 어떤 Spring 컨텍스트에서도 조립되지 않는" 상태 — 컴파일은 되고(leaf 내부는 자족적) 런타임에 capability가 통째로 증발한다.
- 동시에 `build.gradle`의 `sourceSet('integrationTest')` 선언은 커밋되는데 그 소스셋의 파일 4개(httpclient 2, objectstorage 4 = 6개)는 안 커밋된다 → `httpClientFailureInjectionTest` / `objectStorageMinioContractTest` / `objectStorageMinioFaultTest` 레인이 **빈 소스셋을 실행**한다. 이 레인들은 `failOnNoDiscoveredTests`를 갖고 있으므로(`httpclient/build.gradle:150-155` 주석이 그 속성을 잃었던 사고를 기록) 빨간불로 죽는다 — 조용히 초록이 되는 것보다는 낫지만, objectstorage의 `strictQualification.register(...)`가 같은 보호를 갖는지는 확인하지 못했다.
- `adapter/outbound/support`의 `StrictSettingsBinder`도 untracked인데, httpclient·fileserver의 구 복제본은 tracked 삭제다 → **컴파일 자체가 깨진다.**
즉 이 워킹트리는 `git add -A`가 아니면 안전하게 커밋할 수 없다. 리뷰 시점에 이걸 명시해 두는 것이 이 절의 실질적 가치다.
### 7.3 판정
**이동 자체는 옳고, 유지보수 부담을 실제로 줄였다.** 근거:
- Docker가 필요한 테스트를 `test` 소스셋 밖으로 빼서 "Docker 없는 노트북에서 `test`가 빨간색"을 제거했다.
- Testcontainers를 `testFixtures`에서 떼어내 픽스처 변형의 컴파일 표면을 줄였다.
- objectstorage의 두 qualification 소스셋을 하나로 합친 근거(`build.gradle:22-24`: "MinIO/Testcontainers exercises are one physical INTEGRATION runtime. Contract/fault are qualification meanings over that source set, not separate test kinds")는 정확한 진단이다.
- `StrictSettingsBinder` 통합은 실제 중복 제거다 — fileserver와 httpclient가 같은 핸들러·같은 `orElseThrow`를 prefix만 바꿔 복제하고 있었다(`StrictSettingsBinder.java:26-32`).
- 조립을 leaf가 소유하는 방향도 맞다. `app-bootstrap`이 httpclient 지식 1,466줄을 들고 있던 것보다 낫고, `repository-adaptation.md:29`의 갱신된 근거("Capability-specific Spring composition is owned with the reusable HTTP client platform")도 타당하다.
**그런데 이동이 자기가 옮긴 것의 전제를 깨뜨렸다.** `bootstrap.autoconfigure.*`는 컴포넌트 스캔 제외 정규식이 이미 덮고 있던 **안전한 자리**였고, `adapter.outbound.httpclient.autoconfigure`는 덮이지 않은 자리다. 정규식 한 줄이 같이 옮겨가지 않았다(C1).
이걸 몰랐다고 보기 어렵다:
- `HttpClientPlatformAutoConfiguration.java:20-23` javadoc이 바로 이 위험을 설명한다 — "component scanner finds each child on its own — so the children had to leave the scan together with the switch."
- `CaSkeletonApplication.java:93-97` javadoc이 다른 capability에 대해 똑같은 실패 모드를 이미 기록하고 있다 — "a component scan finds them regardless — so an all-off or partially configured deployment failed to start on an unsatisfied dependency."
- spec `:21`은 off 상태 보장을 명시적으로 약속하고, plan `:10`은 그걸 증명했다고 체크돼 있다.
**세 문서가 전부 있었는데 정규식 한 줄이 빠졌고, 그걸 잡을 수 있는 테스트는 계획에 없었다.**
이건 "삭제가 안전망을 잘랐다"가 아니라 **"이동이 안전망의 좌표를 무효화했고, 이동을 검증한 테스트가 좌표를 볼 수 없는 종류였다"**는 사고다. 그리고 같은 패턴이 이 워킹트리에 9개 더 있다 — `2026-09-18-*-composition-ownership` 스펙이 jpa, mongo, notification, postgresql-idempotency에 대해 같은 이동을 하고 있다. **이 리뷰의 C1은 httpclient 한 건이지만, 검토해야 할 것은 그 4개 슬라이스 전부와 `AUTO_CONFIGURED_PACKAGES` 목록의 동기화 여부다.** (그 leaf들은 내 담당이 아니므로 교차 이슈로만 남긴다.)
**그리고 두 슬라이스의 접합부가 비었다.** `secret-source-port-ownership`이 같은 날 `SecretSourcePort` + `EnvironmentSecretSource`를 만들었는데, `httpclient-capability-composition-ownership`은 자기 시크릿 해석을 여전히 "항상 던지는 `Function<String,String>`"으로 옮겨 왔다(H6). 두 계획서 어느 쪽에도 상대를 참조하는 항목이 없다.
---
## 8. 템플릿 사용자 관점
### 8.1 fork 직후 실제로 겪을 일
1. **아무것도 안 해도 C1에 걸린다.** `APP_HTTPCLIENT_ENABLED`는 기본 false고, `app-bootstrap`은 이 leaf에 의존한다. 기동이 실패하면 스택트레이스는 `httpClientRuntimeRegistry`를 가리키고, 사용자는 자기가 쓰지도 않는 capability의 빈 이름을 보게 된다. 첫 대응은 십중팔구 "`APP_HTTPCLIENT_ENABLED=true`로 켜 본다"가 될 텐데, 그러면 이번엔 `HTTPCLIENT_ACTIVE_WITHOUT_CLIENTS`로 죽는다(`HttpClientPlatformSettings.java:51-61`). 즉 **켜도 죽고 꺼도 죽는** 구간에 들어간다. 탈출구는 `clients[0]` 전체를 선언하거나 leaf 의존을 제거하는 것.
2. **httpclient를 실제로 쓰려면 프로필 하나에 최소 이만큼을 써야 한다** (프로덕션 프로파일 기준, `ClientProfileValidator.validateProductionCompleteness` `:266-280` + `validateTarget` `:34-63`):
- `name`, `base-url`(https, userinfo/query 금지), `allowed-hosts`(비면 프로덕션 거부), `allowed-ports`
- `request.max-body-bytes`(기본 0은 프로덕션 거부)
- `tls.profile-id`(프로덕션 필수)
- `retry.policy`와 `retry.max-attempts`가 **서로 모순이면 거부**(`:246-263`) — `policy: none`인데 `max-attempts: 3`이면 죽는다
- 환경변수로 쓸 거라면 `docs/httpclient/env-fields.yaml`의 179줄짜리 템플릿 표를 봐야 한다. `APP_HTTPCLIENT_` 접두사 변수 중 그 표에 없는 것은 **기동을 막는다**(`HttpClientEnvironmentKeys.rejectUnrecognised`). 오타 방어로는 훌륭하지만 첫 배포에서 여러 번 튕길 것이다.
3. **typed client 하나 만드는 데 필요한 것** (`ServiceOperationDescriptorScanner` 규칙 전수):
- 인터페이스에 `@HttpClientProfile("name")` 필수
- 모든 메서드에 `@HttpExchange` + `@HttpOperationPolicy(name=..., idempotency=...)` 필수 (idempotency에 기본값 없음)
- 연산명 중복 금지, 인터페이스는 **전부 블로킹이거나 전부 리액티브**
- `IDEMPOTENCY_KEY_REQUIRED`면 `@RequestHeader("Idempotency-Key")` 파라미터 필수
- `retryPolicy != "none"` + `NON_IDEMPOTENT` 조합 금지
이 규칙들은 전부 startup failure다. 배우는 비용이 있지만 각 규칙에 실패 사례 근거가 javadoc에 적혀 있어 납득 가능하다.
4. **objectstorage는 fork 후 손을 대야 쓸 수 있다.** 부트스트랩 의존이 없으므로 `modules.json`의 `app-bootstrap.allowed_dependencies` + `app-bootstrap/build.gradle` + `config/objectstorage.yml`을 직접 추가해야 한다. `modules.json`은 fail-closed라 순서를 틀리면 `settings.gradle`에서 막힌다. 그다음 `app.object-storage.providers/destinations`를 손으로 써야 하는데, 이건 `enabled: true` 한 줄로 되는 구조가 아니다 — `provider.type`, `provider.version`(정확한 토큰), `root` 또는 `s3.*` 블록, `destinations.<id>`의 `provider-ref`/`route-token`/`binding-revision`/`policy-revision`/`operation-profile`, 그리고 S3면 `capability-profiles`의 증거(digest·observedAt·validUntil·identity)까지 전부 필수다. **첫 성공까지 가장 먼 leaf다.**
5. **`filesystem-local-dev`는 prod에서 거부된다**(`ObjectStorageBindingCompiler.java:126-128`). 로컬에서 되던 게 prod에서 안 되는 정상적 실패지만, 대안(S3 제공자)은 readiness 카드가 없다(M2). 즉 **문서상 "프로덕션에 써도 된다"고 선언된 오브젝트 스토리지 제공자가 하나도 없다.**
### 8.2 손대야 하는 파일 (최소 경로)
| 목적 | 파일 |
|---|---|
| C1 우회 | `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/CaSkeletonApplication.java:99` (제외 정규식) |
| httpclient 켜기 | `src/app-bootstrap/src/main/resources/config/httpclient.yml` + 배포 환경변수 |
| httpclient 프로필 작성 참고 | `docs/httpclient/configuration-reference.md`, `docs/httpclient/env-fields.yaml` |
| objectstorage 편입 | `src/config/architecture/modules.json`, `src/app-bootstrap/build.gradle`, 새 `config/objectstorage.yml` |
| objectstorage readiness 갱신 | `docs/registries/object-storage-readiness.yaml` + `test/.../readiness/ObjectStorageReadinessRegistryTest.java:23` |
| 레거시 objectstorage 탈출 | `src/sample-portfolio/src/main/resources/application.yml:318-323` |
### 8.3 밟게 될 지뢰 요약
- **fork 시점 자체가 위험하다**: 지금 워킹트리를 `git commit -a`로 커밋하면 httpclient capability 조립 2,470줄이 양쪽 다 사라지고 support의 `StrictSettingsBinder`가 없어 컴파일이 깨진다(§7.2-c). fork 전에 `git status`로 untracked 175개를 반드시 확인해야 한다
- C1 (기동 실패, 기본 설정)
- 인증을 쓰는 프로필은 기동 성공 후 **첫 호출**에서 "no http client secret resolver is configured"로 터진다 (H6)
- 리액티브 프로필을 고르면 브레이커·리미터·벌크헤드·total-call 데드라인이 조용히 사라진다 (H1/H2)
- `http.client.requests` 대시보드가 영원히 0 (H3)
- 아웃바운드 호출에 trace/correlation이 안 실리고, 애플리케이션에서 넣을 수도 없다 (H4)
- dynamic target 정책만 선언하면 기동은 되고 첫 호출에서 터진다 (H5)
- 브레이커가 저트래픽 업스트림에서 절대 안 열린다 (M3, Resilience4j 기본 minimumNumberOfCalls=100)
- objectstorage는 부트스트랩에 없다 (M1)
- **S3로 배포하면 실 스토어 검증이 0인 코드 3,581줄 위에 서게 된다** (H7). MinIO는 저장소 자신의 측정으로 `UNSUPPORTED`이고, AWS는 한 번도 돌려본 적이 없다
- SSRF 방어의 마지막 한 칸(검증된 IP로 소켓 고정)이 테스트 참조 0건이다 (H8)
- 프록시 설정은 게이트웨이를 통해 한 번도 검증되지 않았다 (L9)
---
## 9. 미확인 / 가정
### 빌드 미실행으로 확인 못 한 것
| 항목 | 확인 명령 | 기대 |
|---|---|---|
| **C1 (최우선)** | `cd src && ./gradlew :app-bootstrap:systemTest --tests '*FiveAdapterOffInventoryTest*' --console=plain` | `@BeforeAll`에서 `UnsatisfiedDependencyException: httpClientRuntimeRegistry` → C1 확정. 초록이면 내 추론이 틀렸고 스캐너가 그 패키지를 건너뛴 이유를 찾아야 함 |
| C1 보조 | `cd src && ./gradlew :app-bootstrap:bootRun --args='--spring.profiles.active=local'` (기본 env) | 위와 동일한 실패가 나면 확정 |
| H1/H2 | 리액티브 프로필로 502를 반복 반환하는 MockHttpServer에 호출 → `http.client.circuit.state` 게이지가 항상 0인지, `totalCall`을 넘겨도 호출이 지속되는지 | 현재 이를 단언하는 테스트 없음 |
| H3 | `cd src && ./gradlew :adapter:outbound:httpclient:test --tests '*DefaultGenericHttpGatewayTest*' --console=plain` 후 `SimpleMeterRegistry`에 `http.client.requests`가 있는지 수동 확인 | 없을 것으로 예상 |
| M5 | `cd src && ./gradlew :app-bootstrap:dependencies --configuration runtimeClasspath \| grep -iE 'jetty\|httpclient5\|reactor-netty'` | 세 개 모두 존재 예상 |
| H6 | 인증 프로필(`authentication.type=STATIC_BEARER` + `secret-reference`)로 한 번 호출 | `CapabilityStartupValidationException: no http client secret resolver is configured for reference '...'` 예상. 이 실패를 단언하는 테스트가 현재 없음 |
| §7.2-c | `cd src && git status --porcelain \| grep '^??'` 로 untracked 175개 확인 후 `git add -A` 없이 커밋했을 때 `./gradlew :adapter:outbound:support:compileJava`가 깨지는지 | 깨질 것으로 예상 |
| 전체 | `cd src && ./gradlew :adapter:outbound:httpclient:check :adapter:outbound:objectstorage:check --console=plain` | 두 leaf의 현재 상태(커밋 안 된 변경 포함)가 초록인지 자체가 미확인 |
### 세운 가정
1. **Spring 컴포넌트 스캔 동작**: `@Configuration(proxyBeanMethods=false)`는 `@Component` 메타애노테이션을 통해 `ClassPathBeanDefinitionScanner` 기본 필터에 잡힌다. `AutoConfigurationExcludeFilter`는 `AutoConfiguration.imports`에 등재된 클래스만 제외한다. C1 전체가 이 가정 위에 있다. (Spring Framework/Boot의 문서화된 동작이고 `CaSkeletonApplication.java:93-97` javadoc이 같은 이해를 전제한다.)
2. **Resilience4j 기본값**: `CircuitBreakerConfig.ofDefaults()` = failureRate 50% / slidingWindow 100 / minimumNumberOfCalls 100 / wait 60s, `RateLimiterConfig.ofDefaults()` = 50 permits / 500ns / timeout 5s. M3의 구체 수치가 여기 의존한다. 코드에서 재정의하는 곳은 없음(확인함).
3. **Spring Boot 기본 multipart 제한** 1MB — L3의 완화 근거. 저장소 어디에도 `spring.servlet.multipart.*` 설정이 없음(전수 grep 확인).
4. **`ClientHttpRequestFactoryBuilder.detect()` 우선순위** Apache HC5 > Jetty > Reactor Netty > JDK — M5의 부작용 주장 근거. Boot 3.4+ 동작이며 Boot 4.0.8에서 동일하다고 가정.
5. ~~미독 소스셋 가정~~ — **철회한다.** 테스트 166파일 17,748줄을 전부 전문 읽었고, 그 결과 H7(구 M2)이 M→H로 올라갔고 H8·H9·L9·L10이 새로 나왔다. 즉 이 가정은 틀렸었다. 이제 두 leaf에서 읽지 않은 소스 파일은 0개다(§1).
6. ~~testFixtures 가정~~ — **철회한다.** 34개 전부 읽었다. `HttpClientModuleBoundaryTest`의 본문도 확인했고, 다만 픽스처가 전송 제공자를 **무인자 생성자**로 만들어 DNS 핀·TLS 자재를 배선하지 않는다는 사실이 새로 드러났다(H8).
7. **§7.0의 줄 수 대조는 `full.diff`의 `-`/`+` 라인 수와 `untracked-wc.txt`의 `wc -l` 값을 직접 비교한 것**이다. diff의 삭제 줄 수는 파일 전체 줄 수와 같다(전체 삭제이므로). 파일 내용이 바이트 단위로 같은지는 `HttpClientPlatformActivationTest`에 대해서만 실제로 대조했고, 나머지 29개는 줄 수 일치 + 스냅샷 본문 독해로 동일성을 판단했다 — 완전한 바이트 대조는 아니다.
8. **`objectstorage`의 `strictQualification.register(...)`가 `failOnNoDiscoveredTests`를 갖는지 확인하지 못했다**(§7.2-c). `src/build-logic`의 해당 확장은 다른 에이전트 영역이라 읽지 않았다.
9. **`ApplicationContextRunner`가 컴포넌트 스캔을 수행하지 않는다**는 것 — §1.2(Q2)의 결론이 이 가정 위에 있다. 러너는 `withConfiguration`/`withUserConfiguration`으로 넘긴 클래스만 등록하는 컨텍스트를 만들고, `@ComponentScan`이 달린 클래스를 넘기지 않는 한 스캔이 일어나지 않는다. 9개 파일의 본문을 확인했고 어디에도 `@ComponentScan`이 달린 설정 클래스를 넘기는 곳이 없다.
### 의도적으로 판정하지 않은 것
- `gradle.lockfile` 2개(751줄 변경), 의존성 버전, CI 워크플로 — 다른 에이전트 담당.
- `fileserver`/`notification` leaf 내부 — §10 참조.
---
## 10. objectstorage vs fileserver — 중복인가 분담인가
**분담이다. 다만 경계가 문서에 적혀 있지 않고 포트 이름에서 추론해야 한다.**
`modules.json`에서 둘은 형제고 허용 의존이 동일하다(`application-core`, `shared-contract`). 서로를 의존하지 않는다. 구분은 **application-core의 포트 패키지**에서 드러난다:
- `application/objectstorage/port/**` — `ManagedObjectPublicationPort`, `ObjectInspectionPort`, `ObjectTransferPort`, `ObjectRetirementPort`, `ObjectOperationResolutionPort`, `StagedObjectPublicationPort`, `DirectObjectUploadPort`, `DirectObjectDownloadGrantPort`, `DirectMultipartUploadPort`, `ObjectScanMaintenancePort`. 어휘가 전부 **바이트·버전·다이제스트·보존·스캔**이다. `ObjectReference`/`ObjectVersionToken`/`ObjectContentIdentity`가 1급이고, 파일명·확장자·MIME 협상 같은 개념은 없다(`ObjectMediaType`만 있고 그것도 불투명 토큰).
- `application/fileserver/**`, `application/filepublication/**`, `application/fileexport/**` — 별도 포트군. (내부는 다른 에이전트 담당이라 열지 않았다.)
즉 objectstorage는 **"불변 바이트 덩어리의 저장·검증·수명주기"** 계층이고, fileserver는 그 위에서 **"파일이라는 사용자 개념의 게시·전송"** 계층이다. objectstorage의 포트는 파일을 모르고 fileserver는 S3 API를 모른다.
중복이 아니라고 판단하는 결정적 근거는 **objectstorage 포트에 "이 오브젝트를 URL로 서빙한다"는 개념이 전혀 없다**는 점이다. presigned 그랜트조차 `DirectUploadGrant`/`DirectDownloadGrant`라는 **불투명 bearer 자재**를 반환할 뿐, 경로나 파일명을 만들지 않는다.
다만 두 가지를 지적한다. (a) 이 분담은 `objectstorage/README.md`나 `CLAUDE.md` 어디에도 문장으로 적혀 있지 않아서, fork 사용자가 "파일 업로드를 어느 쪽에 붙여야 하나"를 포트 시그니처를 읽어서 스스로 결론 내야 한다. (b) 현재 `app-bootstrap`은 fileserver만 의존하고 objectstorage는 의존하지 않으므로(M1), **실제 배선상으로는 fileserver가 단독으로 존재**한다 — 분담 구조가 설계에만 있고 컴포지션에는 없다. 루트 `CLAUDE.md`의 Module families 표에 한 줄(`adapter:outbound:objectstorage` = 바이트 계층, `adapter:outbound:fileserver` = 파일 계층)을 추가하는 것이 가장 싼 해결이다.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,997 @@
# [영역] 컴포지션 루트 (app-bootstrap) / 샘플 소비자 (sample-portfolio) / 런타임 토글 계약 리뷰
- 스냅샷: 2026-09-18T11:50Z / HEAD 60b6a319 + 커밋 안 된 변경 224파일
- 담당 leaf: `app-bootstrap`, `sample-portfolio` (`src/config/architecture/modules.json`)
---
> **정정 이력**: 초판은 `git diff HEAD`(tracked만)를 근거로 썼다. 코디네이터가 untracked 175파일 **+21,270줄**이 diff에 안 보인다는 사실과, 오늘(2026-09-18) 날짜 spec/plan 21개가 **이 영역을 주제로** 작성돼 있다는 사실을 알려왔다. 전부 읽고 §1·§3·§5·§7·§8·§9를 고쳤다. 판정이 바뀐 곳은 §3.2(토글 3형태), §7(리팩토링 판정), §8.0(test:main 비율)이고, C1은 **강화**됐다.
## 0. 최종 적용 기준
`app-bootstrap`은 composition root이지 capability implementation container가 아니다. entry point, 공통
`Clock`/runtime environment/observability, selected dependency, cross-capability validation을 남기고
Redis/JPA/HTTP Client/Notification/Fileserver provider Bean graph는 owner leaf로 이동한다.
죽은 bootstrap config를 중앙 `.imports`에 일괄 추가하는 처방은 적용하지 않는다.
## 0-A. 2026-09-21 중간 재검증
**상태: 일부 ownership 이전은 성공했지만 `app-bootstrap`은 아직 최종 composition root가 아니다.**
좋아진 점:
- JPA/Mongo/HTTP Client/Notification/Messaging/Redis SDK 등 여러 leaf가 자기
`AutoConfiguration.imports`를 갖는다.
- production composition을 보는 `systemTest`/architecture contract가 추가됐다.
- `:sample-portfolio:check`와 `:app-bootstrap:architectureCheck`가 재검증 PASS했다.
남은 핵심 문제:
1. **선택 capability를 여전히 `implementation`으로 기본 ship한다.**
Mongo, generic Messaging starter, Redis, Notification, Fileserver, HTTP Client, GraphQL 등이
`app-bootstrap/build.gradle`의 기본 runtime module set에 남아 있다.
2. **build file 주석이 정본과 충돌한다.**
“shipped so an operator can enable it with one environment variable”,
“off is a switch rather than omission”이라는 설명이 여전히 존재한다.
3. **bootstrap이 provider implementation을 직접 조립한다.**
점검 시점 main Java의 `dev.caskeleton.adapter.*` 직접 import는 120건이며 Fileserver가 가장 크다.
`autoconfigure/fileserver` 28개, Redis 10개, JPA 13개, Outbox 7개 등 provider/composition code가
bootstrap에 남아 있다.
4. root `AutoConfiguration.imports`도 `FileserverPlatformAutoConfiguration`,
`PersistenceJpaRootAutoConfiguration`, `RedisCapabilityConfig`, `OutboxConfig`,
`DistributedLockConfig`, `IdempotencyProviderSelectionConfig`, `TracingConfig` 등을 계속 소유한다.
120건 전부가 잘못이라는 뜻은 아니다. composition root가 adapter port를 연결하며 일부 타입을 보는 것은
가능하다. 하지만 현재 수치와 파일 분포는 “selected capability + cross-capability validation만 남긴다”는
`0의 목표에 아직 도달하지 못했다는 강한 증거다.
**완료 조건은 leaf `.imports` 파일의 존재가 아니라, 사용하지 않는 capability가 application artifact에서
빠질 수 있고 bootstrap이 provider 내부 Bean graph를 직접 만들지 않는 상태다.**
## 0-B. 2026-09-23 재검증
**판정: 아직 더 봐야댐. 현재 bootstrap gate 자체가 red이고 Phase 2 blocker가 직접 검출됐다.**
현재 실측:
adapter direct imports: 121 imports / 37 files
fileserver autoconfigure: 28 classes
jpa autoconfigure: 13 classes
redis autoconfigure: 10 classes
outbox autoconfigure: 7 classes
`app-bootstrap/build.gradle`의 optional capability도 여전히 대부분 `implementation`이다. 이번 diff에서는
`application-notification`, `application-fileserver`, `redis-runtime` 같은 dependency가 더 추가됐지만
Build Composition에서 capability가 빠질 수 있게 된 것은 아니다.
현재 `:app-bootstrap:architectureTest`의 실패는 이를 직접 증명한다.
`PersistenceJpaRootAutoConfiguration`이 persistence leaf 내부
`PersistenceJpaLeafReadyAutoConfiguration`을 `@AutoConfiguration(after=...)`로 이름 짓고 있어
“bootstrap은 persistence export surface만 사용한다” rule을 위반한다.
또 `:app-bootstrap:test`에는 두 실패가 있다.
- Redis composition unit test가 실제 Redis 연결을 시도해 hermetic test contract를 깨뜨림.
- mandatory auth/authz error code 3개가 runbook coverage에서 누락됨.
따라서 현재 bootstrap은 “대부분 끝난 뒤 마무리” 단계가 아니라 **composition ownership을 아직 닫는
중간 단계**로 봐야 한다.
## 1. 커버리지
**총 706파일 (app-bootstrap 427, sample-portfolio 279) 중 전문(全文) 통독 78파일 + 2차로 spec/plan 21개와 untracked 인벤토리 2개 추가 통독, 나머지는 전량 열거 + 구조 스캔(패키지/애노테이션/빈 선언/테스트 메서드명)으로 처리했다.** 빌드는 실행하지 않았다(브리프 금지 + wrapper jar 부재).
### 2차 조사에서 추가로 읽은 것
- `evidence/untracked-files.txt`(175파일), `untracked-wc.txt`(+21,270줄) — leaf별 집계 완료
- `docs/superpowers/specs/2026-09-18-*.md` **8개 전문** — notification / httpclient / jpa / mongo / postgresql-idempotency / secret-source / test-architecture-phase2 / startup-failure-log-context-state. messaging-platform-bridge와 outbox-transport-only-cutover는 앞부분만(메시징 담당 영역)
- `docs/superpowers/plans/2026-09-18-*.md` 10개 — 전부 짧아 통독
- `adapter/outbound/support/CapabilityStartupValidationException.java`, `StartupFailureExceptionReporter.java`
- 저장소 전체 `AutoConfiguration.imports` / `spring.factories` **17개 전량**
### 1차 조사에서 전문 통독한 것 (78)
| 범주 | 파일 수 | 비고 |
|---|---|---|
| app-bootstrap 리소스 전부 | 20 | `application.yml`, `application-{local,dev,prod}.yml`, `config/*.yml` **15개**, `META-INF/spring.factories`, `*.imports` 2개 |
| app-bootstrap main java | 35 | `CaSkeletonApplication`, `activation/*` 전부(6), `runtime/*` 전부(14), `runtime/startup/` 주요(5), `autoconfigure/{jpa(8),redis(6),outbox,idempotency(3),lock,messaging}` |
| app-bootstrap test/arch/system | 14 | `StartupSafetyValidatorTest`, `ArchRuleDiscoveryContractTest`, `CompositionRootBoundaryArchitectureTest`, `DisabledAdapterArchitectureTest`, `ProductionClassImportOption`, `ShippedConfiguration`, `AdapterActivationInventory`, `FiveAdapterOffInventoryTest`, `ShippedCompositionHarness`, `DefaultProfileBootCharacterizationTest`, `ConditionalTransportCompositionContractTest` 외 |
| 빌드 계약 도구 | 5 | `EnvContractVerifier`, `VerifyEnvKeysTask`, `ConfigContractPlugin`, `ConditionalTransportQualificationPlugin`, `VerifyCleanArchitectureDependenciesTask`, `ArchitecturePlugin` |
| sample-portfolio | 8 | `build.gradle`, `application.yml`, `SamplePortfolioApplication`, `SamplePublicAccessSecurityConfig`, `TestEnclosedConfigurationFilter`, `spring.factories`, `README`/`CLAUDE.md` 발췌 |
| 레지스트리 | 3 | `env-keys.yaml`(343행 파싱), `modules.json`, `compose-profile-contracts.json`(15 lane 파싱) |
### 3차 조사 — 코디네이터 지적으로 추가 통독한 것
- **`bootstrap/autoconfigure/` 패키지 58파일 5,364줄 — 전량 확인 완료.** 이제 C1의 수정 범위를 클래스별로 판정할 수 있다(§5 C1 표). fileserver 6파일은 `@Bean`/`@Conditional` 인벤토리(각 24/31, 12/13, 18/19, 3/3, 2/1개)와 `@AutoConfiguration`+마스터 스위치+`@Import` 6개 체인을 확인했고, **이 체인이 C1이 빠뜨린 정답 패턴이라는 것이 이번 통독의 성과다.**
- **ArchUnit 대형 룰 5개의 룰 선언·스코프·`@AnalyzeClasses` 인자 전량** — 5개 모두 `@AnalyzeClasses(packages = "dev.caskeleton", importOptions = ProductionClassImportOption.class)`이고, 각 룰의 `resideInAPackage(...)` 스코프를 전부 뽑아 대조했다. M4의 근거가 여기서 확정됐다.
- **systemTest 8파일 전량 + `ShippedRuntimeFacadePresenceTest`·`PortResolutionContractTest`** — `DependencyErrorStartupContractTest:21-23`의 "five classes green in their own tests and present in no running application" 문장이 C1의 결정적 맥락이다.
- **spec/plan 21개** (§1 2차 조사 목록).
### 4차 조사 — 전수 완료
**`app-bootstrap` 비-main 269파일 27,216줄, `sample-portfolio` main 201파일 9,387줄 / 비-main 62파일 6,625줄 — 전량 분류·검사 완료.** 초판의 "약 140개는 전부 단위 테스트일 것"이라는 추정을 **세어서 확정**했다.
#### app-bootstrap 비-main 269파일 하네스 분류 (실측)
| 유형 | 파일 | 배포 조립을 관측할 수 있는가 |
|---|---:|---|
| **PLAINUNIT** (Spring 컨텍스트 없음) | **145** | 불가 |
| **ARCHUNIT** (`@AnalyzeClasses`/`ClassFileImporter`/fixture) | **37** | 불가 — 바이트코드만 읽고 컨텍스트를 안 만든다 |
| **RUNNER** (`ApplicationContextRunner`) | **36** | **불가 — `spring.factories`도 `AutoConfiguration.imports`도 읽지 않는다** |
| **FILETEXT** (yml/json/md를 텍스트로 읽음) | **24** | 불가 |
| **MOCKENV** (`MockEnvironment`) | **11** | 불가 |
| **SHIPPED** (`ShippedCompositionHarness`) | **8** | **가능 — 이것뿐이다** |
| **SPRINGBOOTTEST** | **6** | 불가 (아래) |
| **SPRINGAPP** (`SpringApplication*`) | **2** | 불가 (아래) |
| 합 | **269** | |
#### 배포 루트를 실제로 기동하는 것 — repo 전체에서 **단 하나의 경로**
`grep -rl "CaSkeletonApplication"`을 비-main 전체에 돌린 결과, `new SpringApplicationBuilder(CaSkeletonApplication.class)`는 **`ShippedCompositionHarness.java:76` 한 곳뿐**이다. 그 하네스를 쓰는 테스트 클래스 **7개**가 배포 조립을 관측할 수 있는 전부다.
**탈락한 후보를 하나씩 확인했다** — 이름만 보면 될 것 같은 8개가 전부 아니다:
| 파일 | 실제 부팅 대상 | 판정 |
|---|---|---|
| `TracingActivationContextTest:26-27` | `classes = MinimalTracingApp.class` (로컬 중첩 클래스) | 슬라이스 |
| `ActuatorSecurityHttpTest:40-41` | `classes = MinimalActuatorApp.class` | 슬라이스 |
| `FileserverCompositionIntegrationTest:90-91` | `classes = FileserverRuntime.class` + `spring.config.name=fileserver-round-trip` | 슬라이스 |
| `OperationalContractRuntimeTest:42` | `@WebMvcTest(CaSkeletonApplication.class)` — **웹 슬라이스**라 web 계열 auto-config만 처리 | 슬라이스 |
| `RedisReadinessGroupPostProcessorTest:78` | `new SpringApplicationBuilder(HealthContext.class)` — **`app.redis.enabled=true`를 켜는 유일한 실컨텍스트인데 로컬 클래스다** | 슬라이스 |
| `AsyncGracefulShutdownBehaviorTest:36-46` | `AnnotationConfigApplicationContext` (Javadoc이 `@SpringBootTest`를 **쓰지 않는 이유**를 설명) | 수동 컨텍스트 |
| `PrivacySettingsTest:29` / `StartupFailureExceptionTest:11` | `@SpringBootTest`·`SpringApplication.run`이 **주석에만** 등장 | 해당 없음 |
#### 그 7개가 각각 보증하는 것 (전문 통독 완료)
| 테스트 | 인자 | 보증 |
|---|---|---|
| `DefaultProfileBootCharacterizationTest` | `requiredOperatorInputs()` | local/dev가 출하 기본값으로 기동. prod는 verify-full 없는 JDBC를 거부 |
| `FiveAdapterOffInventoryTest` | `allOffArguments()` | all-off에서 마스터 스위치 5개가 **빈 0개 + 이 컨텍스트가 시작한 스레드 0개** (벤더 패키지 포함) |
| `GraphQlShippedAndGatedTest` | `allOffArguments()` + 실제 포트 | `/graphql`이 **정의된 적 없는 경로와 구별 불가**. 빈 단정으로는 못 잡는 Spring GraphQL 자체 auto-config를 실 HTTP로 검증 |
| `StartupWarningZeroTest` | `allOffArguments()` | all-off 기동에서 WARN/ERROR **0건**, allowlist 없음 |
| `MasterSwitchEnvironmentPostProcessorTest` | `allOffArguments()` + 오타/구키 | `ture` 거부·구키가 대체키를 지명·**꺼진 어댑터가 자기 malformed 설정 옆에서 기동** |
| `DependencyErrorStartupContractTest` | `allOffArguments()` − 대상키 | 능력 의존 거부가 **정확한 스위치 이름을 말한다**. all-off는 여전히 기동(무조건 거부가 아님을 증명) |
| `LogProfileDriftCharacterizationTest` | `requiredOperatorInputs()`, dev | 로거 컨텍스트 프로파일 = 해석된 프로파일 (**의도적 red 특성화**) |
**7개 전부가 `allOffArguments()` 또는 `requiredOperatorInputs()`로 돈다. 능력을 켜는 것이 하나도 없다.** `allOffArguments()`(`ShippedCompositionHarness:97-109`)는 9개 값을 전부 off/disabled로 명시한다.
→ **§5 C1의 "269개 중 C1을 잡을 수 있는 테스트가 하나도 없다"는 이제 추론이 아니라 전수 조사 결과다.** 관측 가능한 하네스가 8개(7 테스트 + 1 하네스)뿐이고, 그 7개가 무엇을 인자로 주는지 전부 읽었다.
#### sample-portfolio 비-main 62파일 6,625줄 분류
PLAINUNIT 42 / `@WebMvcTest` 슬라이스 6 / `@SpringBootTest`(로컬 App 클래스) 5 / Testcontainers 5 / `ApplicationContextRunner` 2 / **`SamplePortfolioApplication` 기동 1**(`SampleApplicationContextTest:31-33`). 그 하나도 단정은 `contextLoads` + Flyway V2 적용 확인 2개뿐 — **빈 조립은 검사하지 않는다.**
### 여전히 못 읽은 것 — 경로와 이유
전수 검사를 마친 뒤 남은 것은 **두 부류뿐이고, 둘 다 판정에 영향이 없다.**
- **ArchUnit `ArchCondition` 헬퍼 구현부 약 800줄** — `AdapterBoundary`/`ApplicationBoundary`/`TypeBoundary`/`ForbiddenApi` 4개 파일 안의 `dependOnlyOnRegisteredNotificationPackages`, `haveAip122CompliantRequestMappingPaths`, `notCallRepositoryWriteUnlessWriteRepository` 등. **M4는 영향받지 않는다** — M4의 대상인 `DisabledAdapterArchitectureTest`(124줄)는 패키지 목록과 `beGatedByAConditionalOnProperty` 조건 구현까지 **전문 통독했다**(§5 M4 확정). 그리고 이 헬퍼들의 *정확성*은 `ArchitectureViolationFixtureTest`의 negative fixture가 대신 증명한다 — 다만 그 커버리지가 55/86이다(§6 K6 단서).
- **sample-portfolio 도메인 구현 본문** — 201파일 중 `domain`(31)/`application`(84)/`adapter`(60)의 비즈니스 로직 본문. **룰 적합성은 기계적으로 전수 검사했다**(아래 H4 표): 도메인 순수성, 엔티티/DTO 배치, `@UseCaseCapability` 23/23, `@RequiresPermission` 17, ProblemDetail/RefreshScope/UUID.randomUUID/fixture 누수 0건, `@ConfigurationProperties` 명명 8/8. 위반은 **정확히 한 부류**이고 §5 H4에 있다.
## 2. 이 영역은 무엇을 하는가
README 요약이 아니라 코드에서 읽어낸 실제 책임이다.
### app-bootstrap — 4가지 일을 한다
**(1) 환경 판정을 컨텍스트 생성 *이전*에 끝낸다.** `META-INF/spring.factories:1-7`이 `EnvironmentPostProcessor` 6개를 등록한다. 순서는 `StartupOrder` 상수로 고정:
```
MasterSwitchEnvironmentPostProcessor 스위치 값이 정확히 true/false인지, 구 키와 충돌하는지
RuntimeEnvironmentProfileValidator 프로파일이 정확히 1개인지 (기본값 없음)
CapabilityDependencyEnvironmentValidator 켜진 능력의 의존이 전부 켜져 있는지
TracingSamplingEnvironmentPostProcessor 프로파일별 샘플링 기본값 주입
RedisReadinessGroupPostProcessor redis 헬스 기여자를 readiness 그룹에 append
DatabaseReadinessGroupPostProcessor db 헬스 기여자를 readiness 그룹에 append
```
이 설계의 핵심은 `CapabilityDependencyEnvironmentValidator`의 Javadoc(20-38행)이 직접 설명한다 — 같은 규칙을 `InitializingBean`으로 돌렸더니 Hibernate/Flyway가 refresh 중에 먼저 죽어서 "Connection to localhost:5433 refused"가 먼저 나왔다. 그래서 환경 단계로 옮겼고, **빈으로도 남겨뒀다**(`CapabilityDependencyStartupCheck`) — `ApplicationContextRunner`는 `spring.factories`를 읽지 않기 때문. 이건 제대로 된 판단이다.
**(2) Spring Boot 자체 auto-configuration을 후보 집합에서 제거한다.** `JpaOffAutoConfigurationImportFilter`가 `AutoConfigurationImportFilter`로 등록되어(`spring.factories:12-13`) Boot의 DataSource/JDBC/Hibernate/JPA/Flyway auto-config 10개를 이름으로 걸러낸다(24-35행). 조건은 "JPA가 꺼졌나"가 아니라 **`DataSourceRequirement.isRequired()` — 커넥션을 요구하는 능력이 하나라도 있나**다. 아웃박스·JDBC 멱등성·멀티인스턴스 락·알림 저장소·Fileserver 트랜잭션 경로가 전부 풀의 정당한 소비자이기 때문. **이게 이 저장소에서 "꺼지면 진짜 꺼진다"를 성립시키는 유일한 구조적 장치다.** `@ConditionalOnProperty`만으로는 스타터가 끌고 오는 auto-config를 막을 수 없다.
**(3) prod 안전 검증기 8개를 `SmartInitializingSingleton`으로 돌린다.** `RuntimeSafetyConfig:16-52`가 7개, `SecretSourceConfig`가 2개를 등록한다.
| 검증기 | 막는 것 | 종료코드 |
|---|---|---|
| `StartupSafetyValidator` | prod에서 error-detail/body-capture true, multi-instance 조정 빈 부재 | 71 / 72 |
| `JpaSchemaSafetyValidator` | prod ddl-auto가 none\|validate 아님 | 71 |
| `OpenInViewSafetyValidator` | OSIV true (프로파일 무관) | env-validation |
| `PostgreSqlTransportSecurityValidator` | prod pgJDBC sslmode≠verify-full, sslmode 중복/충돌 | 71 |
| `PersistenceVendorProdSafetyValidator` | prod vendor=h2 **또는** URL이 `jdbc:h2:` | 71 |
| `FlywayProdSafetyValidator` | prod에서 baseline-on-migrate / out-of-order / clean 재활성화 | 71 |
| `HikariPoolConstraintValidator` | 풀 상수 간 제약(keepalive<max-lifetime, validation<connection-timeout 등) | env-validation |
| `RuntimeNumericBoundsValidator` | 풀/스레드 수치 하한 | env-validation |
| `SecretSourceValidator` | prod에서 `__LOCAL_DEV_` 센티넬, 필수 시크릿 13개 공백 | env-validation |
| `RedisActivationValidator` | redis 꺼짐 + redis 역할 선택 모순 | 72 |
`PersistenceVendorProdSafetyValidator:18-29`의 Javadoc이 왜 **두 개**를 다 보는지 설명한다 — vendor 선택자만 맞고 URL이 H2면 PostgreSQL SQL을 인메모리 DB에 쏘고, 반대면 H2의 MERGE를 PostgreSQL에 쏜다. 그리고 H2 URL은 TLS 검증기를 조용히 통과한다. 이건 실무에서 실제로 밟는 구멍이고 정확히 막았다.
**(4) 활성화 상태를 액추에이터로 내보낸다.** `AdapterActivationEndpoint`(`@Endpoint(id="adapteractivation")`)가 마스터 스위치 5개의 해석값 + DataSource 요구 사유 + **JDBC URL scheme에서 뽑은 실제 vendor**를 반환한다. `AdapterActivationReport:17-21` Javadoc — "PostgreSQL을 띄웠는데 프로파일이 H2를 고정한 lane은 다른 필드는 전부 통과한다". 스모크 lane이 자기 입력이 아니라 애플리케이션의 답을 검사하게 만드는 설계다. 좋다.
### sample-portfolio — 두 번째 컴포지션 루트다
`SamplePortfolioApplication`(`@Configuration + @EnableAutoConfiguration + @ComponentScan("dev.caskeleton")`)은 `bootJar`를 갖는 독립 실행 애플리케이션이고(`build.gradle:192-194`), 자체 `application.yml`(323줄), 자체 `spring.factories`, 그리고 app-bootstrap 머신의 **사본 24파일 1,147줄**(`bootstrap/{tracing,idempotency,metrics,logging,security,management,persistence,context,settings,objectstorage,scan}`)을 가진다. `SampleTracingConfig`의 Javadoc(17행)이 "Sample-local copy of app-bootstrap's TracingConfig"라고 명시한다.
---
## 3. 런타임 토글 판정 — 꺼지면 정말 꺼지는가
### 3.1 토글 전수 조사 (production 컴포지션 루트 기준)
`config/*.yml` **15개**(브리프의 21개는 현재 트리와 다르다 — BOOT-008 분할 후 15개다)와 `application.yml`, `env-keys.yaml` 343행을 대조한 결과다.
**「조립 소유자」 열이 이 표의 핵심이다.** 지금 이 저장소는 능력별 Spring 조립을 app-bootstrap에서 능력 leaf로 옮기는 중이고(§7), 그 이전이 절반쯤 진행됐다. 소유자를 안 적으면 이 표는 오늘 하루짜리가 된다. 값의 뜻:
- **leaf(완료)** — 능력 leaf가 자기 `AutoConfiguration.imports`로 Boot 진입점을 발행한다. 오늘 확정됐거나 원래부터 그랬다.
- **bootstrap(정책)** — 조립은 leaf가, 배포/트랜잭션 정책만 app-bootstrap이. 이전이 끝난 정상 상태.
- **bootstrap(미이관)** — 아직 app-bootstrap 안에 조립이 있고, 2026-09-18 spec 어디에도 이전 계획이 없다.
- **framework** — Spring Boot 자체 auto-configuration.
| 능력/기술 | 토글 키 | 형태 | 기본값 | **조립 소유자** | 근거 | 꺼졌을 때 남는 것 |
|---|---|---|---|---|---|---|
| **web (HTTP)** | 없음 | — | **항상 on** | **leaf(완료)** `WebMvcPlatformAutoConfiguration` + `WebFluxPlatformAutoConfiguration` | `adapter/inbound/web/.../AutoConfiguration.imports` (2줄) | 전부. 토글 대상 아님 |
| **graphql** | `backend.graphql.enabled` + `deployment-mode` | bool + 필수 enum | `false` / `""` | **leaf(완료)** `GraphQlRootAutoConfiguration` | `adapter/inbound/graphql/.../AutoConfiguration.imports` | 클래스만(jar 동봉). import filter가 Spring GraphQL auto-config를 차단 |
| **websocket** | 없음 | **미탑재** | — | — | `build.gradle`에 main project 의존 없음(214-215행은 test 전용) | 아무것도 |
| **grpc** | 없음 | **미탑재** | — | — | 동일 + `src/optional-platforms` 별도 빌드 | 아무것도 |
| **jpa/postgres** | `ca-skeleton.persistence-jpa.enabled` | bool (MasterSwitch) | `false` | **bootstrap(정책)** — leaf `PersistenceJpaAutoConfiguration`+`PersistenceJpaRuntimeConfig`가 조립, bootstrap `PersistenceJpaRootAutoConfiguration`은 마이그레이션·OSIV·DDL·datasource 검증만 | `persistence-jpa/.../AutoConfiguration.imports`(신규, untracked) + spec `jpa-capability-composition-ownership` | **아무것도** — `JpaOffAutoConfigurationImportFilter`가 Boot auto-config 10개를 후보에서 제거. `FiveAdapterOffInventoryTest`가 빈 0 + 스레드 0을 실제 부팅으로 검증 |
| **h2** | `ca-skeleton.persistence.vendor` | enum `postgresql\|h2` | `postgresql` | **leaf(완료)** | `config/persistence.yml:24` | prod에서 h2 선택 시 기동 실패 |
| **mongo** | `ca-skeleton.persistence-mongo.enabled` + `active-profile` | bool + 필수 문자열 | `false` / `""` | **leaf(완료)** `MongoRootAutoConfiguration` — 헬스 브리지까지 오늘 이관 | `persistence-mongo/.../AutoConfiguration.imports` + spec `mongo-health-composition-ownership` | 클래스만. reactive 스타터는 `build.gradle:98-99`에서 exclude |
| **redis (전역)** | `app.redis.enabled` | bool | `false` | **분열** — SDK(클라이언트·커넥션·헬스)는 **leaf(완료)** `RedisSdkAutoConfiguration`, **의미 포트 4개는 bootstrap(미이관)** `RedisCapabilityConfig` | `cache-redis/.../AutoConfiguration.imports` vs `bootstrap/autoconfigure/redis/RedisCapabilityConfig.java:51` | 클래스만. **켜면 SDK만 뜨고 의미 포트는 안 뜬다 → §5 C1** |
| **cache** | `ca-skeleton.capabilities.cache.bindings.default` | **enum** `disabled\|redis` | `disabled` | **bootstrap(미이관)** | `config/capabilities.yml:16` | 없음 |
| **rate-limit (아웃바운드 provider)** | `ca-skeleton.capabilities.rate-limit.provider` | **enum** `disabled\|redis` | `disabled` | **bootstrap(미이관)** | `config/capabilities.yml:53` | 없음 |
| **rate-limit (인바운드 강제)** | `app.rate-limit.enabled` | bool | `false` | **leaf(완료)** `adapter/inbound/web` | `config/ratelimit.yml:9` | 없음. **on이면 `RateLimitWebConfig:37`이 `EdgeRateLimitPort` 유일성을 요구하고 없으면 빈 생성 실패** |
| **lease** | `ca-skeleton.capabilities.lease.provider` | **enum** `disabled\|redis` | `disabled` | **bootstrap(미이관)** | `config/capabilities.yml:42` | 없음 |
| **idempotency (provider=postgresql)** | `ca-skeleton.capabilities.idempotency.provider` | **enum** | `disabled` | **bootstrap(정책)** — store 생성은 leaf, provider 선택·TTL·executor 정책은 bootstrap | spec `postgresql-idempotency-composition-ownership` | — |
| **idempotency (provider=redis/jdbc)** | 동일 키 | **enum** `disabled\|jdbc\|redis\|postgresql` | `disabled` | **bootstrap(미이관)** | `config/capabilities.yml:30` | `Clock` 빈 + `@EnableScheduling` (§5 M3) |
| **messaging** | `app.messaging.enabled` + `app.messaging.broker` | bool + **선택자** | `false` / `""` | **leaf(완료)** `MessagingBridgeRootAutoConfiguration` + `MessagingPlatformRootAutoConfiguration` | 두 leaf의 `AutoConfiguration.imports` | fail-fast 센티넬 2개(`DisabledMessagingSentinelAutoConfiguration`, **bootstrap 소유·등록됨**) |
| **outbox (능력)** | `ca-skeleton.outbox.enabled` | bool | `false` | **bootstrap(미이관)** `OutboxConfig` | `config/outbox.yml:18` | 없음 — **§5 C1** |
| **outbox relay (스케줄러)** | `ca-skeleton.outbox.relay-enabled` | bool | `false` | **bootstrap(미이관)** | `config/outbox.yml:19` | 없음 |
| **outbox canonical transport** | `ca-skeleton.outbox.canonical-transport-enabled` | bool | `false` | **bootstrap(미이관)** | `config/outbox.yml:22` | 없음 |
| **notification 플랫폼** | `ca-skeleton.notification.platform.enabled` + `mode` | bool + enum `SERVING\|INGEST_ONLY` | `false` / `SERVING` | **bootstrap(정책)** — 조립은 leaf `NotificationPlatformAutoConfiguration`, 트랜잭션 경계·유스케이스는 bootstrap `NotificationApplicationCompositionAutoConfiguration` | `notification/.../AutoConfiguration.imports` + spec `notification-capability-composition-ownership` | 아무것도. `@ConfigurationPropertiesScan`에서 패키지를 **의도적으로 제외**해 settings 바인딩까지 막음 |
| **notification 레거시 provider** | `app.notification.{slack,email}.provider` | **선택자** | `""` | **leaf(완료)** | `config/notification.yml:142,144` | 라우터가 unbound 접근에 fail-fast |
| **objectstorage** | — | **production 미탑재** | — | — | `modules.json` app-bootstrap allowed_dependencies에 없음 | 아무것도. sample-portfolio 전용 |
| **fileserver (export)** | `app.fileserver.enabled` | bool | `false` | **leaf(완료)** `FileserverR2Config`/`FileExportConfig` | `config/fileserver.yml:7` | 없음 |
| **fileserver platform (HTTP)** | `app.fileserver-platform.enabled` | bool | `false` | **bootstrap(미이관)** `FileserverPlatformAutoConfiguration` + 하위 6개. spec `test-architecture-phase2` §후속 3이 이전 대상으로 지목 | `config/fileserver.yml:48` | 없음. 하위 스위치 6개는 이 스위치 아래 |
| **httpclient** | `app.httpclient.enabled` | bool | `false` | **leaf(완료·오늘)** `HttpClientPlatformAutoConfiguration` | `httpclient/.../AutoConfiguration.imports`(신규, untracked) + spec `httpclient-capability-composition-ownership` | 없음. spec이 "root auto-config가 client/pool/transport/thread/scheduler/endpoint를 하나도 안 만든다"고 명시 |
| **tracing** | `ca-skeleton.tracing.enabled` | bool | **`true`** ⚠ | **bootstrap(미이관)** `TracingConfig` | `config/observability.yml:161` | **§5 C1 — 켜져 있다고 보고하면서 Tracer가 없다** |
| **분산 락** | `ca-skeleton.runtime.multi-instance-enabled` | bool | `false` | **분열** — JDBC 구현은 **leaf(완료)** `DistributedLockPersistenceConfig`, 메트릭 데코레이터는 **bootstrap(미이관)** `DistributedLockConfig` | `config/runtime.yml:18` | 없음. **on이면 항상 기동 실패 (§5 C2)** |
| **secret source** | `ca-skeleton.secret-source.strategy` | enum `ENVIRONMENT` | `ENVIRONMENT` | **bootstrap(정책)** — port는 application-core, 구현은 support leaf, 선택은 bootstrap | spec `secret-source-port-ownership` | — |
| **openapi/swagger** | `springdoc.{api-docs,swagger-ui}.enabled` | bool | **`true`** ⚠ | **framework** | `config/observability.yml:21,23` | prod만 `application-prod.yml:34-37`에서 **플레이스홀더 없이** 고정 off |
| **로그 파일** | `ca-skeleton.logging.file.enabled` | bool | `false` | **bootstrap** (logback-spring.xml) | `config/observability.yml:116` | 콘솔만 |
| **로그 async appender** | `ca-skeleton.logging.async.enabled` | bool | **`true`** ⚠ | **bootstrap** | `config/observability.yml:127` | AsyncAppender 스레드 상주 |
| **security auth mode** | `ca-skeleton.security.auth-mode` | **enum** `jwt\|redis-session` | **`jwt`** ⚠ | **bootstrap(정책)** `AuthenticationModeCompositionConfig` + leaf `SecurityConfig` | `config/security.yml:8` | 항상 인증이 켜져 있음 |
| **CORS** | `ca-skeleton.cors.enabled` | bool | `false` | **leaf(완료)** `adapter/inbound/web` | `config/security.yml:50` | 없음 |
| **async executor** | 없음 | — | **항상 on** ⚠ | **bootstrap** `AsyncExecutorConfig` (무조건 `@EnableAsync`) | `runtime.yml:59-65` | core 10 / 큐 200 (§5 M3) |
| **migration-on-startup** | `ca-skeleton.runtime.migration-on-startup` | bool | **`true`** ⚠ | **bootstrap(정책)** `MigrationStartupConfig` | `config/runtime.yml:20` | JPA on일 때만 의미 있음 |
| **error detail 노출** | `ca-skeleton.runtime.error-detail-exposure-enabled` | bool | `false` | **bootstrap** | `config/runtime.yml:14` | prod에서 true면 exit 71 |
| **body capture 로그** | `ca-skeleton.runtime.log-body-capture-enabled` | bool | `false` | **bootstrap** | `config/runtime.yml:16` | prod에서 true면 exit 71 |
| **응답 압축** | `server.compression.enabled` | bool | **`true`** ⚠ | **framework** | `config/server.yml:26` | — |
| **가상 스레드** | `spring.threads.virtual.enabled` | bool | **`true`** ⚠ | **framework** | `application.yml:192` | Java 21 가상 스레드로 Tomcat 핸들러 실행 |
**소유자 열이 드러내는 패턴**: 「bootstrap(미이관)」 7개 — redis 의미 포트 4개(cache/rate-limit/lease/idempotency-redis), outbox 3개, tracing, 분산락 데코레이터, fileserver-platform. **이 중 fileserver-platform을 뺀 전부가 §5 C1의 미등록 목록과 정확히 일치한다.** 우연이 아니다 — 오늘의 이전 작업이 손댄 능력(notification/httpclient/jpa/mongo/idempotency-postgresql/secret-source)은 전부 leaf `AutoConfiguration.imports`를 얻으면서 등록 문제가 함께 해결됐고, **손대지 않은 나머지가 옛 형태 그대로 남아 있다. 그 옛 형태가 도달 불가 상태다.**
**기본값이 "꺼짐"이 아닌 것 8개:** tracing, openapi/swagger-ui, 로그 async appender, auth-mode=jwt, migration-on-startup, 압축, 가상 스레드, async executor. 이 중 **openapi·swagger-ui가 기본 `true`인 게 유일하게 방어가 필요한 선택**이다 — non-prod dev/staging에서 API 전체 형상이 공개된다. 나머지 7개는 "능력 탑재"가 아니라 "런타임 기본 동작"이라 항상-on이 옳다.
### 3.2 계약의 일관성 판정 — 세 형태의 공존은 정당한가
> **2차 조사 후 판정 변경.** 초판은 "세 형태 공존 = 일관성 결함(일부)"으로 판정했다. 진행 중인 소유권 이전이 **형태를 바꾸는 작업인지** 확인하라는 지적을 받고 spec 8개를 읽었다. 결론: **이전 작업은 토글 형태를 바꾸지 않기로 명시적으로 결정했다.** 따라서 이건 "절반 진행된 상태의 단면"이 **아니고**, 의도적으로 동결된 계약이다.
>
> 근거 — 모든 ownership spec이 Compatibility 절에서 키 불변을 못박는다:
> - `httpclient-...-ownership.md` §Compatibility: *"app.httpclient.* keys remain unchanged."*
> - `postgresql-idempotency-...-ownership.md` §Compatibility: *"provider property and values are unchanged."*
> - `notification-...-ownership.md` §Compatibility: *"configuration keys do not change"*
> - `jpa-...-ownership.md` §Runtime activation: *"ca-skeleton.persistence-jpa.enabled remains the capability master switch."*
> - `secret-source-...-ownership.md` §Compatibility: *"ca-skeleton.secret-source.strategy remains unchanged."*
>
> **판정**: 조립 소유권을 통째로 옮기면서 키 정규화를 할 기회가 있었는데 하지 않았다. 그 선택 자체는 **옹호 가능하다** — 키는 운영자와의 계약이고, 소유권 이전이라는 큰 변경에 키 변경을 얹으면 회귀 원인을 구분할 수 없게 된다(각 spec의 "Verified result"가 회귀 없음을 주장하는데, 키가 바뀌었으면 그 주장이 성립하지 않는다). **다만 그 결과로 아래 불일치가 일시적 상태가 아니라 영구 상태가 됐다.** 누군가 별도 슬라이스로 결정하지 않는 한 그대로다. 그래서 아래 판정은 초판과 같되, 성격이 "정리 안 된 것"에서 **"정리하지 않기로 한 것"**으로 바뀐다 — 후자가 더 무겁다. 템플릿 사용자는 이 형태들을 영구 계약으로 학습하게 된다.
**부분적으로 정당하다. 규칙은 존재하고 코드에 기록돼 있지만, 문서화된 적이 없고 예외가 3건 있다.**
읽어낸 규칙:
1. **불리언 = "이 기술이 존재하는가"** — `MasterSwitch` enum 5개(`shared-contract/.../MasterSwitch.java:21-30`)와 redis/fileserver/httpclient/graphql. `MasterSwitchEnvironmentPostProcessor`가 `true|false` 정확 일치를 요구하고, "true에 가까운 값"(`TRUE`, `1`, `yes`)은 **읽지 않고 거부**한다(46-52행). 이유가 Javadoc에 있다 — "스위치를 설정했다고 믿는 배포이므로 off로 읽지 않고 거부한다".
2. **provider 선택자 = "어느 구현으로 이 능력을 제공하는가"** — `disabled|redis|jdbc`. `RedisActivationValidator:14-17` Javadoc이 규칙을 명시한다: **"역할 선택자는 어느 Redis 능력이 조립되는지를 말하지, Redis가 존재하는지를 말하지 않는다."** 그래서 `app.redis.enabled=false` + `rate-limit.provider=redis`는 기본값 문제가 아니라 **모순**이고 기동 실패다. 이 분리는 옳다 — Redis 하나에 4개 역할이 붙어 있어서 "전역 존재"와 "역할별 선택"이 실제로 별개 축이다.
3. **`bindings.default` = "논리 이름 → 백엔드 라우팅"** — cache만 이 형태다. `config/ratelimit.yml:15-17` 주석이 의도를 설명한다: fork가 `bindings: { worklog: redis }`를 추가하는 확장점.
**→ Keep에 쓸 만한 정당성이 있다.** 다만 다음 3건은 정당화되지 않는다:
- **cache만 `bindings.default`이고 lease/rate-limit/idempotency는 `provider`다.** 같은 `ca-skeleton.capabilities.*` 트리 아래 4개 능력 중 1개만 형태가 다르다. 확장점이 필요한 이유는 cache에만 있는 게 아니다(rate-limit 정책도 라우팅 대상이다). → M1.
- **rate-limit만 축이 2개다** — `app.rate-limit.enabled`(인바운드 HTTP 강제)와 `ca-skeleton.capabilities.rate-limit.provider`(아웃바운드 provider). `config/ratelimit.yml:7`이 "별개 축"이라고 쓰긴 했지만, **두 축의 정합성을 검증하는 코드가 없다**. → H2.
- **프로퍼티 루트가 4개다** — `ca-skeleton.*`, `app.*`, `backend.*`, 그리고 framework(`spring.*`/`server.*`/`management.*`/`springdoc.*`). `backend.graphql.*`는 단 하나의 능력만 쓰는 고아 루트다. env 키는 `APP_*`로 통일돼 있어서 **운영자가 보는 이름과 개발자가 보는 이름의 매핑이 자명하지 않다**(`APP_GRAPHQL_ENABLED` → `backend.graphql.enabled`). → M1.
### 3.3 이름 규칙 일관성
env 키는 `APP_<능력>_<속성>`으로 거의 일관적이다. 예외 5건: `SPRING_*`(프레임워크 직접), `MANAGEMENT_SERVER_PORT`, `SECURITY_PUBLIC_PATHS`, `PRESENTATION_API_BASE_PATH`, `OTEL_EXPORTER_OTLP_ENDPOINT`. 앞 3개는 `APP_` 규칙을 그냥 벗어난 것이고 `env-keys.yaml`에도 **등록되어 있지 않다**(내가 파싱한 결과 `EnvContractVerifier`의 `REGISTRY_NAME` 정규식이 `- name: APP_...`만 매칭하므로 애초에 레지스트리 대상이 아니다). → M2.
`MasterSwitch` 5개의 프로퍼티 루트도 갈라진다 — `PERSISTENCE_JPA`/`PERSISTENCE_MONGO`/`NOTIFICATION_PLATFORM`은 `ca-skeleton.*`, `MESSAGING`은 `app.messaging.enabled`, `GRAPHQL`은 `backend.graphql.enabled`(`MasterSwitch.java:21-30`). env 키 쪽은 `APP_MESSAGING_ENABLED`/`APP_GRAPHQL_ENABLED`로 일관되고 **둘 다 `env-keys.yaml`에 등록돼 있다**(내가 343행 전량 대조). 따라서 이건 레지스트리 공백이 아니라 프로퍼티 루트 명명 불일치이고, 운영자가 보는 이름(`APP_*`)은 일관되므로 실질 피해는 개발자가 프로퍼티 키를 찾을 때로 한정된다. → M1에 포함.
### 3.4 조립이 leaf로 흩어지면 **토글 간 의존 검증의 중앙 지점이 사라지는가** — 아니다, 오히려 강화됐다
이게 이번 이관에서 가장 중요한 구조 질문이다. 각 능력이 자기 조립을 소유하면, "redis를 껐는데 rate-limit이 redis를 요구한다" 같은 **교차 토글 모순**을 누가 잡는가?
**답: 세 층이 남아 있고, 전부 app-bootstrap 소유이며, 전부 조립보다 먼저 실행된다.**
| 층 | 무엇 | 실행 시점 | 이관 영향 |
|---|---|---|---|
| 1 | `MasterSwitchEnvironmentPostProcessor` — 스위치 값 파싱·구키 충돌 | 컨텍스트 이전 | 없음. `MasterSwitch` enum은 `shared-contract` 소유 |
| 2 | `CapabilityDependencyEnvironmentValidator` → `CapabilityDependencyValidator.violations()` — **교차 토글 의존 8개 규칙** | 컨텍스트 이전 | 없음. 순수 함수 + `Environment`만 읽음. leaf 타입 참조 0 |
| 3 | `RedisActivationValidator` / `SecretSourceValidator` / `StartupSafetyValidator` 등 9개 | 싱글턴 생성 후 | 없음. 전부 `bootstrap.runtime` 소유이고 컴포넌트 스캔 대상 |
**핵심은 2층이 `Environment`의 **문자열**만 읽는다는 것이다** (`CapabilityDependencyValidator:44-117` — 전부 `environment.getProperty(...)`). 조립이 어느 leaf로 가든 프로퍼티 키는 그대로이므로(§3.2: spec들이 키 불변을 명시적으로 약속) **이 검증은 이관에 영향받지 않는다.** 설계상 옳은 분리다 — 검증은 "무엇이 켜졌다고 선언됐나"를 보고, 조립은 "그래서 무엇을 만드나"를 본다.
**그리고 이관이 새 층을 하나 추가했다**: `adapter/outbound/support/CapabilityStartupValidationException` — `IllegalStateException` + `ExitCodeGenerator`(exit 78)로, **leaf가 app-bootstrap에 의존하지 않고도 fail-closed 할 수 있게** 해준다. app-bootstrap의 `StartupFailureExceptionReporter:22-27`이 그 타입을 알아보고 저장소 표준 구조화 로그(`STARTUP_VALIDATION_FAILED`)를 찍는다. **의존 방향이 leaf→bootstrap이 아니라 bootstrap→support 한 방향이고, leaf는 support만 안다.** 이게 "조립을 흩뿌리면서 실패 보고는 중앙에 남기는" 정확한 해법이다. → Keep K9.
**그래도 남는 구멍 2개** (이관과 무관한 기존 공백):
1. `CapabilityDependencyValidator:87`이 **존재하지 않는 프로퍼티** `ca-skeleton.lock.multi-instance-enabled`를 읽는다(실제 키는 `ca-skeleton.runtime.multi-instance-enabled`). `DataSourceRequirement:41`도 같다. → 멀티인스턴스↔JPA 의존 규칙이 **발화하지 않는다**.
2. `app.rate-limit.enabled=true`(인바운드) + `rate-limit.provider=disabled`(아웃바운드) 조합을 **어느 층도 보지 않는다**. `RedisActivationValidator`는 "redis 꺼짐 + redis 선택"만 보고, 이 조합은 redis가 전혀 등장하지 않는 모순이다. 실패는 `RateLimitWebConfig:37`의 빈 생성 시점까지 미뤄진다. → H2.
---
## 4. 구조 판정
| 축 | 판정 | 근거 |
|---|---|---|
| 의존 방향 (modules.json 대조) | **OK** | `app-bootstrap`: 레지스트리 15개 edge = `build.gradle:78-122` project 의존 15개, 정확히 일치. `sample-portfolio`: 레지스트리 7개 = `build.gradle:48-56` 7개, 일치 |
| 의존 방향 (Gradle 게이트 실효성) | **부분 위반** | `ArchitecturePlugin.java:80,88,125` — `:sample-portfolio`가 `verifyCleanArchitectureDependencies` 대상에서 **제외**된다. 샘플의 registry edge는 선언만 되고 강제되지 않음 (→ M5) |
| 경계 누수 (DTO·entity·framework 타입) | **OK** | `CompositionRootBoundaryArchitectureTest:68-82`가 `dev.caskeleton.bootstrap..`의 application/domain 포트 구현을 금지. 예외는 `MeteredDistributedLockPort` 1개이고 **"두 번째 데코레이터가 생기면 support로 옮긴다"는 임계값이 Javadoc 44-53행에 명문화**돼 있다 |
| 비즈니스 규칙 위치 | **OK** | bootstrap main 126파일 중 도메인 규칙 없음. 전부 조립/검증/설정 바인딩. `StartupValidationContext`가 검증 누적을 한 곳으로 모음 |
| 테스트 전략 적합성 | **구조는 우수, 커버리지에 구멍** | 소스셋 6개 분리는 클래스패스 차이로 정당(§6 K5). 다만 `sample-portfolio` 9,387줄이 **ArchUnit 룰 0개** 적용 대상 (→ H4) |
| HARD-STOP 1~5 | **위반 없음** | domain-core 의존 없음, controller→repository 없음, DTO 누수 없음, 규칙 이동 없음, 의존 위반 없음 |
---
## 5. 발견
### Critical
#### C1. `bootstrap.autoconfigure.*` 설정 클래스 7개가 배포 artifact에서 **등록되지 않는다** — redis·outbox·idempotency·distributed lock·tracing 조립이 전부 도달 불가
> **신뢰도: 확정.** 초판은 "High 신뢰도 정적 추정"이었다. 코디네이터가 독립 확인한 항목(정규식 적용 / `.imports` 5줄 전문 / `@Import` 4개 / 7개 클래스에 대한 main 참조가 전부 Javadoc / `ImportSelector`·`ImportBeanDefinitionRegistrar`·`@ImportAutoConfiguration`·`registerBeanDefinition`·`BeanDefinitionRegistryPostProcessor` main 전체 grep 0건 / `AdapterActivationAutoConfiguration`이 아무것도 import하지 않음)과 내 2차 확인(저장소 전체 `.imports`·`spring.factories` **17개 전량** 대조)이 일치한다. 등록 경로가 존재할 여지가 없다.
- **현상**: `CaSkeletonApplication`은 컴포넌트 스캔에서 정규식 `dev\.caskeleton\.bootstrap\.autoconfigure\..*` 로 해당 패키지 전체를 제외한다(`CaSkeletonApplication.java:54-56, 99-100`). 제외된 클래스가 다시 컨텍스트에 들어오는 경로는 두 가지뿐이다 — `AutoConfiguration.imports` 등재, 또는 등재된 설정이 `@Import`. 그런데 **둘 중 어느 쪽에도 없는 `@Configuration` 클래스가 7개 있다.**
- **이건 부주의가 아니라 정확한 설계의 미완이다.** 두 Javadoc이 규칙을 정확히 서술한다:
- `CaSkeletonApplication:32-37` — *"Registering them as auto-configuration instead makes 'off' a structural fact rather than a condition every future bean has to remember to repeat."*
- `RedisCapabilityConfig:42-44` — *"Imported rather than scanned: the master switch above gates this class, and an `@Import` only registers what a registered configuration asked for. Component scanning would have made each capability configuration independently discoverable and the switch advisory."*
**두 문장 다 맞다.** `@Import`는 *등록된* 설정이 요청한 것만 등록한다 — 그리고 `RedisCapabilityConfig` 자신이 등록되지 않았다. 같은 패키지 안에 **정답 구현이 이미 있다**: `FileserverPlatformAutoConfiguration:63-75`가 `@AutoConfiguration` + 마스터 스위치 + 자식 6개 `@Import` + `.imports` 등재를 전부 갖추고, Javadoc 44-58행이 *"this is an auto-configuration rather than a component-scanned `@Configuration`, and it lives in a package the composition root's scan explicitly excludes. **That is the whole point**"*라고 쓴다. 7개는 그 마지막 한 줄을 받지 못했다.
- **근거**:
`META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports` — **5줄 전부**:
```
dev.caskeleton.bootstrap.autoconfigure.fileserver.FileserverPlatformAutoConfiguration
dev.caskeleton.bootstrap.autoconfigure.jpa.PersistenceJpaRootAutoConfiguration
dev.caskeleton.bootstrap.autoconfigure.messaging.DisabledMessagingSentinelAutoConfiguration
dev.caskeleton.bootstrap.activation.AdapterActivationAutoConfiguration
dev.caskeleton.bootstrap.autoconfigure.notification.NotificationApplicationCompositionAutoConfiguration
```
app-bootstrap main 전체의 `@Import`는 4개뿐이다:
- `FileserverPlatformAutoConfiguration.java:68` → fileserver 하위 6개
- `FileserverAdminManagementContextConfiguration.java:31` → 컨트롤러
- `PersistenceJpaRootAutoConfiguration.java:34` → `MigrationStartupConfig`, `JpaPlatformRuntimeAutoConfiguration`
- `RedisCapabilityConfig.java:45` → redis 하위 4개
도달 불가 목록 (repo 전체 grep으로 `@Import`/`imports` 참조 0건 확인):
| 클래스 | 잃는 것 |
|---|---|
| `autoconfigure/redis/RedisCapabilityConfig.java:51` | Redis 능력 전체. `@Import`한 `RedisCacheConfig`/`RedisRateLimitConfig`/`RedisLeaseConfig`/`RedisIdempotencyConfig` 4개도 같이 |
| `autoconfigure/outbox/OutboxConfig.java:33` | `outboxLeaderElection`, `OutboxRelayScheduler`, `OutboxMetrics`, `PublishPendingOutboxEventsUseCase` |
| `autoconfigure/lock/DistributedLockConfig.java:17` | `distributedLockProvider` |
| `autoconfigure/idempotency/IdempotencyConfig.java:17` | `Clock` 빈, `IdempotencyExecutor` |
| `autoconfigure/idempotency/IdempotencyProviderSelectionConfig.java:38` | **provider 배타성 fail-fast 가드** |
| `autoconfigure/idempotency/PostgreSqlIdempotencyProviderConfig.java:26` | PostgreSQL owner-safe 멱등성 store |
| `autoconfigure/tracing/TracingConfig.java:24` | `Tracer`, `SpanErrorRecorder`, 샘플링 게이지 |
참조하는 테스트는 전부 `withUserConfiguration(X.class)` 또는 `@Import(X.class)`로 **클래스를 직접 주입한다** — `RedisCapabilityCompositionTest:38,89,129`, `OutboxCanonicalTransportCompositionTest:17`, `DistributedLockConfigTest:15`, `IdempotencyProviderCompositionTest:31`, `TracingActivationContextTest:81`. 즉 **어느 테스트도 "배포 컨텍스트가 이 설정을 찾는가"를 묻지 않는다.**
`@ConfigurationPropertiesScan`(`CaSkeletonApplication:58-79`)에는 `...autoconfigure.{redis,idempotency,outbox,tracing}`이 들어 있지만 이건 `@ConfigurationProperties` record만 등록한다. **설정값은 바인딩되고 그 값을 읽는 설정 클래스는 없는 상태**다.
- **왜 문제인가 (구체적 실패 시나리오)**:
1. 운영자가 `APP_REDIS_ENABLED=true`, `APP_RATE_LIMIT_PROVIDER=redis`, `APP_RATE_LIMIT_ENABLED=true`로 배포한다. `RedisActivationValidator`는 모순이 없으니 통과한다(`app.redis.enabled=true`이므로). `RedisCapabilityConfig`가 없으니 `EdgeRateLimitPort`가 만들어지지 않는다. `RateLimitWebConfig:37`의 `requiredUnique(portProvider, "EdgeRateLimitPort")`가 빈 생성 시점에 실패한다 — **운영자가 설정한 적 없는 빈 이름을 대면서**. 이건 `RedisActivationValidator`의 Javadoc(18-22행)이 "이 검증기가 없으면 일어날 일"이라고 설명한 바로 그 실패다. 검증기는 있는데 다른 이유로 같은 실패가 난다.
2. `APP_OUTBOX_ENABLED=true` + `APP_OUTBOX_RELAY_ENABLED=true`로 배포하면 `CapabilityDependencyValidator`를 통과하고 컨텍스트도 뜬다. **릴레이가 없으므로 아웃박스 행이 영원히 PENDING으로 쌓인다.** 조용히 데이터가 안 나간다.
3. `ca-skeleton.tracing.enabled` 기본값이 `true`인데(`config/observability.yml:161`) `TracingConfig`가 없으므로 `SpanErrorRecorder`도 `Tracer`도 없다. 트레이싱이 켜졌다고 보고하면서 아무 span도 안 나간다.
4. 컴포즈 lane 15개 중 이 경로를 밟는 건 `local-messaging-outbox` 하나뿐이고, 그 lane은 `oneShotServices: []`라 **`up --wait`로 헬스만 확인한다**(`compose-profile-contracts.json` lane `local-messaging-outbox`). 아웃박스가 조용히 없어도 초록이다.
- **가장 깨끗한 반증 가능 증거 — 오늘 작성된 spec이 거짓이 된다**: `postgresql-idempotency-composition-ownership.md` §Compatibility가 이렇게 약속한다 — *"provider=postgresql still yields exactly one V2 store and one V2 executor when JPA is enabled."* 실제 조립 경로:
| 역할 | 클래스 | 도달 경로 | 결과 |
|---|---|---|---|
| V2 **store** | `persistence-jpa/.../autoconfigure/PostgreSqlIdempotencyStoreConfig:15` | `PersistenceJpaAutoConfiguration:24` `@Import` ← leaf `.imports` | **도달** |
| V2 **executor** | `bootstrap/autoconfigure/idempotency/PostgreSqlIdempotencyProviderConfig:26` | 없음 | **미도달** |
| 그 불일치를 잡을 가드 | `bootstrap/autoconfigure/idempotency/IdempotencyProviderSelectionConfig:38` | 없음 | **미도달** |
→ `APP_IDEMPOTENCY_PROVIDER=postgresql` + JPA on 배포는 **store 1개 / executor 0개**로 뜨고, 그걸 거부해야 할 배타성 가드도 같이 없어서 **조용히 통과한다**. spec의 약속과 정반대다. `./gradlew :app-bootstrap:systemTest` 하네스로 그 조합을 띄워 `context.getBeanNamesForType(IdempotencyExecutorV2.class)`를 찍으면 한 번에 판명된다.
- **전수 확인 (269개 중 잡을 수 있는 것이 정말 0개인가 — 확정)**: app-bootstrap 비-main **269파일을 하네스별로 전수 분류**했다(§1 4차 조사 표). 배포 컨텍스트를 관측할 수 있는 것은 `ShippedCompositionHarness`를 쓰는 **8개(테스트 7 + 하네스 1)뿐**이고, repo 전체에서 `new SpringApplicationBuilder(CaSkeletonApplication.class)`는 그 하네스 76행 한 곳이다. 나머지 261개의 내역: `ApplicationContextRunner` 36(**`spring.factories`도 `.imports`도 읽지 않는다** — 그래서 원리적으로 등록 여부를 볼 수 없다), ArchUnit 37(바이트코드만), 파일텍스트 24, `MockEnvironment` 11, 순수 단위 145, `@SpringBootTest` 6·`SpringApplication*` 2(**전부 로컬 중첩 App 클래스를 부팅** — §1 표에 파일:줄로 명시). 그리고 그 7개는 **전부 `allOffArguments()` 또는 `requiredOperatorInputs()`로만 돈다.** → **C1을 잡을 수 있었던 테스트는 0개다. 추론이 아니라 전수 결과다.**
- **왜 발견되지 않았는가 — 게이트는 있는데 켜본 적이 없다**: `compose-profile-contracts.json`의 15개 lane 중 **redis를 켜는 lane이 0개**다(`APP_REDIS_ENABLED`가 어느 `activationEnv`에도 없다). cache/lease/idempotency/rate-limit provider, tracing exporter, fileserver-platform, httpclient도 마찬가지. `expectedSwitchesOn`이 `MasterSwitch` 5개 + graphql만 다룬다. 아웃박스를 켜는 `local-messaging-outbox` lane은 있지만 `oneShotServices: []`라 `up --wait` 헬스 확인만 한다. **즉 이 저장소의 런타임 증거는 "꺼진 상태"와 "5개 마스터 스위치를 켠 상태"만 덮고, 나머지 토글은 한 번도 켜진 채로 관측된 적이 없다.**
가장 가까이 갔던 테스트도 비껴간다. `ShippedRuntimeFacadePresenceTest:52-64`는 `Class.forName`으로 **클래스패스 존재**만 본다. 그 Javadoc(12-16행)이 "absent"와 "off"를 구분하는 이유를 훌륭하게 설명하지만, **제3의 상태 — 존재하지만 도달 불가 — 는 상정하지 않는다.** 검사 대상 5개 중 `JpaPlatformRuntimeAutoConfiguration`은 실제로 도달 가능하므로(`PersistenceJpaRootAutoConfiguration:34` `@Import`) 테스트는 통과하면서 7개에 대해 아무 말도 하지 않는다.
- **이 저장소는 이 결함 유형을 이미 이름 붙여 알고 있다.** `DependencyErrorStartupContractTest:21-23` (systemTest):
> *"This repository has found **five classes that were green in their own tests and present in no running application**; a validator is a poor candidate to become the sixth."*
그래서 `CapabilityDependencyStartupCheck`에 대해서는 **실제 부팅으로** 배선을 검증하는 테스트를 썼다. 같은 추론이 `RedisCapabilityConfig`·`OutboxConfig`·`TracingConfig`·`DistributedLockConfig`·`IdempotencyConfig`·`IdempotencyProviderSelectionConfig`·`PostgreSqlIdempotencyProviderConfig`에는 적용되지 않았다. **다섯 번 겪은 패턴의 일곱 번째 인스턴스가 남아 있다.**
- **최종 수정 방향 — `.imports` 추가가 아니라 ownership 재분류**:
리뷰 스냅샷에서 “등록 경로가 없다”는 진단은 유효하지만, 이 설정을 모두
`app-bootstrap AutoConfiguration.imports`에 추가하는 것은 최종 구조가 아니다.
| 설정 성격 | 최종 소유 |
|---|---|
| 공통 `Clock` | application-wide bootstrap |
| Redis cache/rate-limit/lease/idempotency 구현 Bean | `adapter:outbound:cache-redis` root auto-configuration |
| PostgreSQL idempotency/outbox 구현 Bean | `adapter:outbound:persistence-jpa` 등 실제 provider leaf |
| provider 배타성/선택 검증 | 구현을 만들지 않는 얇은 bootstrap/support validator |
| tracing/observability baseline | application-wide라면 bootstrap, activation semantics 명시 |
구현 순서는 **공통 인프라 분리 → leaf-owned AutoConfiguration 이전 → leaf `.imports` 등록 →
bootstrap 구현 import 제거 → ON/OFF composition test**다.
현재 워킹트리는 leaf-owned AutoConfiguration 방향으로 이동 중이므로 과거 bootstrap wiring을 되살리지 않는다.
- **추가 수정 — 회귀 방지**: `FiveAdapterOffInventoryTest`는 **off만** 검증한다. 대칭인 "on-inventory" 테스트가 없다. `ShippedCompositionHarness`로 능력별 스위치를 켜고 대표 빈 존재를 단정하는 테스트를 추가하고, `compose-profile-contracts.json`에 redis-on / fileserver-on / httpclient-on lane을 추가해야 이 부류가 다시 생기지 않는다.
- **반론과 재반박**: "이건 설계된 배제다." 맞다 — 그리고 그게 정확히 문제다. 규칙은 "자기 auto-configuration 항목을 통해 도달"인데 7개에 대해 그 항목이 없다. 규칙과 파일이 어긋났고, **어긋남을 잡는 장치가 없다.** `ShippedRuntimeFacadePresenceTest`가 그 자리에 있었지만 클래스패스 존재만 본다.
#### C2. `APP_MULTI_INSTANCE_ENABLED=true`는 어떤 설정으로도 기동할 수 없다 — 요구 빈 5개 중 2개는 코드베이스에 존재하지 않는다
- **현상**: `StartupSafetyValidator:24-31`이 멀티인스턴스 모드에서 빈 5개를 이름으로 요구한다. 이 중 `cacheStampedeProtection`과 `distributedRateLimiter`는 **저장소 전체에 정의가 없다**.
- **근거**:
- `StartupSafetyValidator.java:24-31` — 요구 목록
- `cacheStampedeProtection` repo 전체 grep 결과 3곳: 검증기 자신(27행), **자기 테스트의 가짜 `Object` 빈**(`StartupSafetyValidatorTest.java:153`), 설계 문서.
- `distributedRateLimiter` 동일 — 검증기(29행), 테스트(`StartupSafetyValidatorTest.java:163`), `adapter/outbound/cache-redis/README.md:164`(산문).
- `StartupSafetyValidatorTest:145-171` `CoordinationBeans`가 5개 이름을 **전부 `new Object()`로 위조**한다. 그래서 "멀티인스턴스가 켜지면 뜬다"는 테스트(112-117행)는 실제 컴포지션에 대해 아무것도 증명하지 않는다.
- `docs/superpowers/specs/2026-07-26-redis-production-capability-design.md:246-268` — **저장소 자신의 설계 문서가 §3.6 "multi-instance mode는 현재 조립할 수 없다"로 이 사실을 이미 기록하고 있다.**
- C1과 겹친다: `distributedLockProvider`(`DistributedLockConfig`)와 `outboxLeaderElection`(`OutboxConfig`)도 등록 불가이므로, 실제로는 5개 중 **4개가 없다**.
- **C1과 같은 뿌리인가 — 아니다. 다른 뿌리이고, 합쳐져서 악화된다.** 확인 결과:
| 요구 빈 | 어디서 만들어져야 하나 | 상태 | 뿌리 |
|---|---|---|---|
| `distributedLockProvider` | `bootstrap/autoconfigure/lock/DistributedLockConfig:23` | 클래스 존재, **미등록** | **C1** |
| `outboxLeaderElection` | `bootstrap/autoconfigure/outbox/OutboxConfig:97` | 클래스 존재, **미등록** | **C1** |
| `migrationStartupRunner` | `bootstrap/runtime/startup/MigrationStartupConfig:30` | `PersistenceJpaRootAutoConfiguration:34`가 `@Import` → **등록됨** | 정상 |
| `cacheStampedeProtection` | **어디에도 없음** | 타입 자체가 부재 | **C2 고유** |
| `distributedRateLimiter` | **어디에도 없음** | 타입 자체가 부재 | **C2 고유** |
뒤 두 개가 `RedisCapabilityConfig`의 자식에서 만들어질 예정이었는지 확인했다 — **아니다.** 자식 4개가 만드는 빈은 `redisDefaultCacheRegion`(`CacheRegionPort`), `redisEdgeRateLimitPort`(`EdgeRateLimitPort`), `redisDistributedLeasePort`, `redisIdempotencyStore`+`idempotencyExecutorV2`이고 **그 이름도 그 타입도 아니다**(`RedisCacheConfig:37`, `RedisRateLimitConfig:45`, `RedisLeaseConfig:28`, `RedisIdempotencyConfig:37,68`). 설계 문서 §3.6도 "현재 production composition에는 이 두 bean이 없다"고 쓴다.
→ **결론: C1을 전부 고쳐도 멀티인스턴스는 여전히 기동 실패한다.** 5개 중 2개는 구현 자체가 없고, 나머지 3개 중 2개는 C1이 막고 있다. 두 결함은 별개이고 **C1 수정이 C2의 선행 조건**이다.
- **왜 문제인가**: 운영자가 pod를 2개로 늘릴 때 가장 먼저 찾는 스위치가 `APP_MULTI_INSTANCE_ENABLED`다. 켜면 exit 72로 기동 실패하고, 메시지는 있지도 않은 빈 5개 이름을 나열한다. 운영자는 그 빈을 만들 방법을 찾을 수 없다(존재하지 않으므로). **템플릿이 제공한다고 광고하는 능력이 도달 불가능하다.** 더 나쁜 건 검증이 **빈 이름 존재**만 보고 provider 토폴로지나 보장 수준을 안 본다는 점 — 설계 문서 §3.6이 직접 지적한다.
- **수정 방향**: 두 갈래 중 하나. (a) 두 빈을 실제로 구현하고 Redis 능력 조립에 연결한다. (b) **요구 목록을 실제 조립 가능한 것으로 줄이고**, 미구현 능력은 `RequiredAdapterDisabledException` 메시지에 "이 능력은 아직 제공되지 않는다"를 명시한다. 어느 쪽이든 **테스트가 가짜 `Object` 빈을 만드는 것부터 없애야 한다** — 그게 이 결함을 3개월간 초록으로 유지한 장치다.
- **반론과 재반박**: "설계 문서가 이미 알려진 결함으로 기록했으니 새 발견이 아니다." 기록은 `docs/superpowers/specs/`에 있고, 운영자가 읽는 `src/app-bootstrap/README.md:416`은 여전히 "`distributedLockProvider` 빈은 `multi-instance-enabled=true`일 때만"이라고 **마치 동작하는 것처럼** 쓰여 있다. 알려진 결함이 코드·문서·테스트 어디에도 반영 안 된 채 3개월 지났다면 그건 기록이 아니라 부채다.
---
### High
#### H1. `verifyEnvKeys`의 "아무도 읽지 않는 키" 검사는 **구조적으로 항상 통과하는 죽은 코드**다 — Redis 하드 실패 분기 포함
- **현상**: `EnvContractVerifier.java:154-174`가 "등록됐지만 아무도 읽지 않는 키"를 찾고, Redis 접두사 6개에 대해서는 `GradleException`으로 빌드를 실패시킨다. 이 분기는 절대 실행되지 않는다.
- **근거** (Rule → Evidence → Fix):
- **Rule**: `unconsumed` 집합은 `!consumed.contains(row.name())`인 행만 담는다 (156행).
- **Evidence**:
- `consumed`는 `applicationAppReferences ∪ envAppKeys ∪ 자바소스스캔` (150-152행).
- `envAppKeys`는 `.env.example`의 `APP_*` 키 전부 (101-102행).
- 그런데 **96-99행이 이미 `registryAppKeys ⊆ envKeys`를 강제**하고 실패 시 예외를 던진다.
- `REGISTRY_NAME` 정규식(28-29행)은 `- name: APP_...`만 매칭하므로 `registryAppKeys`의 모든 원소는 `APP_`로 시작한다.
- ∴ `registryAppKeys ⊆ envAppKeys ⊆ consumed`. `unconsumed`는 **항상 공집합**이다.
- 확인 사살: `EnvContractVerifierTest.java`(112줄)에 `unconsumed`/`deprecated_orphaned`/hard-fail 경로를 타는 테스트가 **0개**이고, 유일한 관련 단정은 `assertTrue(result.warnings().isEmpty())`(33행) — 도달 불가 분기와 일관된다.
- 이 죽은 검사를 우회하려고 `env-keys.yaml`에 `deprecated_orphaned: true` + `removal_deadline`을 단 행이 **45개**(내가 파싱) 있다. 45개 행이 발화하지 않는 검사를 회피하기 위해 유지되고 있다.
- **Fix**: `consumed`에서 `envAppKeys`를 빼거나, `.env.example` 존재를 "소비"로 치지 않도록 분리한다. 그 순간 실제 미사용 키가 드러날 것이다 — 내 파싱 기준 **레지스트리 343행 중 97개가 어떤 yml에서도 참조되지 않는다**(`APP_REDIS_*` 60여 개, `APP_SESSION_*` 10개, `APP_TENANT_ENABLED`, `APP_SECURITY_JWT_SIGNING_KEY` 등).
#### H2. `verifyEnvKeys`가 `config/*.yml` 15개를 **전혀 읽지 않는다** — BOOT-008 분할이 검증 표면의 87%를 잘라냈다
- **현상**: 검증기는 `applicationYaml`로 파일 **1개**만 받고, 소비자 스캔도 파일명이 정확히 `application.yml`인 것만 포함한다.
- **근거**:
- `ConfigContractPlugin.java:22-23` — `task.getApplicationYaml().fileValue(root.file("app-bootstrap/src/main/resources/application.yml"))`
- `ConfigContractPlugin.java:30-39` — `tree.include("**/src/main/**/*.java")`, `tree.include("**/src/main/**/application.yml")`. **`config/*.yml`은 어느 패턴에도 안 걸린다.**
- 정량: `application.yml`의 `${APP_*}` 참조 31개, `config/*.yml`의 참조 **211개**. **config에만 있는 키 202개**가 아래 두 검사에서 빠진다:
- `difference(requiredPlaceholders, envKeys)` (84-86행) — 인라인 기본값 없는 플레이스홀더가 `.env.example`에 있는지
- `difference(applicationAppReferences, registryAppKeys)` (107-110행) — yml이 참조하는 키가 레지스트리에 있는지
- **지금은 드리프트가 없다** — 내가 202개 전부를 `env-keys.yaml`과 대조했고 전부 등록돼 있다. 문제는 *앞으로*다: `config/redis.yml`에 `${APP_REDIS_NEW_THING:false}`를 추가하고 `.env.example`과 레지스트리에 안 넣으면, 빌드는 통과하고 앱은 기본값으로 뜨고 **운영자는 그 키의 존재를 알 방법이 없다**.
- 반대 방향(`.env.example` ↔ 레지스트리 양방향, 96-106행)은 여전히 유효하다. 그래서 계약이 완전히 무너진 건 아니고, **yml ↔ 레지스트리 축만 끊겼다.**
- **왜 문제인가**: 이 저장소가 199KB 레지스트리를 유지하는 유일한 이유는 "yml이 참조하는 모든 키가 문서화돼 있다"를 보증하기 위해서다. 그 보증이 15개 파일 중 1개에만 적용된다. `FileserverPlatformEnvRoundTripTest.java:23`과 `HttpClientPlatformEnvManifestTest.java:27`이 **"verifyEnvKeys는 텍스트 파일 3개만 비교하므로 이걸 커버할 수 없다"**고 각자 우회 테스트를 쓴 것 자체가 이 한계를 인지하고 있다는 증거다.
- **수정 방향**: `applicationYaml` 단수 프로퍼티를 `ConfigurableFileCollection`으로 바꾸고 `application.yml` + `config/*.yml`을 모두 넣는다. `ShippedConfiguration.resources()`(테스트 측)가 이미 `spring.config.import` 목록을 읽어 동적으로 확장하는 정답을 구현해 두었다 — 같은 파싱을 빌드 쪽에도 쓰면 된다.
- **반론과 재반박**: "`.env.example` ↔ 레지스트리가 양방향으로 잠겨 있으니 실질 위험은 낮다." 낮지만 0이 아니다. 운영자가 보는 계약(`.env.example`)과 앱이 실제로 읽는 것(`config/*.yml`)이 어긋나는 것이 바로 이 검증기가 존재하는 이유이고, 그 축이 끊겼다.
#### H3. prod 필수 시크릿 13개 중 **3개는 소비자가 없고, 그 중 2개는 레지스트리에도 없다**
- **현상**: `SecretSourceValidator.REQUIRED_PROD_SECRETS`(36-50행)에 prod에서 공백이면 기동 실패하는 키 13개가 있다. `APP_SECURITY_JWT_SIGNING_KEY`, `APP_SECURITY_OAUTH_CLIENT_SECRET`, `APP_EXTERNAL_API_KEY` 세 개는 어떤 yml·자바 코드도 읽지 않는다.
- **근거** (repo 전체 grep):
- `APP_SECURITY_OAUTH_CLIENT_SECRET` → 3곳: 검증기(40행), 자기 테스트, `docs/registries/secrets-classification.yaml`. **`env-keys.yaml`에 없음.**
- `APP_EXTERNAL_API_KEY` → 동일 3곳. **`env-keys.yaml`에 없음.**
- `APP_SECURITY_JWT_SIGNING_KEY` → `.env.example` + `env-keys.yaml`에는 있으나 **어떤 yml도 `${APP_SECURITY_JWT_SIGNING_KEY}`를 참조하지 않는다.** 이 앱은 JWT를 검증만 하고(리소스 서버) 서명하지 않는다 — `application.yml:173-181`의 `spring.security.oauth2.resourceserver.jwt.{issuer-uri,audiences}`가 전부다.
- `scripts/run-compose-runtime-smoke.sh:294-295`가 lane마다 이 3개 + salt를 **랜덤 생성해 주입한다**. 즉 스모크 lane은 통과한다 — 소비자가 없다는 사실을 가려주는 장치가 이미 있다.
- **왜 문제인가**: fork한 사용자가 prod 배포 체크리스트를 만들 때, 시크릿 매니저에 넣어야 할 키 3개가 **아무 효과도 없는 더미**다. 시크릿 로테이션 절차·감사 범위·비용이 실체 없는 항목 3개만큼 부풀고, 진짜 필요한 키와 구분되지 않는다. 반대로 `SecretsClassificationRegistryTest`가 "이 목록이 레지스트리와 1:1"이라고 단정하고 있어(Javadoc 32-34행) 목록을 줄이려면 레지스트리도 같이 고쳐야 한다 — 드리프트가 **양쪽에 고정**돼 있다.
- **수정 방향**: 3개를 목록에서 제거하고 `secrets-classification.yaml`에서도 뺀다. 또는 소비자를 만든다(서명 키가 필요한 시나리오가 실제로 있다면). 어느 쪽이든 결정을 내려야지 지금처럼 "요구하지만 쓰지 않는" 상태로 두면 안 된다.
- **반론과 재반박**: "미래 확장을 위한 자리다." 미래 확장은 `SecretSourceStrategy` enum의 주석 처리된 `VAULT`/`AWS_SECRETS_MANAGER`처럼(`SecretSourceStrategy.java:10-13`) **기동을 막지 않는 방식**으로 표시하면 된다. prod 기동 실패 조건은 미래를 위한 자리로 쓸 곳이 아니다.
#### H4. `sample-portfolio`가 **application 레이어 프레임워크 순수성을 실제로 위반**하고 있고, 그것을 잡는 장치가 3중으로 비껴간다
> **판정 강화.** 초판은 "룰이 적용되지 않는다"(구조적 가능성)까지였다. 201파일 전수 검사 결과 **실제 위반이 있고, 정확히 한 부류다.**
- **현상**: 샘플의 application 레이어가 Spring 애노테이션을 쓴다. production `application-core`는 쓰지 않는다.
- **근거 (실측)**:
| | production `application-core` | `sample-portfolio` application |
|---|---|---|
| 파일 수 | **890** | 84 |
| `org.springframework.*` import | **0** | **18** |
| 내역 | — | `@Service` 15, `@Component` 2, `@Autowired` 1 |
위반 파일 예: `application/worklog/CreateWorkLogUseCase.java:25`, `BatchCreateWorkLogsUseCase.java:19`, `ListWorkLogsUseCase.java:12`, `DeleteWorkLogUseCase.java:13`, `UpdateWorkLogUseCase.java:16`, `GetRepoStatsUseCase.java:11`, `ListRecentWorkLogSummariesUseCase.java:13`, `GetWorkLogUseCase.java:13`, `application/poster/{List,Archive,Get,Delete,Publish,Update,Create}PosterUseCase.java`, `application/event/{PosterEventPublisher,PosterImagePublicationEventPublisher}.java` (`@Component`), `application/poster/DeletePosterUseCase.java:18` (`@Autowired` 생성자).
- **샘플이 지키는 것도 전수 확인했다** (기계 검사, 위반 0건): `DOMAIN_IS_PURE`(domain에 spring/jakarta/hibernate/jackson import 0), `DOMAIN_HAS_NO_LOGGER`(0), `APPLICATION_HAS_NO_DIAGNOSTIC_FRAMEWORK`(application에 slf4j 0), `PERSISTENCE_ENTITIES_STAY_INSIDE_A_PERSISTENCE_ADAPTER`(`@Entity` 5개 전부 `adapter/outbound/persistence/entity/`), `WEB_DTOS_STAY_IN_WEB_ADAPTER`(dto 디렉터리 1개, `adapter/inbound/web/dto`), `INBOUND_PORT_IMPLEMENTATIONS_DECLARE_A_CAPABILITY`(`*UseCase.java` **23개 전부** `@UseCaseCapability` 보유), `MUTATING_USE_CASES_DECLARE_REQUIRED_PERMISSION`(`@RequiresPermission` 17), `NO_PROBLEM_DETAIL_USAGE`(0), `NO_REFRESH_SCOPE_ANYWHERE`(0), `NO_UUID_RANDOM_IN_CONTROLLER`(0), `PRODUCTION_CODE_DOES_NOT_DEPEND_ON_TEST_FIXTURES`(0), `CONFIGURATION_PROPERTIES_END_WITH_SETTINGS_OR_POLICY`(8/8 `*Settings`). **샘플은 대부분 모범적이다 — 그래서 남은 한 부류가 더 눈에 띈다.**
- **왜 3중으로 안 잡히는가** (각각 다른 이유다):
1. **ArchUnit**: 룰이 샘플을 못 본다 — 5개 스위트 전부 `@AnalyzeClasses(packages = "dev.caskeleton")`로 **app-bootstrap의 테스트 클래스패스**를 읽는데, app-bootstrap은 샘플에 의존하지 않는다. *게다가* 설령 클래스패스에 있어도 **이 위반은 안 잡힌다**: `APPLICATION_DOES_NOT_DEPEND_ON_ADAPTERS_OR_TRANSPORT`의 금지 목록(`ApplicationBoundaryArchitectureTest:59-68`)은 `..adapter..`, `..bootstrap..`, `..infra..`, `..presentation..`, `..cmd..`, `jakarta.persistence..`, `javax.persistence..`, `jakarta.servlet..`, `org.springframework.web..`, `org.hibernate..` 뿐 — **`org.springframework.stereotype`도 `org.springframework.beans`도 없다.**
2. **Gradle 순수성 게이트**: `verifyApplicationCoreDependencyPurity`가 있지만 `ArchitecturePlugin.java:107`이 `root.project(":application-core")`로 **대상을 한 프로젝트에 고정**한다. 샘플은 애초에 대상이 아니다.
3. **의존 게이트**: `verifyCleanArchitectureDependencies`는 `ArchitecturePlugin.java:80`이 `:sample-portfolio`를 제외한다(→ M5).
- **왜 문제인가 (구체적 전파 경로)**: production이 `application-core` 890파일에 걸쳐 Spring import 0을 유지하는 것은 우연이 아니라 **이 템플릿의 핵심 주장**이다 — 루트 `CLAUDE.md`의 의존 방향 표가 `application-core`를 "`domain-core`, `shared-contract`"로만 허용한다. 그런데 fork 사용자가 실제로 읽는 완결 예제는 `@Service`가 붙은 유스케이스를 보여준다. **사용자가 배우는 것은 문서의 주장이 아니라 예제의 코드다.** 그리고 이 위반은 §H4 원래 지적한 스캔 설정과 같은 뿌리다 — `SamplePortfolioApplication:27-28`이 `basePackages = "dev.caskeleton"`을 제외 없이 스캔하므로, 유스케이스가 빈이 되는 유일한 방법이 `@Service`다. production은 컴포지션 루트가 유스케이스를 **명시적으로 조립**하므로 애노테이션이 필요 없다.
- **수정 방향**: (a) 샘플의 유스케이스를 `bootstrap/`의 `@Configuration`에서 명시 조립하고 `@Service`를 뗀다 — production 패턴을 그대로 보여주게 된다. (b) 또는 `APPLICATION_DOES_NOT_DEPEND_ON_ADAPTERS_OR_TRANSPORT`의 금지 목록에 `org.springframework..`를 추가하고(`org.springframework.transaction.annotation`은 이미 별도 룰이 막는다) 샘플에 `architectureTest` 소스셋을 붙인다. (a)가 근본이고 (b)가 재발 방지다.
- **반론과 재반박**: "`@Service`는 `@Transactional`처럼 동작을 바꾸지 않는 마커이고, 샘플은 lean standalone이라 편의가 우선이다." 동작은 안 바뀐다. 하지만 **이 템플릿이 파는 것이 정확히 그 구분**이다 — 890파일에 Spring import 0을 유지하느라 컴포지션 루트에 명시 조립 코드를 쓰는 비용을 지불하고 있다. 그 비용을 지불한 이유를 예제가 부정하면, fork 사용자는 비용만 물려받고 이유는 못 배운다.
#### H4-b. (원 지적 유지) 샘플 main 9,387줄에 ArchUnit 룰이 하나도 **실행되지** 않는다
- **현상**: 템플릿 사용자가 "이렇게 쓰면 된다"고 보고 베끼는 유일한 완결 예제가, 이 저장소의 아키텍처 검증 전체에서 제외돼 있다.
- **근거**:
- ArchUnit 스위트는 전부 `src/app-bootstrap/src/architectureTest/`에 있고 `@AnalyzeClasses(packages = "dev.caskeleton")`로 **app-bootstrap의 테스트 클래스패스**를 읽는다(`DisabledAdapterArchitectureTest:32`, `CompositionRootBoundaryArchitectureTest:39-41`).
- app-bootstrap은 sample-portfolio에 의존하지 않는다(`build.gradle:78-122`, `modules.json` allowed_dependencies). ∴ ArchUnit이 샘플 클래스를 **볼 수 없다**.
- sample-portfolio 자체에 ArchUnit이 없다 — `grep -rln "archunit\|ArchRule\|AnalyzeClasses" src/sample-portfolio` 결과 **0건**.
- `ArchitecturePlugin.java:125`가 `verifyNoIgnoredSourcePackages`에서도 샘플을 제외한다.
- **왜 문제인가 (구체적 시나리오)**: `SamplePortfolioApplication:27-28`은 `@ComponentScan(basePackages = "dev.caskeleton")`이고 **auto-configuration 소유 패키지를 하나도 제외하지 않는다** — production 루트가 13개 패턴으로 제외하는 바로 그 패키지들(`adapter.outbound.persistence..`, `adapter.inbound.web.mvc.error..` 등)을 광범위 스캔한다. `CaSkeletonApplication:32-37` Javadoc이 이걸 안티패턴이라고 명시한다: *"광범위 스캔 안에 두면 컴포넌트 스캐너가 각 하위 설정을 독립적으로 발견해 스위치가 뭐라 하든 능력을 조립한다."* **fork 사용자가 샘플을 시작점으로 복사하면 정확히 그 상태를 얻는다.** 룰이 하나라도 걸려 있었다면 잡혔을 것이다.
- **수정 방향**: 샘플에 `architectureTest` 소스셋을 추가하고 최소한 `DOMAIN_IS_PURE`, `CONTROLLERS_DO_NOT_ACCESS_REPOSITORIES_OR_JPA_ENTITIES`, `WEB_DTOS_STAY_IN_WEB_ADAPTER` 3개는 적용한다. 룰 팩은 이미 재사용 가능한 형태(`CleanArchitectureRuleSupport`)로 존재한다.
- **반론과 재반박**: "샘플은 fixture라 production 규칙을 적용할 이유가 없다. 삭제 가능해야 하므로 검증 부담을 지우면 안 된다." fixture라는 건 맞지만 **이 fixture의 용도는 '따라 쓰라'**이다(`README.md`, `CLAUDE.md` 모두 sample-portfolio를 참조 소비자로 지시). 따라 쓰라고 만든 예제가 규칙을 안 지켜도 되는 유일한 모듈이면, 규칙은 예제를 통해 전파되지 않고 문서를 통해서만 전파된다 — 이 저장소가 스스로 부정하는 방식이다.
#### H5. 진행 중인 이관이 **원자적이지 않다** — 삭제는 tracked, 신규는 전부 untracked
- **현상**: 능력별 조립과 테스트를 leaf로 옮기는 작업에서 **원본 삭제는 git이 추적하고, 목적지 신규 파일 175개(+21,270줄)는 전부 untracked**다. `git commit -a`나 `git add -u`로 커밋하면 **삭제만 반영되고 목적지는 사라진다.**
- **근거**:
- `status.txt`의 `??` 항목 92개 — 디렉터리 단위 표시 포함해 실제 175파일
- 이 영역에서 통째로 untracked인 **신규 소스셋**: `sample-portfolio/src/{integrationTest,systemTest,webSystemTest,testFixtures}` (2,081줄), `adapter/outbound/httpclient/src/main/resources/`(= `.imports` 파일 자체), `adapter/outbound/notification/src/main/resources/`, `adapter/outbound/persistence-jpa/src/main/resources/META-INF/`
- 동시에 tracked 삭제 쪽에는 그 소스셋의 원본이 있다 — `D sample-portfolio/src/test/.../OpenApiDriftContractTest.java`, `D .../OpenApiSnapshotTest.java`, `D .../application-test.yml`, `D .../worklogs-openapi-snapshot.json`, `D app-bootstrap/src/integrationTest/...` 8개
- **왜 문제인가 (구체적 실패 시나리오)**: `sample-portfolio/build.gradle:140-143,150,166-168`의 `strictTestLanes`가 `requires(...)`로 클래스 이름을 지정한다. 신규 소스셋이 커밋되지 않으면 그 클래스가 없어지고 **fail-closed `requires`가 빌드를 실패시킨다** — 이건 그나마 큰 소리로 실패한다. 진짜 위험은 **`.imports` 3개다**: `httpclient`·`notification`·`persistence-jpa`의 `AutoConfiguration.imports`가 전부 untracked 신규 파일이다. 이게 빠지면 세 능력이 **C1과 똑같은 상태 — 클래스는 있는데 등록되지 않음 — 이 되고, 아무 빌드도 실패하지 않는다.** notification/httpclient/jpa가 조용히 조립되지 않는 배포가 나간다.
로컬에서 `:app-bootstrap:test`만 도는 개발자에게는 무신호다. 소스셋 부재는 CI가 잡을 수 있지만 `.imports` 부재는 **런타임 조립 테스트가 있어야만** 잡히고, §5 C1이 말하듯 그 테스트가 없다.
- **수정 방향**: 커밋 전에 `git status --porcelain | grep '^??'`가 비어 있는지 확인한다. 그리고 `.imports` 3개는 **삭제된 원본과 같은 커밋**에 들어가야 한다. 근본 대책은 C1의 "on-inventory 테스트" — 그게 있으면 `.imports` 누락이 빌드 실패로 바뀐다.
- **반론과 재반박**: "작업 중인 워킹트리라 당연하다." 그렇다. 그래서 severity를 Critical이 아니라 High로 뒀다. 다만 이 리뷰의 대상이 "커밋되지 않은 상태 포함"이고, 삭제 22,532줄과 신규 21,270줄이 **서로 다른 git 상태에 있다**는 것은 그 자체로 보고할 사실이다.
---
### Medium
#### M8. `@ConfigurationPropertiesScan`에 탑재되지 않은 leaf 2개가 남아 있다
- **현상**: `CaSkeletonApplication:70,72`가 `dev.caskeleton.adapter.inbound.grpc`와 `dev.caskeleton.adapter.inbound.websocket`을 `@ConfigurationPropertiesScan` 대상으로 나열한다. **두 프로젝트는 app-bootstrap의 main 의존이 아니다.**
- **근거**:
- `CaSkeletonApplication.java:70` `"dev.caskeleton.adapter.inbound.grpc"`, `:72` `"dev.caskeleton.adapter.inbound.websocket"`
- `app-bootstrap/build.gradle` — 두 프로젝트는 `conditionalTransportTestImplementation`으로만 등장(214-215행). main api/implementation/compileOnly/runtimeOnly에 없음
- `modules.json`의 `app-bootstrap.allowed_dependencies` 15개에 둘 다 없음 → **레지스트리가 맞고 스캔 목록이 낡았다**
- **왜 문제인가**: 배포 jar에 해당 패키지가 없으므로 스캔은 아무것도 찾지 못하고 조용히 넘어간다 — 지금은 무해하다. 문제는 이 목록의 **의미**다. `CaSkeletonApplication:20-30` Javadoc이 이 목록을 "`excludeFilters`를 쓸 수 없어서 스캔할 패키지를 직접 나열한 것"이라 설명하고, **다섯 개 옵셔널 어댑터가 여기 없는 것이 마스터 스위치와 settings 바인딩을 묶는 장치**라고 못박는다. 즉 이 목록은 한 줄 한 줄이 의도의 선언인데, 두 줄이 사실이 아니다. 목록을 신뢰해서 "grpc는 스캔 대상이니 탑재된 것"이라고 읽는 사람이 나온다.
- **이 불일치를 잡는 검사가 없다**: `verifyCleanArchitectureDependencies`는 Gradle project edge만 보고 Java 애노테이션 문자열은 안 본다. ArchUnit 룰 86개에도 "`@ConfigurationPropertiesScan` 목록은 실제 의존과 일치해야 한다"는 룰이 없다.
- **수정 방향**: 두 줄 삭제. 또는 목록을 `modules.json`의 `allowed_dependencies`에서 유도한다.
#### M9. 루트 `CLAUDE.md`가 `modules.json`에 **존재하지 않는 키**를 읽으라고 지시한다
- **현상**: 루트 `CLAUDE.md:75`가 *"Read its `gradle_path`, `allowed_dependencies`, and **`runtime_memberships`** from `src/config/architecture/modules.json`"*이라고 쓴다. 그 키는 없다.
- **근거**:
- `modules.json` 파싱 결과 — 모듈 62개의 키는 `id`(62) / `gradle_path`(62) / `source_path`(62) / `allowed_dependencies`(62) / `build`(18) **뿐**. 파일 전체 텍스트에 `runtime_memberships` 문자열 0회.
- 루트 `CLAUDE.md:44-47`도 레지스트리가 *"the exact runtime memberships of both composition roots"*를 소유한다고 쓴다. 실제로 있는 건 `composition_roots: ["app-bootstrap", "sample-portfolio"]` 평면 배열 하나다.
- 설계는 있었다 — `docs/superpowers/specs/2026-08-02-conditional-inbound-transport-boundary-design.md:22`가 *"Every entry in `config/architecture/modules.json` gains an exact `runtime_memberships` array"*라고 쓰고, `2026-08-30-grpc-platform-adaptation-design.md:94` D8이 그 키를 근거로 신규 leaf 정책을 정한다. **구현되지 않았거나 되돌려졌다.**
- 실제 런타임 멤버십은 resolved runtimeClasspath에서 파생된다 — `app-bootstrap/build.gradle:300-301`: *"Runtime project membership is derived directly by verifyRuntimeModuleRegistry from the resolved runtimeClasspath. No generated snapshot is maintained here."*
- **왜 문제인가**: 루트 `CLAUDE.md`는 이 저장소에서 **에이전트와 신규 기여자가 가장 먼저 읽는 문서**이고, 스스로 "개별 leaf의 edge를 기억에서 추론하지 말고 반드시 이 JSON을 읽어라"라고 지시한다. 그 지시가 없는 키를 가리킨다. 지시를 따르려는 사람은 파일을 열고 키가 없다는 사실에서 멈추거나, 더 나쁘게는 `composition_roots` 배열을 그 키로 오인한다. 그리고 `CLAUDE.md`가 스스로 *"코드가 문서와 어긋나면 코드가 사실이고 문서가 결함"*이라고 쓴 규칙의 적용 대상이 자기 자신이다.
- **수정 방향**: `CLAUDE.md:75`에서 `runtime_memberships`를 빼고, 런타임 멤버십의 실제 SSOT(`verifyRuntimeModuleMembership`이 resolved runtimeClasspath에서 파생)를 명시한다. 또는 그 키를 실제로 도입한다 — 2026-08-02 spec이 이미 설계를 갖고 있다.
- **반론과 재반박**: "문서 오타 수준이다." 아니다. 이 저장소의 HARD-STOP 5번이 "의존이 `modules.json`을 위반"이고, 루트 문서가 그 파일의 스키마를 틀리게 기술하면 **위반 판정의 기준 자체가 흔들린다.** 그리고 §5 M8과 같은 뿌리다 — 레지스트리를 SSOT라고 선언하면서 레지스트리와 코드/문서를 대조하는 검사가 없다.
#### M10. `build.gradle`의 주석이 graphql에 대해 **사실과 반대**로 적혀 있다
- **현상**: `app-bootstrap/build.gradle:211-212` — *"Explicit qualification-only composition. These projects remain absent from main api/implementation/compileOnly/runtimeOnly and therefore from both shipped runtime graphs."* 바로 아래 213-215행이 graphql·grpc·websocket 셋을 나열하는데, **graphql은 같은 파일 120행에 `implementation project(':adapter:inbound:graphql')`로 이미 있다.**
- **근거**: `build.gradle:120` vs `:211-215`. 그리고 116-119행 주석이 정반대를 설명한다 — *"Shipped so an operator can enable the transport with one environment variable."*
- **부수 효과**: `conditionalTransportTestImplementation project(':adapter:inbound:graphql')`(213행)는 **중복 edge**다. graphql은 이미 main 클래스패스에 있으므로 이 선언은 아무것도 추가하지 않는다.
- **테스트는 옳다**: `ConditionalTransportCompositionContractTest`가 graphql을 `SWITCH_GATED_TRANSPORTS`(30-33행)에, grpc/websocket을 `BUILD_ONLY_TRANSPORTS`(22-27행)에 넣고, 60행에서 `bootstrapBuild).contains("project(':adapter:inbound:graphql')")`를 단정한다. **코드가 사실이고 주석이 결함이다.**
- **수정 방향**: 211-212행 주석을 grpc/websocket만 가리키도록 고치고, 213행 중복 선언을 지운다.
#### M11. 릴리스·PR 워크플로 2개가 ArchUnit 96개를 **소스셋이 틀린 태스크로** 부른다
- **현상**: ArchUnit 룰은 `architectureTest` 소스셋에 있는데, 두 워크플로가 `:app-bootstrap:test`에 `--tests 'dev.caskeleton.bootstrap.architecture.*'` 필터를 건다. 그 필터는 `test` 소스셋에서 **아무것도 매칭하지 않는다.**
- **근거**:
- `.github/workflows/release.yml:65` — `:app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*'`
- `.github/workflows/fileserver-pr.yml:53` — 동일 패턴
- 대조군(올바름): `.github/workflows/notification-platform.yml:85`, `jpa-release.yml:125` — 둘 다 `:app-bootstrap:architectureTest`
- 소스셋 분리는 `app-bootstrap/build.gradle:26-30, 45-53`이 선언한다. `test`에는 `dev.caskeleton.bootstrap.architecture.*` 클래스가 없다.
- 저장소 전체에 `failOnNoMatchingTests`/`failOnNoDiscoveredTests`를 **끄는 설정이 없다** — Gradle 기본값이 `true`이므로 이 스텝은 "No tests found for given includes"로 **실패**한다.
- **왜 문제인가**: 둘 중 어느 결과든 나쁘다. 실패한다면 릴리스 게이트가 깨져 있는 것이고, 어떤 경로로든 통과한다면 **릴리스가 아키텍처 룰 86개를 0개 실행하고 초록을 보고한다.** `ArchRuleDiscoveryContractTest`(§6 K6)가 "룰이 조용히 안 도는 것"을 막으려고 만들어졌는데, 그 방어가 **태스크 이름 한 단어 위에서 무력화**된다 — 룰이 선언돼 있고 발견 가능해도 아무도 그 태스크를 부르지 않으면 같은 결과다.
- **수정 방향**: 두 워크플로를 `:app-bootstrap:architectureTest`로 바꾼다. 그리고 `ReleaseManifestTaskExistenceTest`(`test/.../registry/ReleaseManifestTaskExistenceTest.java`, 127줄)가 이미 "릴리스 매니페스트가 부르는 태스크가 존재하는가"를 검사하는 자리이므로, **태스크 이름뿐 아니라 그 태스크가 대상 클래스를 실제로 포함하는지**까지 확장하는 것이 근본 대책이다.
- **영역 주의**: CI 워크플로 자체는 다른 에이전트 담당이다. 여기 쓰는 이유는 **호출 대상이 내 영역의 96개 클래스**이고, 이 결함이 K6/M4의 실효성을 직접 결정하기 때문이다.
#### M1. 설정 파일 분할(BOOT-008)이 주석을 키에서 떼어놓았다 — 6곳에서 주석이 **다른 키를 설명한다**
- **현상**: `config/*.yml`로 쪼개면서 주석 블록이 원래 설명하던 키와 분리됐고, 지금은 무관한 키 위에 붙어 있다.
- **근거**:
| 파일:줄 | 주석 내용 | 실제 다음 키 |
|---|---|---|
| `config/runtime.yml:28-37` | "어느 RDBMS vendor 조합을 등록하는가: postgresql \| h2" | `presentation:` (vendor는 `persistence.yml:24`에 있다) |
| `config/runtime.yml:38-48` | "Notification 전송 플랫폼. 기본 비활성…" | `presentation:` (notification은 `notification.yml`) |
| `config/redis.yml:12-15` | "Fileserver R2 정확한 destination/provider 조합…" | **아무것도 없음** (파일 끝) |
| `config/persistence.yml:20-22` | "Canonical HTTP capability activation…" | `persistence: vendor:` (HTTP와 무관) |
| `config/ratelimit.yml:15-17` | "논리 캐시명 → backendId 라우팅(CacheStoreRouter)…" | **아무것도 없음** (파일 끝) |
| `config/fileserver.yml:36-46` | "Outbound HTTP Client platform. 마스터 스위치만 여기…" | `fileserver-platform:` (httpclient는 `httpclient.yml`) |
| `config/observability.yml:169-176` | "optional integration adapter toggles…" | **아무것도 없음** (파일 끝) |
- **왜 문제인가**: 이 저장소 yml 주석은 장식이 아니라 **운영자가 읽는 유일한 설명**이다(레지스트리 199KB는 기계용). `fileserver.yml`을 읽는 운영자가 "HTTP Client platform"을 설명하는 문단 바로 아래에서 `fileserver-platform.enabled`를 보게 된다. 문서-코드 드리프트 중 가장 고치기 쉽고 가장 자주 사람을 속이는 종류다.
- **수정 방향**: 각 주석을 원래 키가 있는 파일로 옮긴다. 소유자 없는 3개(redis/ratelimit/observability 파일 끝)는 삭제한다.
- **반론과 재반박**: "주석일 뿐이니 Low다." 나머지 주석이 예외적으로 유용하기 때문에 Medium이다 — 이 저장소 주석의 신뢰도가 자산인데, 틀린 주석 6개가 그 자산을 깎는다.
- **`RedisCapabilitySettings.validate()` 확인 결과 — M1 판정 유지, 오히려 보강**: 미독으로 남겼던 `validate()` 본문(71-93행)을 읽었다. cache 검증 4개가 전부 **의미 있는 불변조건**이다 — soft TTL ≤ hard TTL("신선하지 않게 되는 시점이 사용 불가가 되는 시점보다 뒤일 수 없다"), hard TTL ≥ minimum floor(78-80행 주석: "그 아래면 항목이 그것을 쓴 왕복보다 빨리 만료돼 읽을 때마다 miss, miss마다 write"), command timeout > 0, key version ≥ 1. **값 범위 검증의 품질은 높다.** M1(주석 위치 어긋남)과는 별개 사안이고, 이 품질이 높기 때문에 주석이 잘못된 키 위에 붙어 있는 비용이 더 크다 — 운영자가 신뢰하고 읽을 만한 주석 체계이기 때문이다. 다만 이 검증은 `RedisCapabilityConfig`가 등록되지 않아 **현재 실행되지 않는다**(§5 C1: `RedisCacheConfig:44`가 `cache.validate()`를 호출하는데 그 설정이 도달 불가).
#### M2. `config/capabilities.yml:71`의 `security:`는 값도 소비자도 없는 유령 키다
- **현상**: 파일 마지막 줄이 ` security:` 이고 그 아래 아무것도 없다(`tail -6 | cat -A`로 개행 확인).
- **근거**: `grep -rn "capabilities.security" src/` → **0건**. `ca-skeleton.capabilities.security`를 바인딩하는 `@ConfigurationProperties`도 없다.
- **왜 문제인가**: YAML에서 값 없는 키는 `null`로 바인딩된다. 지금은 소비자가 없어 무해하지만, 누군가 `ca-skeleton.capabilities.security.*`를 추가하면 이 빈 키가 **상위 property source에서 `null`로 오버라이드**할 수 있다. 그리고 분할 잔해가 남아 있다는 신호 자체가 M1과 같은 원인이다.
- **수정 방향**: 삭제.
#### M3. all-off 배포도 스레드 10개 + 스케줄러를 무조건 띄운다
- **현상**: 능력을 전부 끈 배포에서도 `@Async` 실행기와 `@EnableScheduling`이 켜진다.
- **근거**:
- `async/AsyncExecutorConfig.java:19-21` — `@Configuration @EnableAsync @EnableConfigurationProperties`. 조건 없음. `bootstrap.async`는 컴포넌트 스캔 대상(`CaSkeletonApplication:43`은 `dev.caskeleton.bootstrap`을 스캔하고 `AUTO_CONFIGURED_PACKAGES`는 `autoconfigure`만 제외).
- `config/runtime.yml:61` — `core-size: ${APP_ASYNC_EXECUTOR_CORE_SIZE:10}`. `ThreadPoolTaskExecutor`의 core 스레드는 기동 시 미리 생성되지 않지만, `@EnableAsync`로 프록시 인프라와 실행기 빈이 항상 존재한다.
- `autoconfigure/idempotency/IdempotencyConfig.java:15-17` — `@Configuration @EnableScheduling`, 조건 없음. (C1 때문에 **실제로는 등록도 안 되므로** 현재는 스케줄러가 아예 없다. C1을 고치면 이 항목이 실제 비용으로 살아난다.)
- `FileserverCleanupConfiguration:20-25`는 `@EnableScheduling`을 `@ConditionalOnProperty` 아래 두었다 — 같은 문제를 올바르게 푼 예가 바로 옆에 있다.
- **왜 문제인가**: 브리프의 기준선은 "쓰지 않는 기술은 꺼진 상태로 아무 비용도 물리지 않아야 한다"이다. async 실행기는 "기술"이 아니라 런타임 기본 동작이라 방어 가능하지만, `@EnableScheduling`은 멱등성 능력의 부산물이고 능력이 꺼졌을 때 켜질 이유가 없다.
- **수정 방향**: `IdempotencyConfig`의 `@EnableScheduling`을 provider 선택 조건 아래로 내린다. `Clock` 빈은 별도 무조건 설정으로 분리한다(여러 능력이 공유하므로).
- **반론과 재반박**: "async 실행기는 프레임워크 기본이라 토글 대상이 아니다." 동의한다. 그래서 async는 발견이 아니라 §3.1 표의 "항상 on" 행으로만 기록했다. 발견은 `@EnableScheduling`뿐이다.
#### M4. `DisabledAdapterArchitectureTest`의 게이팅 룰이 선택적 능력 14개 중 **5개만** 커버한다
- **현상**: "옵셔널 어댑터의 모든 `@Bean`은 `@ConditionalOnProperty`로 막혀야 한다"는 룰(`OPTIONAL_ADAPTER_BEANS_ARE_GATED_BY_CONDITIONAL_ON_PROPERTY`)의 대상 패키지가 하드코딩 5개다.
- **근거**: `DisabledAdapterArchitectureTest.java:35-41`
```
..adapter.outbound.messaging.kafka..
..adapter.outbound.cache.redis..
..adapter.outbound.notification.slack..
..adapter.outbound.notification.email..
..adapter.outbound.fileserver..
```
미포함: `adapter.outbound.httpclient`, `adapter.outbound.persistence`(mongo 포함), `adapter.outbound.messaging.rabbit`, `adapter.outbound.notification.platform`, `adapter.outbound.objectstorage`, `adapter.inbound.graphql`, `adapter.inbound.websocket`, `adapter.inbound.grpc`.
- **왜 문제인가**: 커밋 안 된 리팩토링이 `HttpClientPlatformAutoConfiguration` 외 16파일을 `bootstrap.autoconfigure.httpclient` → `adapter/outbound/httpclient/.../autoconfigure/`로 옮겼고, notification 14파일도 `adapter/outbound/notification/platform/autoconfigure/`로 옮겼다(§7). **옮겨간 곳이 바로 이 룰이 보지 않는 패키지다.** 룰의 목록은 `modules.json`이나 `MasterSwitch` enum과 대조되지 않는 리터럴이라, 능력이 추가돼도 자동으로 커버되지 않는다.
- **수정 방향**: 목록을 `..adapter.outbound..` + `..adapter.inbound..`로 넓히고 예외를 명시적 allowlist로 뺀다. 또는 `MasterSwitch` enum과 `modules.json`에서 유도한다.
- **확정 (룰 구현까지 통독함)**: 초판은 "스코프는 읽었고 구현은 미판정"이었다. `DisabledAdapterArchitectureTest` 124줄 전문을 읽었고 `beGatedByAConditionalOnProperty()`(101-123행)의 조건 구현도 확인했다 — **메서드 레벨 또는 선언 클래스 레벨 `@ConditionalOnProperty` 중 하나면 통과**시키고, Javadoc 92-99행이 클래스 레벨을 "약한 형태가 아니라 더 강한 형태"라고 정당화한다(설정 클래스 전체가 건너뛰어지므로 개별 빈이 게이트를 빠뜨릴 수 없다). **구현은 정확하다.** 결함은 오직 적용 범위(`OPTIONAL_ADAPTER_PACKAGES` 리터럴 5개)에 있다.
- **반론과 재반박**: "5개는 '옵셔널 통합 어댑터 템플릿' feature의 범위이고 나머지는 다른 feature 소유다." 그렇다면 다른 feature들의 룰이 어딘가 있어야 하는데, `ArchRuleDiscoveryContractTest`의 핀 86개 목록에 해당 룰이 없다. 범위 분할이 아니라 커버리지 공백이다.
#### M5. `sample-portfolio`가 `verifyCleanArchitectureDependencies`에서 제외돼 있다 — registry edge가 선언만 되고 강제되지 않는다
- **현상**: `modules.json`이 sample-portfolio의 `allowed_dependencies` 7개를 선언하지만 Gradle 게이트는 이 모듈을 건너뛴다.
- **근거**: `ArchitecturePlugin.java:80` — `.filter(sub -> !sub.getPath().equals(":sample-portfolio"))`, 그리고 88행에서 다른 모듈의 `allowed` 집합에서도 제거.
- **판정**: **중요한 방향은 강제된다.** 88행이 모든 모듈의 allowed에서 sample-portfolio를 빼므로, production 모듈이 샘플에 의존하면 `forbidden`으로 잡힌다. 강제되지 않는 건 반대 방향(샘플 → production)이다. 내가 수동 대조한 결과 현재는 정확히 일치한다(7=7).
- **왜 문제인가**: fork 사용자가 샘플에 `implementation project(':adapter:outbound:cache-redis')`를 추가하면 레지스트리 위반인데 빌드는 통과한다. 그리고 CLAUDE.md가 "레지스트리가 SSOT"라고 선언한 것과 어긋난다 — 62개 leaf 중 1개는 SSOT가 강제되지 않는다는 사실이 어디에도 안 쓰여 있다.
- **수정 방향**: 제외를 88행(다른 모듈의 allowed에서 빼기)에만 두고, 80행(declared 집합)에서는 빼지 않는다. 그러면 샘플 자신의 edge도 검사된다.
#### M6. production 컴포지션 루트가 샘플 도메인의 인가 정책을 기본값으로 배포한다
- **현상**: `config/security.yml:39-47`의 `ca-skeleton.authz.role-permissions`가 `worklog:read`, `worklog:write`, `worklog:close`를 담고 있다. `worklog`는 sample-portfolio 전용 도메인이다.
- **근거**: `config/security.yml:40-41`
```yaml
user: worklog:read,worklog:write
admin: worklog:read,worklog:write,worklog:close
```
38행 주석이 스스로 "the sample-portfolio demonstration (§5)"이라고 인정한다.
- **판정 범위**: 코드 누수는 아니다. production leaf의 `worklog` 언급은 전부 Javadoc 예시다(`shared-contract/.../Permission.java:7`, `application-core/.../RequiresPermission.java:13`, `adapter-inbound-web/.../RolePermissionPolicy.java:18-19`). 실제 값이 배포되는 곳은 이 yml 하나다.
- **왜 문제인가**: fork 사용자가 sample-portfolio를 지우면 `user`/`admin` 롤이 존재하지 않는 도메인의 권한을 갖는다. 무해하지만 **정리해야 할 항목이 어디 있는지 아무도 안 알려준다** — 지우는 작업이 "모듈 폴더 삭제"로 끝나지 않는다는 뜻이다.
- **수정 방향**: `role-permissions` 기본값을 빈 맵으로 하고, 예시는 주석 안에만 둔다(`notification.yml:43-52`가 provider 맵에 대해 쓰는 바로 그 방식).
#### M7. `AdapterActivationInventory`의 notification 소유 범위가 좁아졌는데, 같은 위치에 309줄 신규 설정이 들어왔다
- **현상**: 커밋 안 된 변경이 notification off-inventory에서 `dev.caskeleton.bootstrap.autoconfigure.notification` 패키지를 제거했다.
- **근거**: diff `AdapterActivationInventory.java:136-140`
```diff
- Set.of(
- "dev.caskeleton.adapter.outbound.notification",
- "dev.caskeleton.bootstrap.autoconfigure.notification"),
+ Set.of("dev.caskeleton.adapter.outbound.notification"), Set.of(), "notification-"));
```
같은 변경에서 `bootstrap/autoconfigure/notification/NotificationApplicationCompositionAutoConfiguration.java`(309줄, `@Bean` 11개)가 신규 추가됐다.
- **현재 위험은 없다**: 그 설정은 `@ConditionalOnProperty(ca-skeleton.notification.platform.enabled=true)`로 막혀 있다(42-48행). off 상태에서 빈을 만들지 않는다.
- **왜 문제인가**: `FiveAdapterOffInventoryTest`는 **패키지 접두사**로 소유를 판정한다(`AdapterActivationInventory:17-22` Javadoc: "빈 이름이 아니라 패키지로 판정하는 이유는 다음 주에 누가 추가할 빈까지 계속 커버하기 위해서"). 그 성질을 포기한 채 그 패키지에 새 빈 11개를 넣었다. 다음에 그 설정에 조건 없는 `@Bean`이 추가되면 off-inventory가 잡지 못한다.
- **수정 방향**: 패키지를 소유 목록에 되돌린다. 신규 설정이 게이트돼 있으므로 되돌려도 지금 테스트는 통과한다.
---
### Low
#### L1. `conditionalTransportTest`는 텍스트 매칭이지 런타임 증명이 아니다 — 이름이 오해를 부른다
- **근거**: `ConditionalTransportCompositionContractTest`의 단정 4종이 전부 파일 텍스트다 — `build.gradle`을 문자열로 읽어 정규식 매칭(96-104행), `Class.forName`(106-112행), `application.yml`에 `"classpath:config/graphql.yml"` 포함 여부(64행), `compose-profile-contracts.json`에 `"off-local"` 문자열 포함 여부(75-83행).
- **판정**: 이 테스트 자체는 **정직하다.** Javadoc 14-17행이 "런타임 동작은 named compose qualification lane이 증명한다"고 명시하고, 70-84행 테스트는 그 lane이 선언돼 있는지를 확인한다. 실제 증명은 `compose-profile-contracts.json`의 15개 lane(전부 `blocking: true`)이 한다. 설계는 맞다.
- **Low인 이유**: 소스셋 이름(`conditionalTransportTest`)과 Gradle 태스크 이름(`conditionalTransportCompositionTest`)이 "조건부 트랜스포트의 런타임 동작을 검증한다"고 읽힌다. 실제로는 "빌드 파일이 옳게 쓰였는지"를 본다. 이름을 `conditionalTransportBuildContractTest` 정도로 바꾸면 오해가 사라진다.
#### L2. `JpaOffAutoConfigurationImportFilter`가 Spring Boot 4 클래스명 10개를 하드코딩하고 **조용히 실패한다**
- **근거**: `JpaOffAutoConfigurationImportFilter.java:24-35`의 FQCN 10개는 Boot 4에서 모듈 재배치된 새 이름들(`org.springframework.boot.jdbc.autoconfigure.*`, `org.springframework.boot.flyway.autoconfigure.*`). 18-19행 Javadoc이 스스로 인정한다 — **"오타가 있으면 조용히 fail-open한다(필터가 그냥 매칭 안 됨). 그래서 이걸 지키는 테스트는 반환값이 아니라 빈 부재를 단정한다."**
- **판정**: 위험 인지와 대응이 이미 문서화됐고, `FiveAdapterOffInventoryTest`가 실제 부팅으로 벤더 패키지(`com.zaxxer.hikari`, `org.flywaydb`, `org.hibernate` 등 11개) 빈 0개를 단정한다(`AdapterActivationInventory:101-113`). **방어가 제대로 걸려 있다.** Boot 마이너 업그레이드 시 이 파일을 확인 목록에 넣어야 한다는 정도가 남는 부담이다.
#### L3. `TestEnclosedConfigurationFilter`가 sample-portfolio의 production jar에 들어간다
- **근거**: `src/sample-portfolio/src/main/java/.../bootstrap/scan/TestEnclosedConfigurationFilter.java` — 유일한 목적은 "테스트 클래스 안에 중첩된 `@Configuration`을 스캔에서 빼기"이고, `SamplePortfolioApplication:42-44`가 production 애노테이션으로 참조한다. 클래스 이름이 `Test`로 끝나는지 문자열 검사를 한다(27행).
- **판정**: 샘플은 fixture이므로 치명적이지 않다. 다만 fork 사용자가 `SamplePortfolioApplication`을 복사하면 이 필터도 따라온다. 근본 원인은 §H4 — 샘플이 `dev.caskeleton` 전체를 스캔해서 테스트 클래스까지 후보에 넣는다는 점이다. app-bootstrap은 같은 문제를 `ShippedCompositionHarness`의 `TestSourceExcludeFilter`로 **테스트 쪽에서** 푼다(115-124행) — production 코드에 테스트 대응 필터를 넣지 않는다. 같은 문제, 한쪽만 옳은 자리에 풀었다.
---
## 6. 바꾸지 말 것 (Keep)
### K1. `JpaOffAutoConfigurationImportFilter` — 이 저장소에서 "꺼지면 진짜 꺼진다"가 성립하는 유일한 구조적 장치
- **무엇**: `spring.factories:12-13`로 등록된 `AutoConfigurationImportFilter`가 Boot 자체의 DataSource/JDBC/Hibernate/JPA/Flyway auto-configuration 10개를 **후보 집합에서 제거**한다. 조건은 `DataSourceRequirement.isRequired()`.
- **왜 지금 이게 맞는가**: `@ConditionalOnProperty`는 **이 저장소가 쓴 조건**만 막는다. 스타터가 클래스패스에 올라와 있으면 Boot의 auto-config는 그 조건을 모르고 풀을 열고 마이그레이션을 돌린다(`JpaOffAutoConfigurationImportFilter:10-16` Javadoc이 정확히 이걸 말한다). 그리고 질문을 "JPA가 꺼졌나"가 아니라 "커넥션을 요구하는 능력이 있나"로 던진 것이 핵심이다 — 풀 소비자는 아웃박스·JDBC 멱등성·멀티인스턴스 락·알림 저장소·Fileserver 다섯이고, JPA만 보면 **둘 중 하나가 깨진다**(안 쓰는 풀을 열거나, 정당한 소비자를 조용히 망가뜨리거나).
- **언제 재검토**: Spring Boot가 major 업그레이드로 auto-configuration FQCN을 또 옮길 때. 그때 이 10개 문자열이 첫 확인 대상이다. `FiveAdapterOffInventoryTest`가 그 실패를 잡아주므로 침묵 회귀는 아니다.
### K2. 능력 의존 검사를 `EnvironmentPostProcessor`로 올리고 빈으로도 **남겨둔** 이중 배치
- **무엇**: `CapabilityDependencyValidator`(순수 함수)를 `CapabilityDependencyEnvironmentValidator`(EnvironmentPostProcessor)와 `CapabilityDependencyStartupCheck`(InitializingBean) 둘이 호출한다.
- **왜 지금 이게 맞는가**: 언뜻 중복 같지만 아니다. `CapabilityDependencyEnvironmentValidator:20-38` Javadoc이 증거와 함께 설명한다 — `InitializingBean`만 있을 때 Hibernate/Flyway가 refresh 중에 먼저 죽어서 운영자는 `Connection to localhost:5433 refused`를 봤다. 이름 붙은 스위치 메시지가 존재하는데 **한 번도 먼저 출력되지 않았다**. 그래서 환경 단계로 올렸다. 동시에 빈을 지우지 않은 이유도 명시돼 있다 — `ApplicationContextRunner`와 슬라이스 테스트는 `spring.factories`를 읽지 않으므로, 빈이 없으면 **테스트에서 이 규칙이 사라진다**. 두 실행 경로가 서로 다른 것을 보증한다.
- **언제 재검토**: 슬라이스 테스트가 `spring.factories`를 읽는 하네스로 통일되면 빈 쪽을 지울 수 있다.
### K3. 15개 compose lane을 `compose-profile-contracts.json` 한 파일에 선언하고 전부 blocking으로 둔 것
- **무엇**: `src/config/runtime/compose-profile-contracts.json` — lane마다 compose 파일 스택, **명시적 Spring 런타임**, 렌더돼야 할 서비스 **정확 집합**, `activationEnv`, `expectedSwitchesOn`, `expectedPersistenceVendor`를 고정한다. `off-local`/`off-dev`/`off-prod` 3개가 all-off, 나머지가 능력별 on, `all-adapters`가 5개 동시 on.
- **왜 지금 이게 맞는가**: 이게 **"꺼지면 꺼진다"의 진짜 증거**다. 단위 테스트나 `ApplicationContextRunner`로는 얻을 수 없는 두 가지를 얻는다 — 광범위 컴포넌트 스캔과 스타터가 끌고 오는 벤더 auto-configuration. 그리고 `$comment`(2행)가 "정확 집합, superset 아님 — 조용히 서비스가 늘어난 lane은 다른 것을 증명하는 lane이다"라고 근거를 남겼다. `AdapterActivationEndpoint`와 짝을 이뤄 lane이 **자기 입력이 아니라 애플리케이션의 답**을 검사한다.
- **언제 재검토**: lane 실행 시간이 CI 예산을 넘으면 `blocking`을 일부 내릴 수 있다. 다만 `off-local`/`off-dev`/`off-prod` 3개는 마지막까지 blocking으로 남겨야 한다 — all-off가 뜨지 않는 템플릿은 템플릿이 아니다.
- **현재 공백 (Keep이지만 확장 필요)**: 15개 lane 중 redis를 켜는 lane이 **0개**다(`APP_REDIS_ENABLED`가 어느 `activationEnv`에도 없다). cache/lease/idempotency/rate-limit provider, fileserver, fileserver-platform, httpclient도 마찬가지. `expectedSwitchesOn`이 `MasterSwitch` 5개 + graphql만 다룬다. C1이 몇 달간 발견되지 않은 직접적 이유가 이 공백이다.
### K4. `MasterSwitch` enum + `MasterSwitchParser`의 "true에 가까운 값은 거부한다" 정책
- **무엇**: `shared-contract/.../MasterSwitch.java`가 스위치 5개의 프로퍼티명·env명·폐기된 별칭을 한 곳에 소유하고, `MasterSwitchEnvironmentPostProcessor:46-52`가 `true`/`false` 정확 일치가 아닌 값을 **off로 읽지 않고 기동 실패**시킨다.
- **왜 지금 이게 맞는가**: `APP_MESSAGING_ENABLED=TRUE`나 `=1`을 관대하게 off로 읽으면, 운영자는 켰다고 믿고 시스템은 꺼져 있다. 거부 메시지가 그 상황을 정확히 표현한다 — *"불리언에 이만큼 가까운 값은 스위치를 설정했다고 믿는 배포다."* 그리고 `legacyProperties()`(86-88행)가 폐기 키를 `Ambiguous`/`LegacyOnly`로 구분해 거부한다 — 구 키만 있으면 "대체 키를 설정하라", 둘 다 있으면 "오늘은 같지만 누가 하나 고치는 순간 갈라진다". 두 상황을 구분한 건 제대로 된 판단이다.
- **언제 재검토**: 마스터 스위치가 5개를 넘어 10개 이상이 되면 enum이 아니라 레지스트리 파일로 옮길 시점이다. 지금은 enum이 컴파일 타임 보증을 주므로 더 낫다.
### K5. `app-bootstrap`의 소스셋 6개 분리 — 폴더 취향이 아니라 클래스패스 계약이다
- **무엇**: `main`/`test`/`architectureTest`/`integrationTest`/`systemTest`/`conditionalTransportTest`.
- **왜 지금 이게 맞는가**: 각 경계에 **의존성 차이**가 붙어 있고 그게 강제 수단이다.
- `build.gradle:157-163` — Testcontainers를 `integrationTestImplementation`에만 두고 `testImplementation`에는 안 둔다. 주석이 이유를 쓴다: *"소스셋 경계가 BOOT-014를 강제하는 장치이고, test 클래스패스에 남긴 의존성은 import 한 줄로 경계를 되넘을 수 있게 만든다."* `./gradlew :app-bootstrap:test`가 Docker를 요구하지 않는다는 성질을 **선언이 아니라 구조로** 보장한다.
- `build.gradle:185` — `architectureTestCompileOnly 'org.apache.kafka:kafka-clients'`. 도메인이 브로커 SDK 타입에 의존할 수 없음을 증명하는 positive-control fixture만을 위해, main/test 클래스패스에는 절대 안 들어가게.
- `build.gradle:213-215` — graphql/grpc/websocket을 `conditionalTransportTestImplementation`에만. 그래서 `ConditionalTransportCompositionContractTest`가 `Class.forName`으로 "존재하지만 배포되지 않음"을 증명할 수 있다.
- **언제 재검토**: 소스셋이 8개를 넘으면 `ca.auxiliary-source-set` DSL이 감당하는 범위를 넘는다. 지금 6개는 각각 다른 클래스패스를 정당화한다.
### K6. `ArchRuleDiscoveryContractTest` — 검증 스위트가 조용히 꺼지는 것을 막는 메타 테스트
- **무엇**: `@ArchTest` 룰 이름 **86개를 전부 리터럴로 핀**하고(77-162행), 들여쓰기 깊이로 "중첩 클래스 안에 선언된 룰"을 탐지한다(175-195행).
- **왜 지금 이게 맞는가**: Javadoc 22-31행이 왜 이걸 **먼저** 만들었는지 설명한다 — 2,792줄 `CleanArchitectureTest`를 중첩 클래스로 쪼개려다 확인해보니 **ArchUnit 엔진은 중첩 클래스의 `@ArchTest` 필드를 발견하지 못한다**. 빌드는 초록, 리포트는 없음, 룰 75개가 그냥 안 돌았을 것. *"검증 스위트가 가질 수 있는 최악의 실패"*다. 그래서 가드를 먼저 만들고 분할을 나중에 했다. 개수가 아니라 **이름으로** 핀한 것도 옳다 — 개수는 하나 지우고 하나 추가하면 만족되는데, 그게 리뷰어가 가장 명시적으로 보고 싶어 하는 치환이다.
- **언제 재검토**: 없다. 이건 이 저장소 검증 인프라의 최상위 자산이다. 룰이 추가/삭제될 때 이 목록을 함께 고치는 부담은 정확히 의도된 비용이다.
- **단서 2개 (Keep이지만 보완 필요)**:
1. **비공허성(non-vacuity) 커버리지는 55/86이다.** `ArchitectureViolationFixtureTest`가 "이 룰이 의도한 위반에 실제로 발화하는가"를 negative fixture로 증명하는데, `@Test`가 **55개**이고 선언된 룰은 **86개**다. → **31개 룰은 발화 증명이 없다.** 그 파일 Javadoc 35-38행이 위험을 정확히 쓴다 — *"a rule that silently no-matches in production (e.g. a predicate referencing a package nothing in the codebase happens to populate) would pass vacuously."* `ArchRuleDiscoveryContractTest`는 룰이 **발견되는지**를 보장하고, 이 파일은 룰이 **작동하는지**를 보장한다. 후자가 64%다.
2. **이 스위트를 릴리스에서 부르는 워크플로 2개가 소스셋을 틀렸다** → M11. 룰이 발견되고 작동해도 호출되지 않으면 결과는 같다.
### K7. `CompositionRootBoundaryArchitectureTest`의 allowlist에 **임계값**을 명문화한 것
- **무엇**: "컴포지션 루트는 조립하지 포트를 구현하지 않는다" 룰의 유일한 production 예외인 `MeteredDistributedLockPort`에 대해, Javadoc 44-53행이 예외의 수명 조건을 쓴다: *"두 번째 데코레이터가 생기면 둘 다 `adapter:outbound:support`로 옮긴다. 하나는 특수 사례고, 둘은 범주다."*
- **왜 지금 이게 맞는가**: allowlist는 보통 한 방향으로만 자란다. 임계값을 숫자로 못 박으면 다음 사람이 "하나 더 추가하기"를 취향 문제가 아니라 **선언된 규칙 위반**으로 만난다. 그리고 반대 논거("메트릭은 retry/cache 같은 횡단 관심사고, 그게 모이는 게 컴포지션 루트가 다시 비대해지는 방식이다")를 함께 적어뒀다.
- **언제 재검토**: 두 번째 데코레이터가 생길 때. 그때가 이 항목이 스스로 정한 만료일이다.
### K8. `sample-portfolio`를 별도 `bootJar`와 별도 컴포지션 루트로 둔 것 (중복 1,147줄에도 불구하고)
- **무엇**: 샘플이 app-bootstrap의 `TracingConfig`/`IdempotencyConfig`/`MetricsContractConfig`/`PseudonymizationConfig`/`ManagementSecurityConfig`를 **재사용하지 않고 복제**한다(`bootstrap/` 24파일).
- **왜 지금 이게 맞는가**: 대안은 샘플이 app-bootstrap에 의존하는 것이고, 그러면 **production 컴포지션 루트가 fixture의 요구사항을 지게 된다**. 샘플이 필요로 하는 순간 app-bootstrap의 빈은 더 이상 자유롭게 바꿀 수 없다. 지금은 `modules.json`에서 두 루트가 서로를 모르고, `ArchitecturePlugin:88`이 production→샘플 edge를 금지한다. **"샘플 폴더를 지우면 production이 안 깨진다"가 구조적 사실**이고, 그게 템플릿에서는 중복 1,147줄보다 비싼 성질이다.
- **언제 재검토**: 복제본이 원본과 **동작상 갈라지기** 시작하면. 지금 이미 갈라진 게 있다(§8: `ddl-auto` 기본값, `out-of-order`, 가상 스레드). 갈라짐이 3개를 넘으면 샘플이 "참조 구현"이 아니라 "다른 애플리케이션"이 되고, 그때는 공유 `testFixtures` 모듈로 뽑을 근거가 생긴다.
---
### K9. `CapabilityStartupValidationException`을 `adapter:outbound:support`에 둔 것 — 조립은 흩뿌리고 실패 보고는 중앙에 남긴 해법
- **무엇**: `adapter/outbound/support/CapabilityStartupValidationException:12-13` — `IllegalStateException` + Spring Boot `ExitCodeGenerator`(exit 78). leaf의 auto-configuration이 fail-closed 검증을 던질 때 쓴다. app-bootstrap의 `StartupFailureExceptionReporter:22-27`이 원인 사슬에서 이 타입을 찾으면 저장소 표준 구조화 로그(`StartupFailures.emit(STARTUP_VALIDATION_FAILED, ...)`)를 찍는다.
- **왜 지금 이게 맞는가**: 능력 조립이 leaf로 흩어지면 각 leaf가 자기 설정 오류를 스스로 거부해야 하는데, 그러려면 저장소의 종료코드/로그 계약을 알아야 한다. 그 계약이 app-bootstrap에 있으면 **leaf → app-bootstrap 의존이 생기고, 이관이 금지한 바로 그 edge가 된다**(모든 ownership spec의 §Boundary가 "The leaf must not depend on app-bootstrap"을 명시). 해법은 계약의 *타입*만 공통 leaf로 내리고, 그 타입을 *해석*하는 쪽은 컴포지션 루트에 남기는 것이다. 클래스 Javadoc 8-10행이 정확히 그렇게 쓴다 — *"The type deliberately lives below the composition root so capability-owned auto-configuration can fail closed without depending on app-bootstrap."* 그리고 httpclient spec이 조건을 한 번 더 명시한다 — *"The support exception does not know bootstrap internals."*
- **언제 재검토**: support leaf에 이런 "계약 타입"이 3개를 넘기 시작하면. 지금은 3개(`CapabilityStartupValidationException`·`EnvironmentSecretSource`·`StrictSettingsBinder`)이고 각각 성격이 다르다. 같은 성격이 셋 이상 모이면 `shared-contract`로 옮길지 판단할 시점이다.
## 7. 커밋 안 된 리팩토링이 이 영역에 미친 영향
> **정정.** 초판은 `git diff HEAD`(tracked만)로 판정했다. untracked 175파일 **+21,270줄**이 그 diff에 없다. 실제 순증감은 **−22,532 + 2,374 + 21,270 ≈ +1,112줄**이다. "검증 표면 축소"가 아니라 **거의 등량 이동**이다.
### 7.0 실제 규모 — 무엇이 어디로 갔나
untracked 신규 21,270줄의 leaf별 분포(내가 `untracked-wc.txt`를 집계):
| 목적지 | 신규 줄 | 내용 |
|---|---|---|
| `messaging/*` | 4,086 | integrationTest·testFixtures 소스셋 신규 |
| `adapter/outbound/notification` | 3,382 | `platform/autoconfigure/` 12파일 + 테스트 9개 + `.imports` |
| `adapter/outbound/httpclient` | 2,660 | `autoconfigure/` 전체 + integrationTest + `.imports` |
| `adapter/outbound/persistence-mongo` | 2,530 | 헬스 브리지 + mongoIntegrationTest/mongoProviderTestkit 소스셋 |
| `adapter/outbound/persistence-jpa` | 2,320 | `autoconfigure/` 5파일 + postgresqlIntegrationTest 6개 + `.imports` |
| **`sample-portfolio`** | **2,081** | **신규 소스셋 4개** (integrationTest/systemTest/webSystemTest/testFixtures) |
| `adapter/inbound/{graphql,web,websocket}` | 1,482 | systemTest/performanceTest 소스셋 |
| `adapter/outbound/objectstorage` | 622 | integrationTest |
| **`app-bootstrap`** | **992** | 신규 4파일 |
| `adapter/outbound/support` | 179 | `CapabilityStartupValidationException`·`EnvironmentSecretSource`·`StrictSettingsBinder` + 테스트 |
| `application-core` | 188 | `SecretSourcePort` + testFixtures |
| `docs` | — | spec 10 + plan 10 (2026-09-18) |
**app-bootstrap 자체 변화** (HEAD ↔ 스냅샷, 내가 `git show`로 직접 잼):
| | HEAD | 스냅샷 | 변화 |
|---|---|---|---|
| `src/main/java` | 12,619줄 | **8,974줄** | **−3,645 (−29%)** |
| test 계열 5개 소스셋 합 | 32,501줄 | **27,428줄** | **−5,073 (−16%)** |
| **test : main 비율** | 2.58 : 1 | **3.06 : 1** | **오히려 올라감** |
### 7.1 무슨 일이 일어났는가 — 삭제가 아니라 **이관**이다
| 이동한 것 | 어디서 | 어디로 | 파일 수 |
|---|---|---|---|
| HTTP Client 플랫폼 조립 | `bootstrap/autoconfigure/httpclient/` | `adapter/outbound/httpclient/.../autoconfigure/` | 16 |
| Notification 플랫폼 조립 | `bootstrap/autoconfigure/notification/` | `adapter/outbound/notification/platform/autoconfigure/` | 14 |
| Mongo 헬스 브리지 | `bootstrap/autoconfigure/mongo/` | `adapter/outbound/persistence-mongo/` | 2 |
| JPA 관측/트랜잭션 조립 | `bootstrap/autoconfigure/jpa/` | `adapter/outbound/persistence-jpa/.../autoconfigure/` | 2 |
| `StrictSettingsBinder` | `bootstrap/autoconfigure/` | `adapter/outbound/support/` | 1 |
| `SecretSource`/`EnvironmentSecretSource` | `bootstrap/runtime/` | 포트는 `application-core/.../SecretSourcePort`, 구현은 `adapter/outbound/support/` | 2 |
| outbox/lock/idempotency IT 8개 | `app-bootstrap/src/integrationTest/` | `persistence-jpa/src/postgresqlIntegrationTest/` | 8 |
| 샘플 IT/시스템/OpenAPI 테스트 12개 | `sample-portfolio/src/test/` + `posterImageMigrationTest/` | `integrationTest`/`systemTest`/`webSystemTest`/`testFixtures` | 12 |
**이관 대상이 전부 새 위치에 존재하는 것을 개별 확인했다.** 특히 `sample-portfolio/build.gradle`의 `strictTestLanes`가 fail-closed `requires(...)`로 클래스 이름을 지정하는데(140-143, 150, 166-168행), 지정된 7개 클래스가 전부 새 소스셋에 있다. 이관 누락으로 인한 빌드 실패는 없다.
### 7.2 판정 — **안전망을 자른 게 아니라 소유권을 바로잡은 것이다. 다만 검증 표면 2곳이 좁아졌다.**
**긍정 (주된 효과)**: `docs/superpowers/specs/2026-09-18-*.md` 9개가 이관마다 spec+plan을 남겼고, 모두 같은 원칙이다 — **"능력의 Spring 조립은 그 능력을 소유한 leaf가 갖는다. 컴포지션 루트는 애플리케이션 정책만 갖는다."** `PersistenceJpaRootAutoConfiguration:13-23` Javadoc이 분할선을 정확히 쓴다: leaf가 엔티티/리포지토리 탐색·vendor 선택·트랜잭션 런타임을, 루트가 마이그레이션 시퀀싱·해석된 datasource 검증·OSIV/DDL 안전·관리 뷰를 갖는다. **이건 Clean Architecture 방향으로의 개선이다.** app-bootstrap main이 57파일 줄어든 만큼 fork 사용자가 컴포지션 루트를 교체할 때 다시 쓸 코드가 줄었다.
**부정 1 — 게이팅 룰의 사각지대로 이동했다 (→ M4)**: 옮겨간 `adapter/outbound/httpclient/.../autoconfigure/`와 `adapter/outbound/notification/platform/autoconfigure/`는 `DisabledAdapterArchitectureTest`의 `OPTIONAL_ADAPTER_PACKAGES` 5개에 포함되지 않는다. bootstrap에 있을 때는 `CaSkeletonApplication`의 `AUTO_CONFIGURED_PACKAGES` 정규식이 컴포넌트 스캔에서 빼주는 구조적 보호가 있었다. 이제는 어댑터 leaf 자신의 `AutoConfiguration.imports`와 `@ConditionalOnProperty`에만 의존한다. **이관 자체는 옳고, 이관 후 룰 목록을 안 넓힌 게 공백이다.**
**부정 2 — off-inventory 커버리지가 좁아졌다 (→ M7)**: `AdapterActivationInventory`의 notification 소유에서 `bootstrap.autoconfigure.notification`이 빠졌는데, 같은 커밋이 그 패키지에 309줄 신규 설정을 넣었다. 지금은 게이트돼 있어 무해하다.
**부정 3 — 아웃박스 IT의 검증 맥락이 바뀌었다**: `OutboxPublisherLeaderElectionContractTest`, `OutboxRowLifecycleContractTest`, `OutboxAppendTransactionalContractTest`가 app-bootstrap의 `integrationTest`(컴포지션 루트 문맥)에서 persistence-jpa의 `postgresqlIntegrationTest`(어댑터 문맥)로 갔다. 파일은 남았지만 **"컴포지션 루트가 조립한 아웃박스"를 검증하던 것이 "어댑터가 구현한 아웃박스"를 검증하는 것으로 바뀌었다.** C1과 겹치면 뼈아프다 — `OutboxConfig`가 등록되지 않는다는 사실을 잡을 수 있었던 유일한 통합 테스트가 어댑터 레이어로 내려갔다. app-bootstrap `integrationTest`에는 이제 `FileserverCompositionIntegrationTest` **하나**만 남았다.
**부정 4 — 이전에서 빠진 나머지가 C1이다**: 2026-09-18 spec 8개가 다루는 능력은 notification / httpclient / jpa / mongo / postgresql-idempotency / secret-source / 테스트 소유권 / 로깅 상태다. **redis·outbox·tracing·분산락 데코레이터·idempotency 애플리케이션 측은 어느 spec에도 없다.** 이관을 받은 능력은 전부 leaf `.imports`를 얻으면서 등록 문제가 함께 해결됐고, 이관을 못 받은 것이 옛 형태로 남았다 — 그 옛 형태가 도달 불가 상태다(§5 C1). **따라서 C1은 이번 리팩토링이 만든 결함이 아니라, 이번 리팩토링이 아직 손대지 않은 구역의 기존 결함이다.** 진행 중인 작업 방향이 옳다는 증거이면서, 동시에 그 작업이 끝나기 전에는 이 7개가 계속 죽어 있다는 뜻이다.
**검증 못 한 것**: 이 판정은 정적 대조 기반이다. `./gradlew :app-bootstrap:check :sample-portfolio:check --console=plain`을 돌려야 이관이 실제로 컴파일·통과하는지 확정된다. 다만 각 spec의 "Verified result" 절이 `app-bootstrap test`·`architectureTest`·`verifyCleanArchitectureDependencies` PASS를 개별로 주장하고 있어, 이관 자체는 실행 검증을 거친 것으로 보인다.
### 7.3 이관 판정 — 최종
**"검증 표면 축소"가 아니라 "소유권 정규화"다.** 근거 3가지:
1. **순증감이 +1,112줄**이고, 줄어든 곳(app-bootstrap main −3,645)과 늘어난 곳(능력 leaf +12,000 이상)이 spec의 소유권 선언과 1:1로 대응한다.
2. **test:main 비율이 2.58 → 3.06으로 올라갔다.** 브리프 Q8의 "3:1이 깎이는 중"이라는 전제는 **틀렸다** — 브리프가 인용한 `main 8,974 / test 27,216`은 변경 *이후* 숫자이고, 변경 *이전*은 12,619 / 32,501이다. 출발점을 도착점으로 읽은 것이다.
3. **각 spec이 "Verified result"에 회귀 없음을 항목별로 기록**한다(public API 0 증가, leaf→bootstrap import 0, `verifyJpaApiSurface` 불변, `verifyMongoApiSurface` 불변, 500 테스트 통과 등). 삭제를 정당화하는 서술이 아니라 보존을 증명하는 서술이다.
**다만 이관 자체가 새로 만든 위험이 §5 H5(미커밋 신규 소스셋)이다** — 이동이 커밋 단위로 원자적이지 않으면 삭제만 남는다.
---
## 8. 템플릿 사용자 관점
### 8.0 먼저 — "app-bootstrap 테스트가 깎이고 있다"는 전제는 틀렸다
브리프 Q8은 *"app-bootstrap의 test:main 비율 3:1이 지금 diff에서 깎이고 있다"*를 전제로 판정을 요구했다. 실측하면 반대다.
| | HEAD (변경 전) | 스냅샷 (변경 후) | 변화 |
|---|---|---|---|
| `src/main/java` | 12,619 | 8,974 | −29% |
| test 5개 소스셋 | 32,501 | 27,428 | −16% |
| **비율** | **2.58 : 1** | **3.06 : 1** | **↑** |
브리프가 인용한 `main 8,974 / test 27,216`은 **변경 이후** 숫자다. 출발점을 도착점으로 읽었다.
**판정: 깎인 게 아니라 책임과 함께 이동했다.** main에서 나간 3,645줄은 능력별 조립이고 leaf로 갔다(notification +3,382, httpclient +2,660, mongo +2,530, persistence-jpa +2,320). test에서 나간 5,073줄은 provider 의미론 테스트이고 소유 leaf의 provider 소스셋으로 갔다 — `test-architecture-phase2-provider-ownership.md`가 그 원칙을 명문화한다: *"an adapter leaf owns real-provider semantics for the provider it implements; app-bootstrap owns assembly, conditional wiring, authority selection, and whole-application composition... It must not be the only owner of PostgreSQL constraint, migration, lock, outbox, broker, cache, or filesystem-provider semantics."*
**그리고 비율이 올라간 것이 옳다.** 컴포지션 루트는 로직이 없고 배선만 있으므로, main이 줄고 배선 검증이 남으면 비율은 올라가야 한다. 남은 27,428줄 중 architectureTest(100파일)와 systemTest(8파일)는 **다른 어디에도 놓을 수 없는 것들**이다 — 전자는 전체 클래스 그래프를 한 번에 볼 수 있는 유일한 지점이고(`build.gradle:83-85` 주석이 그렇게 쓴다), 후자는 실제 컴포지션 루트를 부팅한다.
**남는 우려 하나**: app-bootstrap `integrationTest`에 이제 `FileserverCompositionIntegrationTest` **한 파일만** 남았다. 컴포지션 루트가 실제 provider를 물고 검증하는 층이 한 겹으로 얇아졌고, 하필 §5 C1을 잡을 수 있었던 아웃박스/락/멱등성 IT가 그 나간 5,073줄에 포함돼 있다. 이관 자체는 옳지만 **"컴포지션 루트가 조립한 결과"를 보는 층이 필요하다** — C1의 수정 방향에 적은 on-inventory 테스트가 그 자리다.
아래부터가 fork해서 이 영역을 쓰는 사람이 **실제로 겪을 일**이다.
### 8.1 첫 기동까지
`local` 프로파일은 `application-local.yml`이 70여 개 플레이스홀더를 전부 답하므로 아무 env 없이 뜬다 — 단, **PostgreSQL 컨테이너가 localhost:5433에 있어야 한다**(56행). 없으면 `./gradlew :app-bootstrap:bootRunH2`를 써야 하고, 이건 별도 이름의 태스크다(`build.gradle:280-298`). 이 선택을 명시적 태스크로 만든 건 좋은 판단이다 — 주석 268-279행이 이유를 쓴다: H2 기본값이 두 번(fs_cleanup_item, request_hash) 마이그레이션-매핑 불일치를 가렸다.
**prod 기동에 반드시 필요한 것** (내가 코드에서 추출한 목록):
1. **`SPRING_PROFILES_ACTIVE=prod`** — 기본값 없음. 없으면 `RuntimeEnvironmentProfileValidator:51-55`가 거부한다.
2. **인라인 기본값 없는 플레이스홀더 6개** — `APP_NAME`, `APP_DATASOURCE_URL`, `APP_DATASOURCE_USERNAME`, `APP_DATASOURCE_PASSWORD`, `APP_SECURITY_JWT_ISSUER`, `APP_SECURITY_JWT_AUDIENCE` (`application.yml` 파싱 결과).
3. **`APP_DATASOURCE_URL`에 `sslmode=verify-full`** — `PostgreSqlTransportSecurityValidator:58-66`. 없으면 exit 71.
4. **`APP_DATASOURCE_DDL_AUTO=none|validate`** — `JpaSchemaSafetyValidator:39-48`.
5. **prod 필수 시크릿 13개** (`SecretSourceValidator:36-50`) — 단 Redis 계열 7개는 해당 역할이 선택됐을 때만(100-102, 135-156행). 실질 필수는 `APP_DATASOURCE_PASSWORD`, `APP_PRIVACY_PSEUDONYMIZATION_SALT`, 그리고 **소비자 없는 3개**(→ H3).
6. **`APP_DATASOURCE_CONNECTION_TIMEOUT`을 밀리초 숫자로** — `application.yml:58-68` 주석이 실화를 기록한다. 기본값이 `"5s"`였고 `HikariConfig#setConnectionTimeout`이 `long`을 받아 **모든 prod/dev 배포가 기동 실패**했다. local은 `application-local.yml`이 덮어써서 통과했다. *"prod lane만이 찾을 수 있는 결함"*. 지금은 `5000`으로 고쳤지만, `HikariPoolConstraintValidator`는 여전히 `DurationStyle`로 읽어서 `"5s"`를 기쁘게 받아들인다 — **검증기가 관대해서 잘못된 값이 지원되는 것처럼 보였다는 사실이 주석에 열린 항목으로 남아 있다.**
### 8.2 손대야 하는 파일 — sample-portfolio를 실제로 지운다고 가정하면
내가 세어봤다. `src/sample-portfolio/` 폴더 삭제 외에:
| 파일 | 무엇을 고쳐야 하나 | 난이도 |
|---|---|---|
| `src/settings.gradle` | 프로젝트 include 제거 | 1줄 |
| `src/config/architecture/modules.json` | leaf 엔트리 + `composition_roots` 배열에서 제거 | 2곳 |
| `src/build.gradle:51,85` | `it.path != ':sample-portfolio'` 필터 2곳 | 삭제 or 유지(무해) |
| `src/build-logic/.../ArchitecturePlugin.java:80,88,125` | 동일 필터 3곳 | 동일 |
| `src/build-tools/.../ConfigContractPlugin.java:37` | `tree.exclude("sample-portfolio/**")` | 동일 |
| `src/build-logic/.../RuntimeMembershipPlugin.java` | 런타임 멤버십 계산에서 제외 로직 | 확인 필요 |
| `src/Dockerfile.sample` | 삭제 | 파일 1개 |
| `src/app-bootstrap/src/main/resources/config/security.yml:39-47` | **`worklog:*` 권한 맵** (→ M6) | 실질 수정 |
| `src/app-bootstrap/src/architectureTest/.../violations/shared/worklog/WorkLogStatus.java` | ArchUnit fixture | 삭제 or 개명 |
| `src/gradle/libs.versions.toml` | 샘플 전용 의존(jqwik, uuid-creator, jackson-databind-nullable) | 확인 필요 |
| `src/README.md`, `README.md`, `AGENTS.md`, `CLAUDE.md`, leaf README/CLAUDE.md 10여 개 | 참조 제거 | 문서 |
**판정: "폴더 삭제로 끝난다"는 아니지만, 빌드가 깨지지 않게 하는 데 필요한 수정은 7~9곳으로 유한하고 전부 기계적이다.** `ArchitecturePlugin:88`이 production→샘플 edge를 금지하므로 **production 코드에는 손댈 게 없다** — 이게 결정적이다. 다만 `config/security.yml`의 권한 맵은 고쳐야 하고, 그걸 알려주는 문서가 없다.
**더 큰 문제는 지우는 게 아니라 안 지우는 경우다.** fork 사용자 대부분은 샘플을 **참고하며** 자기 도메인을 추가할 텐데, 그때 `SamplePortfolioApplication`을 시작점으로 복사한다. 그러면 §H4/§L3의 문제를 그대로 물려받는다.
### 8.3 샘플이 production 루트와 갈라진 지점 — 따라 하면 안 되는 것 3가지
| 항목 | production (`app-bootstrap`) | sample (`sample-portfolio`) | 결과 |
|---|---|---|---|
| `ddl-auto` | `validate` (`application.yml:164`) | **`update`** (`application.yml:55`) | Hibernate가 스키마를 쓴다. `JpaSchemaSafetyValidator`는 prod에서만 막고 샘플 기본 프로파일은 `local`(27행) |
| `flyway.out-of-order` | `false`, **핀 고정** (`application.yml:156`) | **`true`** (`application.yml:45`) | 마이그레이션 순서 일관성 포기 |
| 인증 | JWT 리소스 서버 (`config/security.yml:8`) | **`permitAll()` + CSRF disabled** (`SamplePublicAccessSecurityConfig:24-27`), `SecurityConfig`/`MethodSecurityConfig`를 스캔에서 제외 (`SamplePortfolioApplication:35-39`) | 인증 없음 |
| 가상 스레드 | `true` (`application.yml:192`) | `false` (`application.yml:73`) | 다른 동시성 모델 |
| 컴포넌트 스캔 | 13개 패키지 제외 (`AUTO_CONFIGURED_PACKAGES`) | **제외 없음** (`basePackages = "dev.caskeleton"`) | 마스터 스위치가 권고사항이 됨 |
각 갈라짐에 이유는 있다(샘플은 공개 데모, 좁은 슬라이스 테스트 호환 등) — `SamplePublicAccessSecurityConfig:12-14`와 `SamplePortfolioApplication:36-37`이 설명한다. **문제는 그 이유가 샘플 안에만 쓰여 있고, "이건 따라 하지 마라"가 아무 데도 없다는 것이다.**
### 8.4 밟게 될 지뢰 — 실제 순서대로
1. `APP_MULTI_INSTANCE_ENABLED=true`로 replica 2개를 시도한다 → **exit 72, 존재하지 않는 빈 5개를 요구** (C2).
2. `APP_REDIS_ENABLED=true` + `APP_RATE_LIMIT_ENABLED=true`로 레이트 리밋을 켠다 → `EdgeRateLimitPort` 빈 부재로 기동 실패 (C1 + H2의 조합).
3. `APP_OUTBOX_ENABLED=true`로 아웃박스를 켠다 → 앱은 정상 기동하고 헬스도 UP, **행이 PENDING으로 쌓인다** (C1). 여기가 제일 위험하다 — 실패하지 않고 조용히 안 된다.
4. `config/redis.yml`에 새 키를 추가한다 → `.env.example`에 안 넣어도 빌드 통과, 운영자는 키 존재를 모름 (H2).
5. prod 체크리스트를 만든다 → 아무도 안 읽는 시크릿 3개를 시크릿 매니저에 넣게 된다 (H3).
6. `config/fileserver.yml`을 읽는다 → HTTP Client를 설명하는 주석 아래에서 fileserver 설정을 본다 (M1).
---
## 9. 미확인 / 가정
### 빌드 미실행으로 확인 못 한 것
브리프가 빌드 실행을 금지했고 스냅샷에 Gradle wrapper jar가 없다. 아래는 전부 **정적 분석 결론**이다.
| 주장 | 신뢰도 | 확인/반증 명령 |
|---|---|---|
| **C1** — autoconfigure 설정 7개 미등록 | **확정** — 나와 코디네이터가 독립적으로 확인. 정규식 적용 / `.imports` 저장소 전체 17개 전량 대조 / `@Import` 4개 / main 참조 전부 Javadoc / `ImportSelector`·`ImportBeanDefinitionRegistrar`·`@ImportAutoConfiguration`·`registerBeanDefinition`·`BeanDefinitionRegistryPostProcessor` grep 0건 | 가장 짧은 확증: `provider=postgresql` + JPA on으로 띄우고 `getBeanNamesForType(IdempotencyExecutorV2.class)`가 비었는지 확인. spec이 1개를 약속한 자리다 |
| **C2** — multi-instance 조립 불가 | **확정** (repo 전체 grep 0건 + 저장소 자체 설계 문서가 §3.6에 기록) | `./gradlew :app-bootstrap:systemTest` + `--ca-skeleton.runtime.multi-instance-enabled=true` |
| **H1** — `unconsumed` 항상 공집합 | **확정** (집합 포함관계 증명, `EnvContractVerifier.java:96-106` + `150-156`) | `env-keys.yaml`의 Redis 행 하나에서 `deprecated_orphaned`를 지우고 `./gradlew :app-bootstrap:verifyEnvKeys` — 통과하면 내 판정이 맞다 |
| **H2** — `config/*.yml` 미검사 | **확정** (`ConfigContractPlugin.java:23,36-38` 파일 경로 리터럴) | `config/redis.yml`에 `${APP_BOGUS_KEY:x}`를 넣고 `./gradlew :app-bootstrap:verifyEnvKeys` — 통과하면 맞다 |
| **H3** — 시크릿 3개 소비자 없음 | **확정** (repo 전체 grep) | — |
| **H4** — 샘플 ArchUnit 0건 | **확정** (grep 0건 + 클래스패스 관계) | — |
| 이관된 테스트 7개가 실제로 컴파일/통과 | **미확인** | `./gradlew :app-bootstrap:check :sample-portfolio:check --console=plain` |
| compose lane 15개가 실제로 통과 | **미확인** (Docker 필요) | `./scripts/run-compose-runtime-smoke.sh` |
### 세운 가정
0. **`.imports`에 plain `@Configuration`을 등재해도 Boot 4가 받아들이는지는 미확인.** C1 수정 범위 표에서 "한 줄"이라고 판정한 5개는 현재 `@Configuration`이다. Boot 3 이후 권장은 `@AutoConfiguration`이고, 순서 속성(`after`/`before`)도 그쪽에만 있다. `RedisCapabilityConfig`는 leaf SDK 이후 순서가 필요하므로 어차피 `@AutoConfiguration`으로 바꿔야 한다. **"한 줄"은 `.imports` 항목 수를 뜻하고, 애노테이션 교체가 함께 필요할 수 있다.**
1. **Spring의 `FilterType.REGEX`는 FQCN 전체 매칭**(`RegexPatternTypeFilter` → `pattern.matcher(className).matches()`)이다. C1 전체가 이 전제 위에 있다.
2. **`@ConfigurationPropertiesScan`은 `@ConfigurationProperties` 타입만 등록**하고 `@Configuration` 클래스는 등록하지 않는다. C1에서 "설정값은 바인딩되고 설정 클래스는 없다"는 결론의 근거다.
3. `compose-profile-contracts.json`의 lane이 CI에서 실제로 blocking으로 돌아간다고 가정했다. CI 워크플로는 다른 에이전트 담당이라 확인 안 했다 — **lane이 CI에서 안 돌면 K3의 Keep 판정이 약해진다.**
4. 브리프의 "`config/*.yml` 21개"는 스냅샷 시점에 15개다. 브리프가 이전 상태를 참조했다고 보고 실제 파일로 진행했다.
5. 브리프의 "sample-portfolio `posterImageMigrationTest` 소스셋"은 스냅샷에 없다. 커밋 안 된 변경이 테스트를 `integrationTest`로 옮기고 `posterImageMigrationTest`를 **`strictQualification` 태스크 이름**으로 남겼다(`build.gradle:162-171`). 소스셋이 아니라 태스크다.
### 다른 영역 담당자가 확인해줘야 할 것
- **redis/cache-redis 담당**: `RedisCapabilityConfig`가 등록되지 않는다면 `adapter:outbound:cache-redis`의 어떤 빈도 컴포지션 루트에 도달하지 않는다. 그 leaf 안에 자체 `AutoConfiguration.imports`가 있는지 확인해달라 — 있다면 C1의 범위가 줄어든다.
- **persistence-jpa 담당**: `DistributedLockConfig`가 요구하는 `@Qualifier("jdbcDistributedLock")` 빈은 `DistributedLockPersistenceConfig`(leaf)가 제공한다. leaf 쪽이 `ca-skeleton.runtime.multi-instance-enabled`를 읽는 반면 `CapabilityDependencyValidator:87`과 `DataSourceRequirement:41`은 `ca-skeleton.lock.multi-instance-enabled`(존재하지 않는 프로퍼티)를 읽는다 — **prefix 불일치**다. 그 결과 "멀티인스턴스 락은 DB가 필요하다" 의존 규칙과 "DataSource가 필요하다" 판정이 **둘 다 발화하지 않는다**.
- **CI/빌드 담당**: `verifyEnvKeys`의 `applicationYaml` 단수 입력(H2)과 `unconsumed` 죽은 분기(H1)는 빌드 도구 수정이 필요하다.
- **web 어댑터 담당**: `RateLimitWebConfig:37`의 `requiredUnique(portProvider, "EdgeRateLimitPort")`가 `app.rate-limit.enabled=true` + provider disabled 조합에서 빈 생성 시점에 실패한다. 이 조합을 startup 검증으로 올릴지는 web 쪽과 bootstrap 쪽 공동 결정이다.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,17 @@
# 리뷰 수집 자료 (2026-09-18T11:50Z 스냅샷)
리뷰 본문이 인용하는 워킹트리 상태 수집본이다. 원본은 `git`에서 재생성할 수 있다.
| 파일 | 생성 명령 |
|---|---|
| `status.txt` | `git status --porcelain` |
| `diffstat.txt` | `git diff HEAD --stat` |
| `untracked-files.txt` | `git ls-files --others --exclude-standard` |
| `untracked-wc.txt` | `git ls-files --others --exclude-standard -z \| xargs -0 wc -l` |
`git diff HEAD` 전문(28,059줄)은 크기 때문에 동봉하지 않았다.
**주의**: `git diff HEAD`는 untracked 파일을 포함하지 않는다. `diffstat.txt`의
`224 files changed, +2,374 / −22,532`만 보면 대규모 삭제로 보이지만, `untracked-wc.txt`의
**+21,270줄(175파일)**을 더하면 실제 순증감은 **약 +1,112줄**이다. 리뷰 본문의 §7 판정은
이 합계를 기준으로 한다.
@@ -0,0 +1,225 @@
docs/httpclient/repository-adaptation.md | 4 +-
docs/notification/module-mapping.md | 2 +-
src/adapter/inbound/graphql/build.gradle | 17 +-
src/adapter/inbound/graphql/gradle.lockfile | 254 +++----
.../GraphqlHttpBoundaryQualificationTest.java | 277 --------
.../runtime/GraphQlPlatformExecutionPathTest.java | 409 ------------
.../resources/graphql-platform/platform.graphqls | 23 -
.../graphql-qualification/qualification.graphqls | 4 -
src/adapter/inbound/web/build.gradle | 61 +-
src/adapter/inbound/web/gradle.lockfile | 294 ++++-----
.../resources/application-web-contract.yaml | 19 -
.../web/testkit/budget/TomcatWebBudgetIT.java | 30 -
.../contract/TomcatContractRecordingIT.java | 26 -
.../testkit/fault/CommitThenConnectionResetIT.java | 27 -
.../web/testkit/mvc/TomcatWebContractIT.java | 44 --
.../testkit/operation/TomcatOperationHttpIT.java | 26 -
.../web/testkit/order/MvcPipelineOrderIT.java | 27 -
.../performance/TomcatLoadAndShutdownIT.java | 63 --
.../web/testkit/throttle/TomcatWebThrottleIT.java | 41 --
.../test/resources/application-web-contract.yaml | 19 -
.../resources/application-web-contract.yaml | 19 -
src/adapter/inbound/websocket/build.gradle | 15 +-
src/adapter/inbound/websocket/gradle.lockfile | 238 +++----
.../websocket/runtime/TomcatWebSocketAbuseIT.java | 84 ---
.../runtime/TomcatWebSocketRuntimeIT.java | 25 -
.../stomp/WebSocketBoundaryQualificationTest.java | 357 ----------
src/adapter/outbound/httpclient/CLAUDE.md | 12 +-
src/adapter/outbound/httpclient/build.gradle | 18 +-
src/adapter/outbound/httpclient/gradle.lockfile | 406 ++++++------
.../contract/FailureInjectionContractTest.java | 86 ---
.../httpclient/testkit/ToxiproxyFixture.java | 103 ---
src/adapter/outbound/notification/build.gradle | 3 +
src/adapter/outbound/notification/gradle.lockfile | 3 +
.../NotificationPlatformAutoConfiguration.java | 128 +---
src/adapter/outbound/objectstorage/build.gradle | 37 +-
src/adapter/outbound/objectstorage/gradle.lockfile | 345 +++++-----
.../MinioDirectTransferContractTest.java | 25 -
.../MinioManagedObjectContractTest.java | 291 --------
.../MinioDirectTransferFaultTest.java | 32 -
.../qualification/MinioManagedObjectFaultTest.java | 147 -----
.../objectstorage/S3ObjectStorageAdapterIT.java | 102 ---
.../object-storage/minio-provider-evidence.json | 25 -
src/adapter/outbound/persistence-jpa/CLAUDE.md | 19 +
src/adapter/outbound/persistence-jpa/build.gradle | 3 +
.../liveevent/JpaLiveEventReplayAdapter.java | 10 +-
.../PostgreSqlOwnerSafeIdempotencyStore.java | 4 +-
.../persistence/JpaModuleBoundaryTest.java | 14 +
.../config/PersistenceEntityScanCoverageTest.java | 2 +
.../testkit/JpaReleaseRenderingTest.java | 3 +-
src/adapter/outbound/persistence-mongo/CLAUDE.md | 4 +-
.../outbound/persistence-mongo/build.gradle | 60 +-
.../outbound/persistence-mongo/gradle.lockfile | 293 ++++-----
.../outbound/mongo/MongoRootAutoConfiguration.java | 3 +-
.../compat/MongoVersionCompatibilityLaneTest.java | 155 -----
.../mongo/failure/MongoNetworkFaultLaneTest.java | 206 ------
.../mongo/migration/MongoMigrationLaneTest.java | 357 ----------
.../rs/MongoSingleReplicaSetContainerTest.java | 111 ----
.../mongo/rs/MongoThreeNodeReplicaSetTest.java | 37 --
.../security/MongoSecurityIntegrationLaneTest.java | 173 -----
.../outbound/mongo/security/MongoTlsLaneTest.java | 164 -----
.../testkit/atlas/MongoAtlasLocalContainer.java | 55 --
.../failover/MongoProxiedReplicaSetNode.java | 142 ----
.../testkit/failover/MongoThreeNodeReplicaSet.java | 281 --------
.../ToxiproxyMongoNetworkFaultController.java | 170 -----
.../rs/MongoAuthenticatedReplicaSetContainer.java | 201 ------
.../mongo/testkit/rs/MongoReplicaSetFixture.java | 60 --
.../testkit/rs/MongoSingleReplicaSetContainer.java | 91 ---
.../testkit/rs/MongoTlsReplicaSetContainer.java | 206 ------
src/adapter/outbound/support/build.gradle | 1 +
src/app-bootstrap/CLAUDE.md | 10 +-
src/app-bootstrap/README.md | 2 +-
src/app-bootstrap/build.gradle | 7 +-
src/app-bootstrap/gradle.lockfile | 6 +-
.../CompositionRootBoundaryArchitectureTest.java | 8 +-
.../StartupFailureContractArchitectureTest.java | 15 +-
.../DistributedLockProviderContractTest.java | 454 -------------
.../FlywayMigrationCompatibilityContractTest.java | 131 ----
.../IdempotencyUniqueScopeContractTest.java | 223 -------
.../FileserverRoundTripContractTest.java | 516 ---------------
.../OutboxAppendTransactionalContractTest.java | 124 ----
.../outbox/OutboxContainerTestSupport.java | 231 -------
.../OutboxPublisherLeaderElectionContractTest.java | 174 -----
.../outbox/OutboxRowLifecycleContractTest.java | 728 ---------------------
.../bootstrap/integration/outbox/package-info.java | 16 -
.../bootstrap/integration/package-info.java | 17 +-
.../bootstrap/CaSkeletonApplication.java | 1 -
.../activation/CapabilityDependencyValidator.java | 12 +-
.../autoconfigure/StrictSettingsBinder.java | 83 ---
.../fileserver/FileserverCleanupWorker.java | 19 +-
.../FileserverPlatformSettingsBinder.java | 2 +-
.../httpclient/DynamicTargetAutoConfiguration.java | 82 ---
.../httpclient/HttpClientActuatorEndpoint.java | 71 --
.../HttpClientAuthenticationAutoConfiguration.java | 89 ---
.../httpclient/HttpClientEnvironmentKeys.java | 179 -----
.../HttpClientManagementAutoConfiguration.java | 22 -
.../HttpClientObservationAutoConfiguration.java | 36 -
.../HttpClientPlatformAutoConfiguration.java | 61 --
.../httpclient/HttpClientPlatformSettings.java | 242 -------
.../HttpClientPlatformSettingsBinder.java | 33 -
.../HttpClientProfileAutoConfiguration.java | 117 ----
.../httpclient/HttpClientProfileFactory.java | 153 -----
.../HttpClientResilienceAutoConfiguration.java | 28 -
.../HttpClientSecurityAutoConfiguration.java | 30 -
.../httpclient/HttpClientStartupValidator.java | 123 ----
.../HttpClientTransportAutoConfiguration.java | 110 ----
.../HttpServiceClientAutoConfiguration.java | 90 ---
.../PostgreSqlIdempotencyProviderConfig.java | 29 +-
.../jpa/JpaObservabilityAutoConfiguration.java | 81 ---
.../jpa/JpaPlatformRuntimeAutoConfiguration.java | 119 +---
.../jpa/JpaTransactionAutoConfiguration.java | 117 ----
.../jpa/PersistenceJpaRootAutoConfiguration.java | 95 +--
.../lock/MeteredDistributedLockPort.java | 4 +
.../mongo/MongoPlatformHealthConfig.java | 37 --
.../mongo/MongoPlatformHealthContributor.java | 47 --
.../NotificationPlatformCodecConfig.java | 129 ----
.../NotificationPlatformDispatchConfig.java | 442 -------------
.../NotificationPlatformObservabilityConfig.java | 122 ----
.../NotificationPlatformPolicyConfig.java | 146 -----
.../NotificationPlatformProviderConfig.java | 136 ----
.../NotificationPlatformRegistriesConfig.java | 70 --
.../NotificationPlatformRuntimeConfig.java | 42 --
.../NotificationPlatformSecretsConfig.java | 287 --------
.../NotificationPlatformWorkerConfig.java | 205 ------
.../NotificationRootAutoConfiguration.java | 55 --
.../observation/NotificationHealthEndpoint.java | 70 --
.../NotificationObservationContext.java | 124 ----
.../NotificationObservationConvention.java | 94 ---
.../autoconfigure/outbox/OutboxRelayScheduler.java | 5 +
.../autoconfigure/redis/RedisCacheConfig.java | 4 +-
.../autoconfigure/redis/RedisCapabilityConfig.java | 4 +-
.../bootstrap/autoconfigure/redis/RedisKeys.java | 4 +-
.../logging/StartupFailureSpringBootLogFilter.java | 2 +-
.../bootstrap/runtime/EnvironmentSecretSource.java | 23 -
.../caskeleton/bootstrap/runtime/SecretSource.java | 18 -
.../bootstrap/runtime/SecretSourceConfig.java | 6 +-
.../bootstrap/runtime/SecretSourceFactory.java | 8 +-
.../bootstrap/runtime/SecretSourceStrategy.java | 2 +-
.../bootstrap/runtime/SecretSourceValidator.java | 5 +-
.../startup/StartupFailureExceptionReporter.java | 8 +
.../runtime/startup/StartupFailureLogState.java | 25 +-
...rk.boot.autoconfigure.AutoConfiguration.imports | 3 +-
.../outbound/OptionalAdapterBeanGatingTest.java | 2 +-
.../activation/AdapterActivationInventory.java | 6 +-
.../CapabilityDependencyValidatorTest.java | 14 +
.../NotificationRootImportCoverageTest.java | 63 --
.../HttpClientAutoConfigurationTest.java | 132 ----
.../HttpClientPlatformActivationTest.java | 253 -------
.../HttpClientPlatformEnvManifestTest.java | 205 ------
.../httpclient/HttpClientPlatformSettingsTest.java | 124 ----
.../ReactiveAuthenticationContractTest.java | 144 ----
.../httpclient/UnsafeStartupConfigurationTest.java | 146 -----
.../IdempotencyProviderCompositionTest.java | 6 +-
.../jpa/CapabilityEntityScanRegistrationTest.java | 71 +-
.../JpaPlatformRuntimeAutoConfigurationTest.java | 295 +++------
.../mongo/MongoPlatformHealthContributorTest.java | 29 -
.../NotificationAutoConfigurationTest.java | 192 +-----
.../NotificationLegacyNamespaceRetirementTest.java | 132 ----
.../notification/NotificationModeSsotTest.java | 124 ----
.../NotificationPayloadAtRestContractTest.java | 218 ------
.../NotificationPlatformReachabilityTest.java | 89 ---
.../NotificationSecretsValidationTest.java | 463 -------------
.../NotificationWorkerLifecycleTest.java | 99 ---
.../observation/NotificationObservationTest.java | 356 ----------
.../redis/RedisCapabilityCompositionTest.java | 4 +-
.../MessagingMembershipQualificationTest.java | 18 +-
.../StartupFailureSpringBootLogFilterTest.java | 32 +-
.../bootstrap/runtime/SecretSourceTest.java | 26 +-
.../StartupFailureExceptionReporterTest.java | 11 +
src/application-core/CLAUDE.md | 1 +
src/application-core/build.gradle | 1 +
src/application-core/gradle.lockfile | 42 +-
.../platform/api/PublicApiIsTypedTest.java | 36 +-
.../ObjectStorageArchitectureContractTest.java | 25 +-
.../auxiliary/AuxiliarySourceSetExtension.java | 9 +-
.../buildlogic/jpa/JpaTestLanesPlugin.java | 18 +
.../AuxiliarySourceSetConventionTest.java | 37 ++
.../jpa/JpaTestLanesPluginFunctionalTest.java | 44 +-
.../messaging-inbox-jdbc-postgresql/build.gradle | 21 +-
.../gradle.lockfile | 112 ++--
.../messaging/inbox/InboxPostgresIT.java | 206 ------
src/messaging/messaging-kafka/build.gradle | 30 +-
src/messaging/messaging-kafka/gradle.lockfile | 138 ++--
.../messaging/kafka/KafkaAmbiguityChaosIT.java | 173 -----
.../kafka/KafkaBrokerCertificationIT.java | 466 -------------
.../caskeleton/messaging/kafka/KafkaBrokerIT.java | 292 ---------
.../messaging/kafka/KafkaConsumerSettlementIT.java | 218 ------
.../messaging/kafka/KafkaContainerFixture.java | 193 ------
.../messaging/kafka/KafkaContainerSmokeTest.java | 66 --
.../messaging/kafka/KafkaContractHarness.java | 370 -----------
.../messaging/kafka/KafkaFixtureProfiles.java | 32 -
.../messaging/kafka/KafkaReadCommittedIT.java | 155 -----
.../messaging/kafka/KafkaTopologyValidationIT.java | 144 ----
.../messaging/kafka/KafkaTransactionFencingIT.java | 150 -----
.../messaging/kafka/KafkaTransactionFixtures.java | 78 ---
.../messaging/kafka/KafkaTransactionIT.java | 168 -----
.../messaging-outbox-jdbc-postgresql/build.gradle | 21 +-
.../gradle.lockfile | 122 ++--
.../outbox/AdminOperationJournalPostgresIT.java | 209 ------
.../messaging/outbox/OutboxPostgresIT.java | 567 ----------------
src/messaging/messaging-rabbit/build.gradle | 20 +-
src/messaging/messaging-rabbit/gradle.lockfile | 148 ++---
.../messaging/rabbit/RabbitBrokerIT.java | 232 -------
.../messaging/rabbit/RabbitFixtureProfiles.java | 32 -
.../rabbit/RabbitProfileValidatorTest.java | 116 ----
.../messaging-spring-boot-starter/build.gradle | 19 +-
.../messaging-spring-boot-starter/gradle.lockfile | 188 +++---
.../MessagingLiveRoundTripQualificationTest.java | 217 ------
src/sample-portfolio/build.gradle | 65 +-
src/sample-portfolio/gradle.lockfile | 584 ++++++++---------
...rImageIdempotencyRotationQualificationTest.java | 30 -
.../PosterImageRetirementQualificationTest.java | 110 ----
.../PosterImageV8MigrationQualificationTest.java | 185 ------
.../portfolio/SampleApplicationContextTest.java | 84 ---
.../portfolio/SamplePortfolioTestApplication.java | 18 -
.../web/contract/OpenApiDriftContractTest.java | 172 -----
.../inbound/web/date/DateHeaderContractTest.java | 76 ---
.../web/filter/VirtualThreadMdcE2ETest.java | 174 -----
.../inbound/web/openapi/OpenApiSnapshotTest.java | 104 ---
...ImageUploadIntentRepositoryIntegrationTest.java | 102 ---
.../PosterRepositoryAdapterIntegrationTest.java | 155 -----
.../WorkLogRepositoryAdapterIntegrationTest.java | 135 ----
.../testinfra/PostgreSqlTestContainer.java | 18 -
.../src/test/resources/application-test.yml | 195 ------
.../openapi/worklogs-openapi-snapshot.json | 523 ---------------
224 files changed, 2374 insertions(+), 22532 deletions(-)
@@ -0,0 +1,316 @@
M docs/httpclient/repository-adaptation.md
M docs/notification/module-mapping.md
M src/adapter/inbound/graphql/build.gradle
M src/adapter/inbound/graphql/gradle.lockfile
D src/adapter/inbound/graphql/src/test/java/dev/caskeleton/adapter/inbound/graphql/GraphqlHttpBoundaryQualificationTest.java
D src/adapter/inbound/graphql/src/test/java/dev/caskeleton/adapter/inbound/graphql/runtime/GraphQlPlatformExecutionPathTest.java
D src/adapter/inbound/graphql/src/test/resources/graphql-platform/platform.graphqls
D src/adapter/inbound/graphql/src/test/resources/graphql-qualification/qualification.graphqls
M src/adapter/inbound/web/build.gradle
M src/adapter/inbound/web/gradle.lockfile
D src/adapter/inbound/web/src/jettyCompatTest/resources/application-web-contract.yaml
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/budget/TomcatWebBudgetIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/contract/TomcatContractRecordingIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/fault/CommitThenConnectionResetIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/mvc/TomcatWebContractIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/operation/TomcatOperationHttpIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/order/MvcPipelineOrderIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/performance/TomcatLoadAndShutdownIT.java
D src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/testkit/throttle/TomcatWebThrottleIT.java
D src/adapter/inbound/web/src/test/resources/application-web-contract.yaml
D src/adapter/inbound/web/src/webfluxContractTest/resources/application-web-contract.yaml
M src/adapter/inbound/websocket/build.gradle
M src/adapter/inbound/websocket/gradle.lockfile
D src/adapter/inbound/websocket/src/test/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketAbuseIT.java
D src/adapter/inbound/websocket/src/test/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketRuntimeIT.java
D src/adapter/inbound/websocket/src/test/java/dev/caskeleton/adapter/inbound/websocket/stomp/WebSocketBoundaryQualificationTest.java
M src/adapter/outbound/httpclient/CLAUDE.md
M src/adapter/outbound/httpclient/build.gradle
M src/adapter/outbound/httpclient/gradle.lockfile
D src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/contract/FailureInjectionContractTest.java
D src/adapter/outbound/httpclient/src/testFixtures/java/dev/caskeleton/adapter/outbound/httpclient/testkit/ToxiproxyFixture.java
M src/adapter/outbound/notification/build.gradle
M src/adapter/outbound/notification/gradle.lockfile
M src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformAutoConfiguration.java
M src/adapter/outbound/objectstorage/build.gradle
M src/adapter/outbound/objectstorage/gradle.lockfile
D src/adapter/outbound/objectstorage/src/objectStorageMinioContractTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferContractTest.java
D src/adapter/outbound/objectstorage/src/objectStorageMinioContractTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectContractTest.java
D src/adapter/outbound/objectstorage/src/objectStorageMinioFaultTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferFaultTest.java
D src/adapter/outbound/objectstorage/src/objectStorageMinioFaultTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectFaultTest.java
D src/adapter/outbound/objectstorage/src/test/java/dev/caskeleton/adapter/outbound/objectstorage/S3ObjectStorageAdapterIT.java
D src/adapter/outbound/objectstorage/src/test/resources/object-storage/minio-provider-evidence.json
M src/adapter/outbound/persistence-jpa/CLAUDE.md
M src/adapter/outbound/persistence-jpa/build.gradle
M src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/liveevent/JpaLiveEventReplayAdapter.java
M src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/postgresql/idempotency/PostgreSqlOwnerSafeIdempotencyStore.java
M src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/JpaModuleBoundaryTest.java
M src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/config/PersistenceEntityScanCoverageTest.java
M src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/testkit/JpaReleaseRenderingTest.java
M src/adapter/outbound/persistence-mongo/CLAUDE.md
M src/adapter/outbound/persistence-mongo/build.gradle
M src/adapter/outbound/persistence-mongo/gradle.lockfile
M src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoRootAutoConfiguration.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/compat/MongoVersionCompatibilityLaneTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/failure/MongoNetworkFaultLaneTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/migration/MongoMigrationLaneTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoSingleReplicaSetContainerTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoThreeNodeReplicaSetTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/security/MongoSecurityIntegrationLaneTest.java
D src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/security/MongoTlsLaneTest.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/atlas/MongoAtlasLocalContainer.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoProxiedReplicaSetNode.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoThreeNodeReplicaSet.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/ToxiproxyMongoNetworkFaultController.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoAuthenticatedReplicaSetContainer.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoReplicaSetFixture.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoSingleReplicaSetContainer.java
D src/adapter/outbound/persistence-mongo/src/testFixtures/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoTlsReplicaSetContainer.java
M src/adapter/outbound/support/build.gradle
M src/app-bootstrap/CLAUDE.md
M src/app-bootstrap/README.md
M src/app-bootstrap/build.gradle
M src/app-bootstrap/gradle.lockfile
M src/app-bootstrap/src/architectureTest/java/dev/caskeleton/bootstrap/architecture/CompositionRootBoundaryArchitectureTest.java
M src/app-bootstrap/src/architectureTest/java/dev/caskeleton/bootstrap/architecture/StartupFailureContractArchitectureTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/DistributedLockProviderContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/FlywayMigrationCompatibilityContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/IdempotencyUniqueScopeContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/fileserver/FileserverRoundTripContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/outbox/OutboxAppendTransactionalContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/outbox/OutboxContainerTestSupport.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/outbox/OutboxPublisherLeaderElectionContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/outbox/OutboxRowLifecycleContractTest.java
D src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/outbox/package-info.java
M src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/package-info.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/CaSkeletonApplication.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/activation/CapabilityDependencyValidator.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/StrictSettingsBinder.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/fileserver/FileserverCleanupWorker.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/fileserver/FileserverPlatformSettingsBinder.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/DynamicTargetAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientActuatorEndpoint.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientAuthenticationAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientEnvironmentKeys.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientManagementAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientObservationAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformSettings.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformSettingsBinder.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientProfileAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientProfileFactory.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientResilienceAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientSecurityAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientStartupValidator.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientTransportAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpServiceClientAutoConfiguration.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/idempotency/PostgreSqlIdempotencyProviderConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaObservabilityAutoConfiguration.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/PersistenceJpaRootAutoConfiguration.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/lock/MeteredDistributedLockPort.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/mongo/MongoPlatformHealthConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/mongo/MongoPlatformHealthContributor.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformCodecConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformDispatchConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformObservabilityConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformPolicyConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformProviderConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformRegistriesConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformRuntimeConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformSecretsConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformWorkerConfig.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationRootAutoConfiguration.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/observation/NotificationHealthEndpoint.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/observation/NotificationObservationContext.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/observation/NotificationObservationConvention.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/outbox/OutboxRelayScheduler.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/redis/RedisCacheConfig.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/redis/RedisCapabilityConfig.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/redis/RedisKeys.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/logging/StartupFailureSpringBootLogFilter.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/EnvironmentSecretSource.java
D src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSource.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceConfig.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceFactory.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceStrategy.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceValidator.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/startup/StartupFailureExceptionReporter.java
M src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/startup/StartupFailureLogState.java
M src/app-bootstrap/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
M src/app-bootstrap/src/test/java/dev/caskeleton/adapter/outbound/OptionalAdapterBeanGatingTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/activation/AdapterActivationInventory.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/activation/CapabilityDependencyValidatorTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/activation/NotificationRootImportCoverageTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientAutoConfigurationTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformActivationTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformEnvManifestTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/HttpClientPlatformSettingsTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/ReactiveAuthenticationContractTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/httpclient/UnsafeStartupConfigurationTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/idempotency/IdempotencyProviderCompositionTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/jpa/CapabilityEntityScanRegistrationTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfigurationTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/mongo/MongoPlatformHealthContributorTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationAutoConfigurationTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationLegacyNamespaceRetirementTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationModeSsotTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPayloadAtRestContractTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationPlatformReachabilityTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationSecretsValidationTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationWorkerLifecycleTest.java
D src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/notification/observation/NotificationObservationTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/redis/RedisCapabilityCompositionTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/messaging/MessagingMembershipQualificationTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/logging/StartupFailureSpringBootLogFilterTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/runtime/SecretSourceTest.java
M src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/runtime/startup/StartupFailureExceptionReporterTest.java
M src/application-core/CLAUDE.md
M src/application-core/build.gradle
M src/application-core/gradle.lockfile
M src/application-core/src/test/java/dev/caskeleton/application/notification/platform/api/PublicApiIsTypedTest.java
M src/application-core/src/test/java/dev/caskeleton/application/objectstorage/ObjectStorageArchitectureContractTest.java
M src/build-logic/src/main/java/dev/caskeleton/buildlogic/auxiliary/AuxiliarySourceSetExtension.java
M src/build-logic/src/main/java/dev/caskeleton/buildlogic/jpa/JpaTestLanesPlugin.java
M src/build-logic/src/test/java/dev/caskeleton/buildlogic/auxiliary/AuxiliarySourceSetConventionTest.java
M src/build-logic/src/test/java/dev/caskeleton/buildlogic/jpa/JpaTestLanesPluginFunctionalTest.java
M src/messaging/messaging-inbox-jdbc-postgresql/build.gradle
M src/messaging/messaging-inbox-jdbc-postgresql/gradle.lockfile
D src/messaging/messaging-inbox-jdbc-postgresql/src/test/java/dev/caskeleton/messaging/inbox/InboxPostgresIT.java
M src/messaging/messaging-kafka/build.gradle
M src/messaging/messaging-kafka/gradle.lockfile
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaAmbiguityChaosIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaBrokerCertificationIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaBrokerIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaConsumerSettlementIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaContainerFixture.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaContainerSmokeTest.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaContractHarness.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaFixtureProfiles.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaReadCommittedIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaTopologyValidationIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaTransactionFencingIT.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaTransactionFixtures.java
D src/messaging/messaging-kafka/src/test/java/dev/caskeleton/messaging/kafka/KafkaTransactionIT.java
M src/messaging/messaging-outbox-jdbc-postgresql/build.gradle
M src/messaging/messaging-outbox-jdbc-postgresql/gradle.lockfile
D src/messaging/messaging-outbox-jdbc-postgresql/src/test/java/dev/caskeleton/messaging/outbox/AdminOperationJournalPostgresIT.java
D src/messaging/messaging-outbox-jdbc-postgresql/src/test/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java
M src/messaging/messaging-rabbit/build.gradle
M src/messaging/messaging-rabbit/gradle.lockfile
D src/messaging/messaging-rabbit/src/test/java/dev/caskeleton/messaging/rabbit/RabbitBrokerIT.java
D src/messaging/messaging-rabbit/src/test/java/dev/caskeleton/messaging/rabbit/RabbitFixtureProfiles.java
M src/messaging/messaging-rabbit/src/test/java/dev/caskeleton/messaging/rabbit/RabbitProfileValidatorTest.java
M src/messaging/messaging-spring-boot-starter/build.gradle
M src/messaging/messaging-spring-boot-starter/gradle.lockfile
D src/messaging/messaging-spring-boot-starter/src/test/java/dev/caskeleton/messaging/autoconfigure/MessagingLiveRoundTripQualificationTest.java
M src/sample-portfolio/build.gradle
M src/sample-portfolio/gradle.lockfile
D src/sample-portfolio/src/posterImageMigrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageIdempotencyRotationQualificationTest.java
D src/sample-portfolio/src/posterImageMigrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageRetirementQualificationTest.java
D src/sample-portfolio/src/posterImageMigrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageV8MigrationQualificationTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/SampleApplicationContextTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/SamplePortfolioTestApplication.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/contract/OpenApiDriftContractTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/date/DateHeaderContractTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/filter/VirtualThreadMdcE2ETest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/openapi/OpenApiSnapshotTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterImageUploadIntentRepositoryIntegrationTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterRepositoryAdapterIntegrationTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/WorkLogRepositoryAdapterIntegrationTest.java
D src/sample-portfolio/src/test/java/dev/caskeleton/sample/portfolio/testinfra/PostgreSqlTestContainer.java
D src/sample-portfolio/src/test/resources/application-test.yml
D src/sample-portfolio/src/test/resources/openapi/worklogs-openapi-snapshot.json
?? docs/observability/
?? docs/superpowers/plans/2026-09-18-bootstrap-structured-runtime-logging.md
?? docs/superpowers/plans/2026-09-18-httpclient-capability-composition-ownership.md
?? docs/superpowers/plans/2026-09-18-jpa-capability-composition-ownership.md
?? docs/superpowers/plans/2026-09-18-mongo-health-composition-ownership.md
?? docs/superpowers/plans/2026-09-18-notification-capability-composition-ownership.md
?? docs/superpowers/plans/2026-09-18-postgresql-idempotency-composition-ownership.md
?? docs/superpowers/plans/2026-09-18-secret-source-port-ownership.md
?? docs/superpowers/plans/2026-09-18-startup-failure-log-context-state.md
?? docs/superpowers/plans/2026-09-18-test-architecture-phase2-provider-ownership.md
?? docs/superpowers/specs/2026-09-18-bootstrap-structured-runtime-logging.md
?? docs/superpowers/specs/2026-09-18-httpclient-capability-composition-ownership.md
?? docs/superpowers/specs/2026-09-18-jpa-capability-composition-ownership.md
?? docs/superpowers/specs/2026-09-18-mongo-health-composition-ownership.md
?? docs/superpowers/specs/2026-09-18-notification-capability-composition-ownership.md
?? docs/superpowers/specs/2026-09-18-postgresql-idempotency-composition-ownership.md
?? docs/superpowers/specs/2026-09-18-secret-source-port-ownership.md
?? docs/superpowers/specs/2026-09-18-startup-failure-log-context-state.md
?? docs/superpowers/specs/2026-09-18-test-architecture-phase2-provider-ownership.md
?? src/adapter/inbound/graphql/src/systemTest/
?? src/adapter/inbound/web/src/performanceTest/
?? src/adapter/inbound/web/src/systemTest/
?? src/adapter/inbound/web/src/testFixtures/resources/application-web-contract.yaml
?? src/adapter/inbound/websocket/src/systemTest/
?? src/adapter/outbound/httpclient/src/integrationTest/
?? src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/
?? src/adapter/outbound/httpclient/src/main/resources/
?? src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationHealthEndpoint.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationContext.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationConvention.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCodecConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformDispatchConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformObservabilityConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformPolicyConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformProviderConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRegistriesConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRuntimeConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformSecretsConfig.java
?? src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformWorkerConfig.java
?? src/adapter/outbound/notification/src/main/resources/
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationLegacyNamespaceRetirementTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationModeSsotTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPayloadAtRestContractTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfigurationTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformImportCoverageTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformReachabilityTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationSecretsValidationTest.java
?? src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationWorkerLifecycleTest.java
?? src/adapter/outbound/objectstorage/src/integrationTest/
?? src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/
?? src/adapter/outbound/persistence-jpa/src/main/resources/META-INF/
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/LegacyOutboxIntegrationSupport.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlDistributedLockIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIdempotencyUniqueScopeIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIntLockMigrationCompatibilityIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxAppendTransactionalIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxConcurrentRelayIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxRowLifecycleIntegrationTest.java
?? src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/
?? src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/liveevent/
?? src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/lock/DistributedLockPersistenceConfigTest.java
?? src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthConfiguration.java
?? src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributor.java
?? src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/
?? src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/
?? src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributorTest.java
?? src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationException.java
?? src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSource.java
?? src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/StrictSettingsBinder.java
?? src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationExceptionTest.java
?? src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSourceTest.java
?? src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/fileserver/FileserverCompositionIntegrationTest.java
?? src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationApplicationCompositionAutoConfiguration.java
?? src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/lock/DistributedLockConfigTest.java
?? src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/runtime/BootstrapStructuredRuntimeLoggingTest.java
?? src/application-core/src/main/java/dev/caskeleton/application/outbound/SecretSourcePort.java
?? src/application-core/src/test/java/dev/caskeleton/application/testsupport/
?? src/application-core/src/testFixtures/
?? src/messaging/messaging-inbox-jdbc-postgresql/src/integrationTest/
?? src/messaging/messaging-kafka/src/integrationTest/
?? src/messaging/messaging-kafka/src/testFixtures/
?? src/messaging/messaging-outbox-jdbc-postgresql/src/integrationTest/
?? src/messaging/messaging-rabbit/src/integrationTest/
?? src/messaging/messaging-rabbit/src/testFixtures/
?? src/messaging/messaging-spring-boot-starter/src/integrationTest/
?? src/sample-portfolio/src/integrationTest/
?? src/sample-portfolio/src/systemTest/
?? src/sample-portfolio/src/testFixtures/
?? src/sample-portfolio/src/webSystemTest/
@@ -0,0 +1,175 @@
docs/observability/log-fields.md
docs/superpowers/plans/2026-09-18-bootstrap-structured-runtime-logging.md
docs/superpowers/plans/2026-09-18-httpclient-capability-composition-ownership.md
docs/superpowers/plans/2026-09-18-jpa-capability-composition-ownership.md
docs/superpowers/plans/2026-09-18-mongo-health-composition-ownership.md
docs/superpowers/plans/2026-09-18-notification-capability-composition-ownership.md
docs/superpowers/plans/2026-09-18-postgresql-idempotency-composition-ownership.md
docs/superpowers/plans/2026-09-18-runtime-environment-tracing-ssot.md
docs/superpowers/plans/2026-09-18-secret-source-port-ownership.md
docs/superpowers/plans/2026-09-18-startup-failure-log-context-state.md
docs/superpowers/plans/2026-09-18-test-architecture-phase2-provider-ownership.md
docs/superpowers/specs/2026-09-18-bootstrap-structured-runtime-logging.md
docs/superpowers/specs/2026-09-18-httpclient-capability-composition-ownership.md
docs/superpowers/specs/2026-09-18-jpa-capability-composition-ownership.md
docs/superpowers/specs/2026-09-18-mongo-health-composition-ownership.md
docs/superpowers/specs/2026-09-18-notification-capability-composition-ownership.md
docs/superpowers/specs/2026-09-18-postgresql-idempotency-composition-ownership.md
docs/superpowers/specs/2026-09-18-runtime-environment-tracing-ssot.md
docs/superpowers/specs/2026-09-18-secret-source-port-ownership.md
docs/superpowers/specs/2026-09-18-startup-failure-log-context-state.md
docs/superpowers/specs/2026-09-18-test-architecture-phase2-provider-ownership.md
src/adapter/inbound/graphql/src/systemTest/java/dev/caskeleton/adapter/inbound/graphql/GraphqlHttpBoundaryQualificationTest.java
src/adapter/inbound/graphql/src/systemTest/java/dev/caskeleton/adapter/inbound/graphql/runtime/GraphQlPlatformExecutionPathTest.java
src/adapter/inbound/graphql/src/systemTest/resources/graphql-platform/platform.graphqls
src/adapter/inbound/graphql/src/systemTest/resources/graphql-qualification/qualification.graphqls
src/adapter/inbound/web/src/performanceTest/java/dev/caskeleton/adapter/inbound/web/testkit/performance/TomcatLoadAndShutdownIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/budget/TomcatWebBudgetIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/contract/TomcatContractRecordingIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/fault/CommitThenConnectionResetIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/mvc/TomcatWebContractIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/operation/TomcatOperationHttpIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/order/MvcPipelineOrderIT.java
src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/throttle/TomcatWebThrottleIT.java
src/adapter/inbound/web/src/testFixtures/resources/application-web-contract.yaml
src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketAbuseIT.java
src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketRuntimeIT.java
src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/stomp/WebSocketBoundaryQualificationTest.java
src/adapter/outbound/httpclient/src/integrationTest/java/dev/caskeleton/adapter/outbound/httpclient/contract/FailureInjectionContractTest.java
src/adapter/outbound/httpclient/src/integrationTest/java/dev/caskeleton/adapter/outbound/httpclient/testkit/ToxiproxyFixture.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/DynamicTargetAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientActuatorEndpoint.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientAuthenticationAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientEnvironmentKeys.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientManagementAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientObservationAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettings.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettingsBinder.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientProfileAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientProfileFactory.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientResilienceAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientSecurityAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientStartupValidator.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientTransportAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpServiceClientAutoConfiguration.java
src/adapter/outbound/httpclient/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientAutoConfigurationTest.java
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformActivationTest.java
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformEnvManifestTest.java
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettingsTest.java
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/ReactiveAuthenticationContractTest.java
src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/UnsafeStartupConfigurationTest.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationHealthEndpoint.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationContext.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationConvention.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCodecConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformDispatchConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformObservabilityConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformPolicyConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformProviderConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRegistriesConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRuntimeConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformSecretsConfig.java
src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformWorkerConfig.java
src/adapter/outbound/notification/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationLegacyNamespaceRetirementTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationModeSsotTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPayloadAtRestContractTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfigurationTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformImportCoverageTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformReachabilityTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationSecretsValidationTest.java
src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationWorkerLifecycleTest.java
src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/S3ObjectStorageAdapterIT.java
src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferContractTest.java
src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferFaultTest.java
src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectContractTest.java
src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectFaultTest.java
src/adapter/outbound/objectstorage/src/integrationTest/resources/object-storage/minio-provider-evidence.json
src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/JpaObservabilityAutoConfiguration.java
src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/JpaTransactionAutoConfiguration.java
src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaAutoConfiguration.java
src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaRuntimeConfig.java
src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PostgreSqlIdempotencyStoreConfig.java
src/adapter/outbound/persistence-jpa/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/LegacyOutboxIntegrationSupport.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlDistributedLockIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIdempotencyUniqueScopeIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIntLockMigrationCompatibilityIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxAppendTransactionalIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxConcurrentRelayIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxRowLifecycleIntegrationTest.java
src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaAutoConfigurationTest.java
src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaRuntimeConfigTest.java
src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PostgreSqlIdempotencyStoreConfigTest.java
src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/liveevent/JpaLiveEventReplayAdapterActivationTest.java
src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/lock/DistributedLockPersistenceConfigTest.java
src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthConfiguration.java
src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributor.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/compat/MongoVersionCompatibilityLaneTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/failure/MongoNetworkFaultLaneTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/migration/MongoMigrationLaneTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoSingleReplicaSetContainerTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoThreeNodeReplicaSetTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/security/MongoSecurityIntegrationLaneTest.java
src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/security/MongoTlsLaneTest.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/atlas/MongoAtlasLocalContainer.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoProxiedReplicaSetNode.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoThreeNodeReplicaSet.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/ToxiproxyMongoNetworkFaultController.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoAuthenticatedReplicaSetContainer.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoReplicaSetFixture.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoSingleReplicaSetContainer.java
src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoTlsReplicaSetContainer.java
src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributorTest.java
src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationException.java
src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSource.java
src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/StrictSettingsBinder.java
src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationExceptionTest.java
src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSourceTest.java
src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/fileserver/FileserverCompositionIntegrationTest.java
src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationApplicationCompositionAutoConfiguration.java
src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/lock/DistributedLockConfigTest.java
src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/RuntimeProfileLoggingContractTest.java
src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/runtime/BootstrapStructuredRuntimeLoggingTest.java
src/application-core/src/main/java/dev/caskeleton/application/outbound/SecretSourcePort.java
src/application-core/src/test/java/dev/caskeleton/application/testsupport/CompiledPackageScanner.java
src/application-core/src/testFixtures/java/dev/caskeleton/application/outbox/testkit/LegacyOutboxAppendContract.java
src/messaging/messaging-inbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/inbox/InboxPostgresIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaAmbiguityChaosIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaBrokerCertificationIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaBrokerIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaConsumerSettlementIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaContainerFixture.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaContainerSmokeTest.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaReadCommittedIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTopologyValidationIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionFencingIT.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionFixtures.java
src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionIT.java
src/messaging/messaging-kafka/src/testFixtures/java/dev/caskeleton/messaging/kafka/KafkaContractHarness.java
src/messaging/messaging-kafka/src/testFixtures/java/dev/caskeleton/messaging/kafka/KafkaFixtureProfiles.java
src/messaging/messaging-outbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/AdminOperationJournalPostgresIT.java
src/messaging/messaging-outbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java
src/messaging/messaging-rabbit/src/integrationTest/java/dev/caskeleton/messaging/rabbit/RabbitBrokerIT.java
src/messaging/messaging-rabbit/src/integrationTest/java/dev/caskeleton/messaging/rabbit/RabbitFixtureProfiles.java
src/messaging/messaging-rabbit/src/testFixtures/java/dev/caskeleton/messaging/rabbit/RabbitProfileFixtures.java
src/messaging/messaging-spring-boot-starter/src/integrationTest/java/dev/caskeleton/messaging/autoconfigure/MessagingLiveRoundTripQualificationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterImageUploadIntentRepositoryIntegrationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterRepositoryAdapterIntegrationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/WorkLogRepositoryAdapterIntegrationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageIdempotencyRotationQualificationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageRetirementQualificationTest.java
src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageV8MigrationQualificationTest.java
src/sample-portfolio/src/systemTest/java/dev/caskeleton/sample/portfolio/SampleApplicationContextTest.java
src/sample-portfolio/src/systemTest/resources/application-test.yml
src/sample-portfolio/src/testFixtures/java/dev/caskeleton/sample/portfolio/SamplePortfolioTestApplication.java
src/sample-portfolio/src/testFixtures/java/dev/caskeleton/sample/portfolio/testinfra/PostgreSqlTestContainer.java
src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/contract/OpenApiDriftContractTest.java
src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/date/DateHeaderContractTest.java
src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/filter/VirtualThreadMdcE2ETest.java
src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/openapi/OpenApiSnapshotTest.java
src/sample-portfolio/src/webSystemTest/resources/openapi/worklogs-openapi-snapshot.json
@@ -0,0 +1,176 @@
35 docs/observability/log-fields.md
11 docs/superpowers/plans/2026-09-18-bootstrap-structured-runtime-logging.md
15 docs/superpowers/plans/2026-09-18-httpclient-capability-composition-ownership.md
26 docs/superpowers/plans/2026-09-18-jpa-capability-composition-ownership.md
14 docs/superpowers/plans/2026-09-18-mongo-health-composition-ownership.md
25 docs/superpowers/plans/2026-09-18-notification-capability-composition-ownership.md
14 docs/superpowers/plans/2026-09-18-postgresql-idempotency-composition-ownership.md
14 docs/superpowers/plans/2026-09-18-runtime-environment-tracing-ssot.md
15 docs/superpowers/plans/2026-09-18-secret-source-port-ownership.md
12 docs/superpowers/plans/2026-09-18-startup-failure-log-context-state.md
40 docs/superpowers/plans/2026-09-18-test-architecture-phase2-provider-ownership.md
53 docs/superpowers/specs/2026-09-18-bootstrap-structured-runtime-logging.md
39 docs/superpowers/specs/2026-09-18-httpclient-capability-composition-ownership.md
66 docs/superpowers/specs/2026-09-18-jpa-capability-composition-ownership.md
50 docs/superpowers/specs/2026-09-18-mongo-health-composition-ownership.md
63 docs/superpowers/specs/2026-09-18-notification-capability-composition-ownership.md
52 docs/superpowers/specs/2026-09-18-postgresql-idempotency-composition-ownership.md
43 docs/superpowers/specs/2026-09-18-runtime-environment-tracing-ssot.md
64 docs/superpowers/specs/2026-09-18-secret-source-port-ownership.md
46 docs/superpowers/specs/2026-09-18-startup-failure-log-context-state.md
51 docs/superpowers/specs/2026-09-18-test-architecture-phase2-provider-ownership.md
277 src/adapter/inbound/graphql/src/systemTest/java/dev/caskeleton/adapter/inbound/graphql/GraphqlHttpBoundaryQualificationTest.java
409 src/adapter/inbound/graphql/src/systemTest/java/dev/caskeleton/adapter/inbound/graphql/runtime/GraphQlPlatformExecutionPathTest.java
23 src/adapter/inbound/graphql/src/systemTest/resources/graphql-platform/platform.graphqls
4 src/adapter/inbound/graphql/src/systemTest/resources/graphql-qualification/qualification.graphqls
63 src/adapter/inbound/web/src/performanceTest/java/dev/caskeleton/adapter/inbound/web/testkit/performance/TomcatLoadAndShutdownIT.java
30 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/budget/TomcatWebBudgetIT.java
26 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/contract/TomcatContractRecordingIT.java
27 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/fault/CommitThenConnectionResetIT.java
44 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/mvc/TomcatWebContractIT.java
26 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/operation/TomcatOperationHttpIT.java
27 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/order/MvcPipelineOrderIT.java
41 src/adapter/inbound/web/src/systemTest/java/dev/caskeleton/adapter/inbound/web/testkit/throttle/TomcatWebThrottleIT.java
19 src/adapter/inbound/web/src/testFixtures/resources/application-web-contract.yaml
84 src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketAbuseIT.java
25 src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/runtime/TomcatWebSocketRuntimeIT.java
357 src/adapter/inbound/websocket/src/systemTest/java/dev/caskeleton/adapter/inbound/websocket/stomp/WebSocketBoundaryQualificationTest.java
86 src/adapter/outbound/httpclient/src/integrationTest/java/dev/caskeleton/adapter/outbound/httpclient/contract/FailureInjectionContractTest.java
103 src/adapter/outbound/httpclient/src/integrationTest/java/dev/caskeleton/adapter/outbound/httpclient/testkit/ToxiproxyFixture.java
82 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/DynamicTargetAutoConfiguration.java
71 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientActuatorEndpoint.java
89 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientAuthenticationAutoConfiguration.java
179 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientEnvironmentKeys.java
22 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientManagementAutoConfiguration.java
36 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientObservationAutoConfiguration.java
61 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformAutoConfiguration.java
242 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettings.java
33 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettingsBinder.java
117 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientProfileAutoConfiguration.java
153 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientProfileFactory.java
28 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientResilienceAutoConfiguration.java
30 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientSecurityAutoConfiguration.java
123 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientStartupValidator.java
110 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientTransportAutoConfiguration.java
90 src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpServiceClientAutoConfiguration.java
1 src/adapter/outbound/httpclient/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
132 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientAutoConfigurationTest.java
253 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformActivationTest.java
205 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformEnvManifestTest.java
124 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientPlatformSettingsTest.java
144 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/ReactiveAuthenticationContractTest.java
146 src/adapter/outbound/httpclient/src/test/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/UnsafeStartupConfigurationTest.java
70 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationHealthEndpoint.java
124 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationContext.java
94 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationConvention.java
128 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCodecConfig.java
118 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfig.java
159 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformDispatchConfig.java
118 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformObservabilityConfig.java
146 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformPolicyConfig.java
133 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformProviderConfig.java
69 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRegistriesConfig.java
42 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformRuntimeConfig.java
285 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformSecretsConfig.java
205 src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformWorkerConfig.java
1 src/adapter/outbound/notification/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
132 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationLegacyNamespaceRetirementTest.java
123 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationModeSsotTest.java
356 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationObservationTest.java
218 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPayloadAtRestContractTest.java
193 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformCoreConfigurationTest.java
63 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformImportCoverageTest.java
45 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationPlatformReachabilityTest.java
461 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationSecretsValidationTest.java
99 src/adapter/outbound/notification/src/test/java/dev/caskeleton/adapter/outbound/notification/platform/autoconfigure/NotificationWorkerLifecycleTest.java
102 src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/S3ObjectStorageAdapterIT.java
25 src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferContractTest.java
32 src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioDirectTransferFaultTest.java
291 src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectContractTest.java
147 src/adapter/outbound/objectstorage/src/integrationTest/java/dev/caskeleton/adapter/outbound/objectstorage/qualification/MinioManagedObjectFaultTest.java
25 src/adapter/outbound/objectstorage/src/integrationTest/resources/object-storage/minio-provider-evidence.json
80 src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/JpaObservabilityAutoConfiguration.java
117 src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/JpaTransactionAutoConfiguration.java
26 src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaAutoConfiguration.java
73 src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaRuntimeConfig.java
21 src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PostgreSqlIdempotencyStoreConfig.java
2 src/adapter/outbound/persistence-jpa/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
207 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/LegacyOutboxIntegrationSupport.java
149 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlDistributedLockIntegrationTest.java
191 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIdempotencyUniqueScopeIntegrationTest.java
109 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlIntLockMigrationCompatibilityIntegrationTest.java
73 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxAppendTransactionalIntegrationTest.java
166 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxConcurrentRelayIntegrationTest.java
720 src/adapter/outbound/persistence-jpa/src/postgresqlIntegrationTest/java/dev/caskeleton/adapter/outbound/persistence/readiness/PostgreSqlLegacyOutboxRowLifecycleIntegrationTest.java
73 src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaAutoConfigurationTest.java
156 src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PersistenceJpaRuntimeConfigTest.java
36 src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/autoconfigure/PostgreSqlIdempotencyStoreConfigTest.java
73 src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/liveevent/JpaLiveEventReplayAdapterActivationTest.java
48 src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/lock/DistributedLockPersistenceConfigTest.java
20 src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthConfiguration.java
23 src/adapter/outbound/persistence-mongo/src/main/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributor.java
155 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/compat/MongoVersionCompatibilityLaneTest.java
206 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/failure/MongoNetworkFaultLaneTest.java
357 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/migration/MongoMigrationLaneTest.java
111 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoSingleReplicaSetContainerTest.java
37 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/rs/MongoThreeNodeReplicaSetTest.java
173 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/security/MongoSecurityIntegrationLaneTest.java
165 src/adapter/outbound/persistence-mongo/src/mongoIntegrationTest/java/dev/caskeleton/adapter/outbound/mongo/security/MongoTlsLaneTest.java
55 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/atlas/MongoAtlasLocalContainer.java
142 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoProxiedReplicaSetNode.java
281 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/MongoThreeNodeReplicaSet.java
170 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/failover/ToxiproxyMongoNetworkFaultController.java
201 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoAuthenticatedReplicaSetContainer.java
60 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoReplicaSetFixture.java
91 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoSingleReplicaSetContainer.java
219 src/adapter/outbound/persistence-mongo/src/mongoProviderTestkit/java/dev/caskeleton/adapter/outbound/mongo/testkit/rs/MongoTlsReplicaSetContainer.java
64 src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/MongoPlatformHealthContributorTest.java
30 src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationException.java
22 src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSource.java
82 src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/StrictSettingsBinder.java
18 src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/CapabilityStartupValidationExceptionTest.java
27 src/adapter/outbound/support/src/test/java/dev/caskeleton/adapter/outbound/support/EnvironmentSecretSourceTest.java
454 src/app-bootstrap/src/integrationTest/java/dev/caskeleton/bootstrap/integration/fileserver/FileserverCompositionIntegrationTest.java
309 src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/notification/NotificationApplicationCompositionAutoConfiguration.java
46 src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/autoconfigure/lock/DistributedLockConfigTest.java
25 src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/RuntimeProfileLoggingContractTest.java
158 src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/runtime/BootstrapStructuredRuntimeLoggingTest.java
21 src/application-core/src/main/java/dev/caskeleton/application/outbound/SecretSourcePort.java
67 src/application-core/src/test/java/dev/caskeleton/application/testsupport/CompiledPackageScanner.java
100 src/application-core/src/testFixtures/java/dev/caskeleton/application/outbox/testkit/LegacyOutboxAppendContract.java
206 src/messaging/messaging-inbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/inbox/InboxPostgresIT.java
173 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaAmbiguityChaosIT.java
466 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaBrokerCertificationIT.java
292 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaBrokerIT.java
218 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaConsumerSettlementIT.java
193 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaContainerFixture.java
66 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaContainerSmokeTest.java
155 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaReadCommittedIT.java
144 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTopologyValidationIT.java
150 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionFencingIT.java
78 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionFixtures.java
168 src/messaging/messaging-kafka/src/integrationTest/java/dev/caskeleton/messaging/kafka/KafkaTransactionIT.java
370 src/messaging/messaging-kafka/src/testFixtures/java/dev/caskeleton/messaging/kafka/KafkaContractHarness.java
32 src/messaging/messaging-kafka/src/testFixtures/java/dev/caskeleton/messaging/kafka/KafkaFixtureProfiles.java
209 src/messaging/messaging-outbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/AdminOperationJournalPostgresIT.java
567 src/messaging/messaging-outbox-jdbc-postgresql/src/integrationTest/java/dev/caskeleton/messaging/outbox/OutboxPostgresIT.java
232 src/messaging/messaging-rabbit/src/integrationTest/java/dev/caskeleton/messaging/rabbit/RabbitBrokerIT.java
32 src/messaging/messaging-rabbit/src/integrationTest/java/dev/caskeleton/messaging/rabbit/RabbitFixtureProfiles.java
118 src/messaging/messaging-rabbit/src/testFixtures/java/dev/caskeleton/messaging/rabbit/RabbitProfileFixtures.java
217 src/messaging/messaging-spring-boot-starter/src/integrationTest/java/dev/caskeleton/messaging/autoconfigure/MessagingLiveRoundTripQualificationTest.java
102 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterImageUploadIntentRepositoryIntegrationTest.java
155 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/PosterRepositoryAdapterIntegrationTest.java
135 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/adapter/outbound/persistence/repository/WorkLogRepositoryAdapterIntegrationTest.java
30 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageIdempotencyRotationQualificationTest.java
110 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageRetirementQualificationTest.java
185 src/sample-portfolio/src/integrationTest/java/dev/caskeleton/sample/portfolio/qualification/PosterImageV8MigrationQualificationTest.java
84 src/sample-portfolio/src/systemTest/java/dev/caskeleton/sample/portfolio/SampleApplicationContextTest.java
195 src/sample-portfolio/src/systemTest/resources/application-test.yml
18 src/sample-portfolio/src/testFixtures/java/dev/caskeleton/sample/portfolio/SamplePortfolioTestApplication.java
18 src/sample-portfolio/src/testFixtures/java/dev/caskeleton/sample/portfolio/testinfra/PostgreSqlTestContainer.java
172 src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/contract/OpenApiDriftContractTest.java
76 src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/date/DateHeaderContractTest.java
174 src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/filter/VirtualThreadMdcE2ETest.java
104 src/sample-portfolio/src/webSystemTest/java/dev/caskeleton/sample/portfolio/adapter/inbound/web/openapi/OpenApiSnapshotTest.java
523 src/sample-portfolio/src/webSystemTest/resources/openapi/worklogs-openapi-snapshot.json
21270 total
@@ -0,0 +1,69 @@
# App Bootstrap Review Closure — 2026-09-19
Source review: docs/reviews/2026-09-07-app-bootstrap-module-code-review.md
This document records the final disposition after re-checking the current repository rather than
mechanically applying every historical recommendation. A finding is closed when the underlying
failure mode is removed or when a later approved design supersedes the original prescription while
preserving the intent.
| ID | Status | Final disposition / evidence |
|---|---|---|
| BOOT-001 | Resolved by later design | The historical one-root prescription is superseded by contract-owned canonical prefixes. configuration-namespace-disposition records the decision; legacy ambiguity is rejected and verifyEnvKeys validates the shipped configuration truth surface. |
| BOOT-002 | Closed | shared-contract owns RuntimeEnvironment; RuntimeProfileSnapshot is the only production Spring active-profile bridge. Direct Environment#getActiveProfiles reads are architecture-gated. |
| BOOT-003 | Closed | Startup deployment failures route through typed StartupFailures; StartupFailureContractArchitectureTest prevents raw IllegalStateException construction except explicit caller/JVM invariant allowlists. |
| BOOT-004 | Closed | StartupValidationContext is the single startup violation accumulator. Capability dependency entry points delegate to one requireSatisfied path. Secret sentinel and missing-secret failures are aggregated into one ENV_VALIDATION failure. |
| BOOT-005 | Closed | StartupOrder owns deterministic processor ordering. StartupOrderContractTest loads spring.factories, requires every processor to implement Ordered, pins all six shipped values, and proves strict readiness/validation bands. |
| BOOT-006 | Closed with intentional runtime guards | Capability assembly is under autoconfigure/<capability>. Global settings stay in settings. JPA safety validators intentionally remain runtime guards because they must execute even when JPA is off; moving them under capability assembly previously broke the off-path contract. |
| BOOT-007 | Closed | Large Redis composition was already split. Fileserver was the remaining violation and is now split into package-private concern configs; every Fileserver config declares at most seven beans and a permanent ArchUnit rule enforces <= 8. |
| BOOT-008 | Closed | application.yml is reduced to the composition/root surface and imports 15 concern config files; the imported count matches the actual config files. |
| BOOT-009 | Closed | Startup/runtime WARN/ERROR paths use structured fields; remaining Fileserver cleanup, outbox relay and lock lease-expiry logs were structured. docs/observability/log-fields.md is the field dictionary and Logback behavior tests pin the fields. |
| BOOT-010 | Closed | Idempotency provider expectation moved onto the typed provider constants; the central provider switch is gone. Adding a provider requires declaring its expected bean shape with the enum constant. |
| BOOT-011 | Closed | Strict binding mechanics are centralized in adapter:outbound:support/StrictSettingsBinder; Fileserver/HTTP binders retain only concern-specific differences. |
| BOOT-012 | Closed | The monolithic architecture suite is decomposed into focused top-level architecture tests. ArchRuleDiscoveryContractTest pins the discovered rules so a rule cannot disappear silently. |
| BOOT-013 | Closed | Startup duplicate-log state is scoped to Logback Context; process-global mutable state and production clearForTest are gone. Cross-context isolation is tested. |
| BOOT-014 | Closed | Real Testcontainers usage is in integration lanes. The one TEST-source Testcontainers class is an intentional taxonomy positive-control fixture used by architecture tests. |
| BOOT-015 | Closed | Active custom testkit Gradle declarations are zero. Shared fixtures use java-test-fixtures; AdapterActivationInventory moved from TEST to SYSTEM because only SYSTEM consumers use it. |
| BOOT-016 | Closed | docs/testing/TESTING_STRATEGY.md is the SSOT for TEST / INTEGRATION / SYSTEM / ARCHITECTURE / PERFORMANCE. Qualification remains a gate, not a test kind. |
| BOOT-017 | Closed | Bootstrap no longer implements infrastructure ports except the explicitly reviewed MeteredDistributedLockPort decorator. SecretSourcePort is application-owned and EnvironmentSecretSource lives in outbound-support. |
## Verification summary
The final closure sequence verified:
- app-bootstrap Spotless: PASS;
- app-bootstrap full TEST: PASS;
- app-bootstrap full ARCHITECTURE: PASS;
- app-bootstrap full SYSTEM: PASS after the Fileserver composition split;
- Fileserver PostgreSQL/filesystem integration composition: PASS with process-local TESTCONTAINERS_RYUK_DISABLED=true on this remote host;
- persistence-jpa / persistence-mongo focused ownership gates: PASS;
- verifyEnvKeys: PASS;
- clean architecture dependency verification: PASS;
- git diff --check: PASS.
No commit, staging operation, reset, checkout, clean or push was performed.
## Latest revalidation — 2026-09-19
The closure was re-run against the final working tree after the JPA/Mongo/idempotency ownership,
SecretSourcePort, LoggerContext startup-state and structured-runtime-logging slices.
Commands/results:
- :app-bootstrap:spotlessJavaCheck: PASS;
- :app-bootstrap:test: PASS;
- :app-bootstrap:architectureTest: PASS;
- :app-bootstrap:systemTest: PASS;
- :app-bootstrap:verifyEnvKeys: PASS — 338 env keys, 229 application APP_ references,
61 typed properties, 335 rows with a consumer or deprecation;
- :adapter:outbound:support:check: PASS;
- verifyCleanArchitectureDependencies: PASS;
- non-fixture Testcontainers references under app-bootstrap/src/test: 0;
- unstructured app-bootstrap WARN/ERROR production calls: 0;
- direct application/domain port implementations in bootstrap: 1,
the explicitly reviewed MeteredDistributedLockPort decorator;
- git diff --check: PASS.
This revalidation does not claim a repository-wide root check or a rerun of every infrastructure
integration lane. The integration evidence listed above remains the affected-scope evidence from the
respective refactor slices.
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: Runbook — AUTH_TOKEN_MALFORMED (토큰 파싱 실패)
category: AUTH
error_codes: [AUTH_TOKEN_MALFORMED]
error_codes: [AUTH_TOKEN_MALFORMED, INVALID_TOKEN]
severity: P3
owner: oncall
last_updated: 2026-06-15
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: Runbook — AUTH_TOKEN_MISSING (인증 토큰 누락)
category: AUTH
error_codes: [AUTH_TOKEN_MISSING]
error_codes: [AUTH_TOKEN_MISSING, UNAUTHENTICATED]
severity: P3
owner: oncall
last_updated: 2026-06-15
@@ -1,7 +1,7 @@
---
title: Runbook — AUTHZ_INSUFFICIENT_PERMISSION (권한 부족)
category: AUTHZ
error_codes: [AUTHZ_INSUFFICIENT_PERMISSION]
error_codes: [AUTHZ_INSUFFICIENT_PERMISSION, FORBIDDEN]
severity: P3
owner: oncall
last_updated: 2026-06-15
+31
View File
@@ -0,0 +1,31 @@
# Fileserver vs Object Storage
These capabilities overlap at the byte-storage level but own different serving boundaries. They are
not interchangeable providers for one port.
| Question | Fileserver HTTP platform | Object Storage |
|---|---|---|
| Who serves bytes to the client? | This application, through Fileserver HTTP routes | The selected object store, often through direct/presigned transfer |
| Primary application contract | Upload/download/lifecycle HTTP workflow and Fileserver application ports | Provider-neutral managed/direct object-storage ports |
| Storage semantics | Application-owned staging, verification, publication, range/conditional delivery, upload leases | Managed object publication plus remote-store versioning/direct/multipart semantics |
| Local filesystem role | Certified backing store for the application-owned Fileserver platform | `filesystem-local-dev` development/provider implementation |
| Remote S3-style semantics | Not its purpose | First-class capability |
## Decision rule
Use **Fileserver** when the service itself owns upload/download HTTP behavior: authentication, range
and conditional requests, verification/quarantine, resumable upload state, lifecycle/admin routes,
and optional delegated serving such as X-Accel-Redirect.
Use **Object Storage** when the application needs an object-storage abstraction whose provider owns
the storage/transfer semantics, especially S3-compatible managed objects, presigned/direct transfer,
or multipart workflows.
Do not enable both as two independent sources of truth for the same logical object. If a product
needs both, one capability must own the logical object/control record and the other must be an
explicit transport/provider integration behind that owner; duplicating metadata, retention state, or
publication state across both is not a supported composition.
Readiness remains independent: `docs/fileserver/support-matrix.md` certifies Fileserver behavior;
`docs/registries/object-storage-readiness.yaml` certifies Object Storage behavior. Evidence from one
does not upgrade the other.
+1 -1
View File
@@ -726,7 +726,7 @@ translator.translate(ex).ifPresent(e -> { throw e; });
// 비어 있으면 원본을 다시 던져서 web catch-all이 generic INTERNAL로 답하게 한다
```
카테고리 SSOT는 10값 `Category` enum이고, **`PERSISTENCE` 카테고리는 없다**(branch-note
카테고리 SSOT는 10값 `Category` enum이고, **`PERSISTENCE` 카테고리는 없다**(design record
§Audit CATEGORY_DRIFT).
---
@@ -122,10 +122,10 @@ strict evidence validators, generated platform variants, and risk-based review p
- [ ] Audit the working-tree diff in order: architecture → spec → quality.
- [ ] Fix findings and restart the review chain, up to three loops.
## Task 7 — LLM Wiki capture
## Task 7 — documentation update
- [ ] Read the LLM Wiki authority and branch-note template.
- [ ] Update/create the detached-HEAD branch note with implementation decisions, changed files,
- [ ] Read the repository documentation authority and design record template.
- [ ] Update/create the detached-HEAD design record with implementation decisions, changed files,
verification evidence, failures, and open risks.
- [ ] Create/link derived error, interview, or blog-topic raw notes only when supported by the
completed work; otherwise record an explicit “none” judgment in the branch note.
completed work; otherwise record an explicit “none” judgment in the design record.
@@ -137,7 +137,7 @@ logging, Logback capture tests, ArchUnit, Gradle Groovy DSL, dependency locking.
- [ ] Run `verifyCleanArchitectureDependencies`, dependency evidence reports, and `check`.
- [ ] Run required safety greps, `git diff --check`, and `git status --short`; report any skip or
remaining risk.
- [ ] Hand the exact LLM Wiki capture responsibility and evidence back to the top-level controller;
- [ ] Hand the exact documentation update responsibility and evidence back to the top-level controller;
do not write the vault from this dispatched scope.
No step authorizes staging, committing, amending, pushing, public-path changes, CI changes, module
@@ -1800,29 +1800,24 @@ Expected:
- no SLF4J/Spring/Micrometer import remains in application-core;
- no agent-created commit exists.
## Task 9: Required Implementation Evidence and LLM Wiki Capture
## Task 9: Required Implementation Evidence and repository documentation Capture
This task is performed only after production implementation and verification. It is not performed
while merely authoring this plan.
- [ ] **Step 1: Read the Wiki authorities before writing**
Read:
```text
/home/donghyeon/workspace/ai-tool/llm-wiki-private/AGENTS.md
/home/donghyeon/workspace/ai-tool/llm-wiki-private/CLAUDE.md
/home/donghyeon/workspace/clean-architecture-backend-template/.agents/plugins/ca-superpowers/rules/llm-wiki-capture.md
```
Expected: all authorities exist after harness recovery and are read in full.
- [ ] **Step 2: Update the branch note**
- [ ] **Step 2: Update the design record**
Create or update:
```text
/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md
```
Record:
@@ -1838,7 +1833,7 @@ Record:
- [ ] **Step 3: Make the derived-document judgment explicit**
Create linked raw error/interview/blog-topic notes only when the completed implementation provides
genuine derived material. Otherwise write `추출할 별도 글감 없음` in the branch note's
genuine derived material. Otherwise write `추출할 별도 글감 없음` in the design record's
`## Cluster / 묶음` section.
- [ ] **Step 4: Produce the final implementation report**
@@ -1849,5 +1844,5 @@ The final response lists:
- core architecture and behavior changes;
- focused/full verification commands and outcomes;
- failed or unrun checks;
- Wiki branch-note and derived-note result;
- design record and derived-note result;
- remaining risks and human-only commit status.
@@ -1973,6 +1973,6 @@ Expected: only reviewed recovery and CI-control-plane files are present; there a
commits. Provide the human owner with the task-packet hash, recovery hash inventory, exact commands
and exits, Gitea run links, required-status evidence, failures, and remaining risks.
The documentation-authoring turn that created this plan does not write to the LLM Wiki. During
The documentation-authoring turn that created this plan does not write to the repository documentation. During
future implementation, the executing controller follows the root `AGENTS.md` capture policy after
all implementation and verification work is complete.
@@ -77,7 +77,7 @@ production project dependencies against it.
- [x] State that focused commands are derived from the owning Gradle path rather than a task
packet.
- [x] Keep all eight local HARD-STOP meanings, architecture boundaries, human-only git policy,
verification discipline, and LLM Wiki capture requirements.
verification discipline, and documentation update requirements.
- [x] Make the earlier harness documents explicit historical provenance rather than active
reconstruction instructions.
@@ -95,5 +95,5 @@ production project dependencies against it.
- [ ] Run a deterministic comparison between registry edges and leaf production project
dependencies.
- [ ] Run `git diff --check` and `git status --short`.
- [ ] Report exact exits, any unavailable checks, LLM Wiki capture outcome, and remaining risks
- [ ] Report exact exits, any unavailable checks, documentation update outcome, and remaining risks
without claiming the broader Phase A/refactor is complete.
@@ -113,5 +113,5 @@ jq, lychee.
valid Results array.
- [ ] Prove no harness call or `.gitea/workflows` shadow was introduced.
- [ ] Run `git diff --check` and `git status --short`.
- [ ] Capture the work in the required LLM Wiki branch note, including evidence and external
- [ ] Capture the work in the required design record, including evidence and external
blockers, without claiming server Actions or full Phase A completion.
@@ -88,7 +88,7 @@ Git operations.
- [ ] Run all commands in the design verification section.
- [ ] Run `git diff --check` and inspect the complete unstaged/untracked status.
- [ ] Request spec and code-quality review; fix all actionable findings.
- [ ] Update the mandated LLM Wiki raw branch note and derived raw notes, or record the exact
- [ ] Update the mandated repository documentation raw design record and derived raw notes, or record the exact
missing-vault blocker.
## Final review hardening
@@ -50,7 +50,7 @@ prerequisite, real PostgreSQL task, zero-skip sentinel과 immutable evidence man
5. owner-safe idempotency V2, immutable outbox storage V2, polling delivery V2, same-store
inbox가 독립 migration stream과 real PostgreSQL concurrency test를 가진다.
6. 외부 CDC, replica, tenant/RLS, R3는 토폴로지/evidence 없이 선택하거나 R2로 광고하지 않는다.
7. 전체 test/check와 Wiki capture 결과를 기록한다.
7. 전체 test/check와 documentation update 결과를 기록한다.
## 2. 공통 구현 규칙
@@ -384,15 +384,14 @@ cd src
```
전체 `test`/`check`와 real PostgreSQL task는 해당 phase가 경계를 실제로 변경하거나 required
task를 추가한 시점에 실행한다. 실행하지 못한 명령은 이유와 남은 위험을 branch-note와 최종
task를 추가한 시점에 실행한다. 실행하지 못한 명령은 이유와 남은 위험을 design record와 최종
응답에 기록한다.
## 10. Wiki capture
## 10. documentation update
각 의미 있는 slice가 끝날 때 실제 vault의 branch-note:
각 의미 있는 slice가 끝날 때 실제 vault의 design record:
```text
raw/branch-notes/codex-jpa-production-capability.md
```
에 다음을 누적한다.
@@ -450,8 +449,6 @@ canonical 문서는 별도 요청 전 생성하지 않는다.
전체 test에서 발견한 sample Flyway 회귀는 independent `V1` stream을 broad
`classpath:db/migration`으로 합친 문제와 production/sample `V6` 충돌이었다. sample slice를
legacy PostgreSQL location으로 한정하고 disposable poster migration을 `V7`로 이동했다. 세부
재현·해결 기록은 Wiki
`raw/errors/flyway-independent-stream-broad-root-collision-2026-07-28.md`에 남겼다.
2026-07-29 completion pass:
@@ -195,7 +195,7 @@ authenticated internal endpoint
10. P2에서 v2 claim/send/authority switch를 활성화하지 않는다.
11. event/payload/schema/hash/credential/raw header는 log, metric tag, evidence artifact에 넣지
않는다.
12. 각 Wave exit에서 설계 §0 ledger, card maturity, plan checkbox, LLM Wiki branch-note를 실제
12. 각 Wave exit에서 설계 §0 ledger, card maturity, plan checkbox, design record를 실제
증거에 맞춰 갱신한다.
13. plan surface 밖의 파일이나 타입이 필요하면 조용히 확장하지 않고 이 문서를 먼저 갱신한다.
14. 설계와 plan이 충돌하면 구현으로 타협하지 않고 상세 설계를 먼저 수정·재승인한다.
@@ -267,7 +267,7 @@ Wave A / P0
- `src/adapter/outbound/messaging/src/test/java/dev/caskeleton/adapter/outbound/messaging/MessagingConfigTest.java`
- [ ] Capture current branch, `git status --short`, design digest, registry edges, dependency graph,
migrations and current test counts in the LLM Wiki branch-note.
migrations and current test counts in the design record.
- [ ] Add characterization assertions for:
broker blank → disabled sentinels; broker selected + missing sender → startup failure; broker ID
mismatch → failure; sender normal return → legacy `PUBLISHED`; sender exception →
@@ -693,7 +693,7 @@ change legacy rows.
- [ ] Confirm no production leaf imports `dev.caskeleton.sample`.
- [ ] Update the design ledger to `P1=IMPLEMENTED_CANDIDATE` only if all Wave B evidence is GREEN.
- [ ] Update the LLM Wiki branch-note; record whether a new derived raw document exists or explicitly
- [ ] Update the design record; record whether a new derived raw document exists or explicitly
record “없음”.
---
@@ -1332,7 +1332,7 @@ cannot be deployed to all nodes, do not proceed to Wave D.
- [ ] Confirm broker/client/network resources are still 0 and v2 authority has not switched.
- [ ] Update the design ledger to `P2=IMPLEMENTED_CANDIDATE` only from actual tests.
- [ ] Update the LLM Wiki branch-note and derived-document decision.
- [ ] Update the design record and derived-document decision.
---
@@ -2094,7 +2094,7 @@ target deployment switch or destructively downgrade schema.
- [ ] Keep Kafka/security cards at most `implemented-candidate`.
- [ ] Update the design ledger to `P3=IMPLEMENTED_CANDIDATE` only after the dark graph and disposable
cutover rehearsal pass; target authority is still legacy.
- [ ] Update the LLM Wiki branch-note and derived-document decision.
- [ ] Update the design record and derived-document decision.
---
@@ -2544,7 +2544,7 @@ failed evidence or instruct operators to dual-send/raw-update.
§0 as `P4=RELEASE_CANDIDATE_QUALIFIED_DEPLOYMENT_NOT_CUT_OVER`; target publication authority
and production runtime remain legacy. P5/P6 stay `DESIGNED_NOT_IMPLEMENTED`, P7 stays
`OPTIONAL_BACKLOG`.
- [ ] Update the branch-note with release-candidate evidence and explicitly state target
- [ ] Update the design record with release-candidate evidence and explicitly state target
cutover/cleanup are pending. Do not make the final implementation-complete claim.
**Rollback checkpoint:** if aggregation fails, keep cards `implemented-candidate`, target
@@ -2706,7 +2706,7 @@ authority and destructive downgrade are forbidden.
### Task 26: Complete observation, remove legacy runtime and requalify the cleanup artifact
**Owner:** all affected leaves + repository-wide verification/Wiki
**Owner:** all affected leaves + repository-wide verification
**Depends on:** Task 25, reviewed observation window, human cleanup approval
**Files — delete:**
@@ -2848,7 +2848,6 @@ authority and destructive downgrade are forbidden.
- `src/build.gradle`
- `docs/superpowers/specs/2026-07-28-messaging-production-capability-design.md`
- `docs/superpowers/plans/2026-07-28-messaging-first-r2-polling-producer.md`
- `/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md` and only genuinely
derived raw documents
- [ ] Observation exit requires the reviewed duration with duplicate anomaly 0, unexpected
@@ -2982,7 +2981,7 @@ authority and destructive downgrade are forbidden.
- [ ] Keep retained V3 DB columns and canonical compatibility projection until a later forward
schema cleanup. Do not drop columns or rewrite history here.
- [ ] Re-run the runtime denylist GREEN across production Java, build files, YAML/env and registries;
only the exact sample/R0 source allowlist may remain. Explicitly exclude design/spec/plan/Wiki
only the exact sample/R0 source allowlist may remain. Explicitly exclude design/spec/plan
history from raw-symbol matching: historical documentation is evidence, not an activation
surface. Compile success alone is not bean/resource absence evidence. Run the same focused
command GREEN; expect forbidden runtime match 0, canonical legacy bean/resource count 0 and
@@ -2991,7 +2990,7 @@ authority and destructive downgrade are forbidden.
It scans operational runbooks semantically for executable legacy activation keys, commands,
dual-relay instructions or rollback-to-legacy actions, while allowing clearly labelled
historical facts and “must remain disabled/forbidden” statements. It does not raw-match this
plan/spec/branch-note.
plan/spec/design record.
```bash
cd src && ./gradlew :app-bootstrap:test \
@@ -3078,12 +3077,11 @@ authority and destructive downgrade are forbidden.
- [ ] Update §0 and card status from the final R2 aggregate only. First R2 may be marked complete
only after `verifyMessagingFinalR2Profile` passes; P5/P6/P7 remain unchanged.
- [ ] Before final Wiki capture, read the configured vault's `AGENTS.md`, `CLAUDE.md` and relevant
- [ ] Before final documentation update, read the configured vault's `AGENTS.md`, `CLAUDE.md` and relevant
`rules/`, `.agents/`, `.claude/`, `.codex/` instructions. Resolve the branch with
`git branch --show-current`; for this plan's current `main` branch the canonical target is:
```text
/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md
```
Record implementation, files, decisions, exact commands/results/failures, release and rollout
@@ -3091,7 +3089,7 @@ authority and destructive downgrade are forbidden.
honestly produced; otherwise record “없음”. Canonical vault unavailability is an explicit
completion blocker.
- [ ] Final handoff lists changed files, behavior, exact verification counts/results, failed/not-run
lanes, release/rollout fingerprints, Wiki capture and follow-up risks.
lanes, release/rollout fingerprints, documentation update and follow-up risks.
**Rollback checkpoint:** after cleanup, do not restore legacy code for events already sent by v2.
Pause admission, preserve schema/backlog/epoch/audit and forward-fix.
@@ -3161,7 +3159,6 @@ Parallel work is allowed only at non-overlapping stable boundaries:
| env/registries/runbooks | 23 |
| no-skip pre-cutover release artifact + independent review | 24 |
| exact-target approved deployment cutover evidence | 25 |
| observation exit + legacy cleanup + cleanup-artifact requalification + final Wiki | 26 |
## 10. Follow-up plans after first R2
@@ -3199,5 +3196,5 @@ Parallel work is allowed only at non-overlapping stable boundaries:
- operator mutation requires auth, expected generation/version, no active claim and immutable audit.
- disabled and configured-but-not-ready are different states.
- fake/single-node/local evidence cannot be relabelled as production R2.
- implementation completion requires exact commands/results and LLM Wiki capture.
- implementation completion requires exact commands/results and documentation update.
- agent never stages, commits, amends or pushes.
@@ -186,7 +186,7 @@ SES SNS HTTPS callback
않는다. 각 task 시작 전 `git status --short`로 overlap을 다시 확인한다.
12. 새 타입이나 파일이 이 계획의 surface 밖에 필요하면 조용히 확장하지 말고 plan을 먼저
갱신한다.
13. 각 Wave exit에서 LLM Wiki branch-note를 갱신해 files, decisions, commands/results,
13. 각 Wave exit에서 design record를 갱신해 files, decisions, commands/results,
evidence grade와 blocker를 남긴다. 파생 raw 문서가 없으면 cluster에 “없음”을 명시한다.
## 6. Stop conditions
@@ -241,7 +241,7 @@ SES SNS HTTPS callback
`src/app-bootstrap/src/test/java/dev/caskeleton/adapter/outbound/OptionalAdapterBeanGatingTest.java`
- [x] Record the starting `git status --short`, current branch, registry edges and current provider
dependencies in the branch-note.
dependencies in the design record.
- [x] Re-run the existing R0 behavior without changing it:
```bash
@@ -806,7 +806,7 @@ removing bindings, but these types must remain while compiled consumers exist.
- [x] Confirm application bytecode/import scan contains no Spring, JPA, Slack, AWS, JSON or HTTP
provider type.
- [x] Request an application/transaction boundary review before Wave B.
- [x] Update the LLM Wiki branch-note with Wave A evidence and an explicit derived-document decision.
- [x] Update the design record with Wave A evidence and an explicit derived-document decision.
---
@@ -1041,7 +1041,7 @@ Task 18.
httpclient.
- [x] Request catalog/template/provider-SPI review.
Final independent re-review: Blocker 0 / High 0.
- [x] Update the LLM Wiki branch-note with Wave B evidence and an explicit derived-document decision.
- [x] Update the design record with Wave B evidence and an explicit derived-document decision.
---
@@ -1705,7 +1705,7 @@ and inspect accepted/indeterminate inventory before any code rollback.
- [ ] Capture PostgreSQL version, container image digest, test seed and fault matrix results.
- [ ] Request durability/concurrency/crypto review before provider work.
- [ ] Update the LLM Wiki branch-note with Wave C evidence and an explicit derived-document decision.
- [ ] Update the design record with Wave C evidence and an explicit derived-document decision.
---
@@ -1897,7 +1897,7 @@ references and never replay indeterminate sends automatically.
- [ ] Record actual loopback request counts and dependency/CVE/license review.
- [ ] Request provider protocol review before ingress/composition.
- [ ] Update the LLM Wiki branch-note with Wave D evidence and an explicit derived-document decision.
- [ ] Update the design record with Wave D evidence and an explicit derived-document decision.
---
@@ -2524,7 +2524,7 @@ indeterminate rows, preserve all referenced revisions and prefer forward-fix.
```
- [ ] Request inbound-security, configuration, operations and privacy review.
- [ ] Update the LLM Wiki branch-note with Wave E evidence and an explicit derived-document decision.
- [ ] Update the design record with Wave E evidence and an explicit derived-document decision.
---
@@ -2963,7 +2963,7 @@ route-specific and human-controlled.
- [ ] Record the exact local/provider manifest digests, expiry, source/artifact revision and every
skipped/not-run lane. Never copy evidence between cards or environments.
- [ ] Request independent durability, provider-protocol, ingress-security and operations review.
- [ ] Update the LLM Wiki branch-note with Wave F evidence and an explicit derived-document decision.
- [ ] Update the design record with Wave F evidence and an explicit derived-document decision.
---
@@ -3838,7 +3838,7 @@ observation:**
indeterminate. Pause admission, retain schema/revisions and forward-fix unless an exact route inventory
proves zero duplicate risk.
### Task 22: Synchronize truth, run full gates, independent review and LLM Wiki capture
### Task 22: Synchronize truth, run full gates, independent review and documentation update
**Owner:** repository-wide verification/documentation
**Depends on:** all preceding tasks required by the selected release scope
@@ -3859,7 +3859,7 @@ proves zero duplicate risk.
- `src/app-bootstrap/CLAUDE.md`
- `docs/runbooks/notification.md`
- `docs/runbooks/notification-database-role-bootstrap.md`
- LLM Wiki branch-note and only genuinely derived raw documents
- design record and only genuinely derived raw documents
- [ ] Update implementation status from actual source/test/evidence only. Keep every unexecuted
provider/load/rotation lane visibly `NOT_QUALIFIED`.
@@ -3999,20 +3999,18 @@ proves zero duplicate risk.
operational R2 candidate. If sandbox credentials/topology or the human candidate commit are not
available, record the blocker and keep the card `NOT_QUALIFIED`; do not reuse pre-cutover
evidence.
- [ ] Before Wiki capture, read the configured vault's `AGENTS.md`, `CLAUDE.md`, and relevant
- [ ] Before documentation update, read the configured vault's `AGENTS.md`, `CLAUDE.md`, and relevant
`rules/`, `.agents/`, `.claude/`, `.codex/` instructions. Then update exactly
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/<branch-name>.md` with
implementation, files, decisions, commands/results/failures, evidence grade and remaining
risks.
- [ ] Add `raw/errors`, `raw/interviews`, `raw/blog-topics` only when honestly derived; link each child
upward and the branch-note cluster back to each child. Otherwise record “없음” explicitly.
- [ ] Do not mark this task complete if the canonical Wiki path is unavailable; record the precise
upward and the design record cluster back to each child. Otherwise record “없음” explicitly.
capture blocker.
- [ ] A repository-wide gate that cannot run because of environment/tooling/authorization is a
recorded blocker, not a pass. State the exact command and residual risk; do not claim Task 22
complete.
- [ ] Final handoff must list changed files, core behavior, exact verification results, not-run/failed
commands, Wiki capture, evidence level and follow-up risks.
commands, documentation update, evidence level and follow-up risks.
**Rollback checkpoint:** documentation must describe the deployed/evidenced truth, not the preferred
rollback story. Do not rewrite evidence after a failed rollout.
@@ -4062,7 +4060,7 @@ after the shared application contracts are GREEN:
| bounded deadlines/concurrency/amplification | 4–7, 11–15, 18–20 |
| health/metrics/traces/runbook | 18, 20 |
| independent review | 22 |
| LLM Wiki capture | 22 |
| documentation update | 22 |
`minimum implementation R2`는 표의 required task가 실제로 GREEN이고 selected exact card의
no-skip evidence가 fresh할 때만 사용할 수 있다. 일부 task만 끝났다면 해당 evidence row의
@@ -3,8 +3,7 @@
- 작성일: 2026-07-28
- 상태: Batch A–D 및 Batch E pause checkpoint를 main에 통합, Batch E 전체 gate와 R2는 미완료
- 범위: 상세 설계 Phase 0–6; Phase 7/R3는 별도 승인 계획
- LLM Wiki capture: public vault의
`raw/branch-notes/chore-main-worktree-capability-integration.md`에 main 통합 기록 완료
- documentation update: public vault의
> **For agentic workers:** REQUIRED SUB-SKILLS: use
> `superpowers:subagent-driven-development` to execute independent tasks,
@@ -61,7 +60,6 @@ Batch E의 개별 focused fix 증거는
[Batch E pause checkpoint](../../evidence/object-storage/batch-e-pause-checkpoint.md)에 기록됐다.
당시 Batch E combined/root gate는 재실행되지 않았으므로 Batch E 전체 완료나 R2를 주장하지
않는다. 격리 브랜치에서 잘못 선택했던 private vault 경로 대신, main 통합 작업은 사용자가
지정한 public vault의 `raw/branch-notes/chore-main-worktree-capability-integration.md`에
캡처했다.
---
@@ -94,7 +92,6 @@ Batch E의 개별 focused fix 증거는
10. At every batch boundary, update the implementation-status section in the design and this plan.
Do not mark a task complete from code inspection alone.
11. Every Batch A–F checkpoint is a meaningful-work capture boundary. Re-read the canonical LLM
Wiki instructions, update the branch note and any honest derivatives, or record the exact
canonical-vault access block in both this plan and the design before starting the next batch.
A final Task 30 capture does not replace these per-batch records.
@@ -154,7 +151,7 @@ Batch A: Phase 0–1 contract
Every checkpoint named below has three inseparable outputs: (1) the stated GREEN commands and
zero-selected-skip evidence, (2) updated plan/design implementation status and truthful readiness
rows, and (3) a canonical LLM Wiki branch-note update or the exact canonical-vault access block.
rows, and (3) a canonical design record update or the exact canonical-vault access block.
This applies to A at Task 5, B at Task 10, C at Task 16, D at Task 19, E at Task 24, and F at
Task 30; a batch is not closed if any output is missing.
@@ -1766,7 +1763,7 @@ bash ../.github/scripts/verify-gate-matrix.sh
Expected: PASS after the required MinIO direct lanes have passed with zero selected skips. Re-run
`ObjectStorageReadinessRegistryTest` as part of `check`; record both AWS managed/direct lanes as
authority-pending, not as passed evidence. Perform the mandatory Batch D status/Wiki capture before
authority-pending, not as passed evidence. Perform the mandatory Batch D status/documentation update before
Approval Gate A.
---
@@ -3277,7 +3274,7 @@ authorization/rate limiting, or direct API snapshot. A reconciliation row may re
the bounded backup/restore qualification passes; retention may reach R2 only when every mandatory
Object-Lock/role/negative test above passes.
### Task 30: Complete documentation, full gates, independent review, and Wiki capture
### Task 30: Complete documentation, full gates, independent review, and documentation update
**Files:**
@@ -3442,12 +3439,11 @@ Review at least these tracks independently:
Resolve every blocker/high (or Critical/Important) finding and rerun affected focused plus full
gates.
- [ ] **Step 6: Capture the required LLM Wiki record**
- [ ] **Step 6: Capture the required repository documentation record**
Before the implementation completion response, read the canonical vault instructions and update:
```text
/home/donghyeon/workspace/ai-tools/llm-wiki/raw/branch-notes/<branch-name>.md
```
Record files, decisions, test commands/results, failures/blocks, evidence grade, and derivative
@@ -3457,7 +3453,7 @@ different clone; record the exact block in the plan/design and final response.
- [ ] **Step 7: Report exact completion**
The handoff must list changed files, implementation slices, exact commands/results, failures or
unrun protected lanes, Wiki capture, card/provider/profile/evidence tuples, rollback posture, and
unrun protected lanes, documentation update, card/provider/profile/evidence tuples, rollback posture, and
remaining gates. Never use “Objectstorage R2” as an unqualified completion statement.
---
@@ -505,7 +505,7 @@ response-only cut 등 실행 여부가 불확실한 mutation은 `INDETERMINATE`
- 성공/실패 모두 exact VM allowlist를 teardown하고 lab resource가 0인지 확인한다. local
retain-on-failure opt-in은 명시된 경우만 허용하고 CI에서는 금지한다.
## Task 12 — CI, runbook, verification와 Wiki capture
## Task 12 — CI, runbook, verification와 documentation update
**CI**
@@ -532,8 +532,7 @@ cd src
**Documentation**
- capability별 실제 readiness와 남은 R3 한계를 README/spec/runbook에 동기화한다.
- 실행 명령, image/config/program digest, 실패/차단을 public LLM Wiki
`/home/donghyeon/workspace/ai-tools/llm-wiki/raw/branch-notes/main.md`에
- 실행 명령, image/config/program digest, 실패/차단을 public repository documentation
기록하고 실제 파생 오류/면접/블로그 raw 문서를 양방향 링크한다.
**Completion gate**
@@ -651,7 +650,7 @@ cd src
않는다.
- `docs/registries/metrics.yaml`과 runbook을 실제 emitted metric과 동기화한다.
## Task 17 — Resume final review, readiness truth, verification와 Wiki
## Task 17 — Resume final review, readiness truth, verification
- Task 13–16을 task별 spec/code-quality review한다.
- Redis deep design §39/§40을 독립 재검토해 selected/implemented-candidate/not-implemented를 실제
@@ -659,4 +658,4 @@ cd src
- Sentinel/Cluster/k3s/R3 evidence가 없으면 지원/완료로 표기하지 않는다.
- Task 12의 전체 검증을 실행하고 동시 작업의 비-Redis 실패는 소유 파일과 증거를 분리한다.
- Redis README/spec/runbook, readiness registry, CI artifact 계약을 동기화한다.
- LLM Wiki branch-note와 실제 파생 raw 문서를 양방향 링크로 캡처한다.
- design record와 실제 파생 raw 문서를 양방향 링크로 캡처한다.
@@ -63,7 +63,7 @@ and release-blocked by real protocol evidence without adding them to the default
locks, env keys, architecture, public path, wrapper validation, and `git diff --check`.
- [ ] Run full `test`/`check` in proportion to the cross-cutting registry/build changes.
- [ ] Request independent read-only review; resolve all Critical/Important findings.
- [ ] Capture the batch in the LLM Wiki before final completion reporting.
- [ ] Capture the batch in the repository documentation before final completion reporting.
### Explicit P2 Deferral
@@ -88,7 +88,6 @@ schema validator and contract test introduced no SpotBugs finding.
- [x] Enforce an exact catalog for every tracked registry, including object-storage readiness.
- [ ] Resolve every stable `required_test` ID exactly once and reject dangling mappings.
- [ ] Replace the Java runbook stub allowlist with owned, issue-linked, expiring debt data.
- [ ] Clarify tracked registry ownership and private-wiki provenance.
- [x] Run schema, object-storage readiness, runbook, app-bootstrap, and root checks. The checks
exercise the mechanically enforceable catalog/containment rules; the three semantic migrations
above remain explicitly blocked on project-owner evidence.
@@ -141,7 +140,6 @@ The focused RED failed only because `migration-failed.md` was an unexpected lega
After the containment change, the focused Runbook contract passed with 6 tests, zero failures, and
zero skips. Fresh verification also passed `:app-bootstrap:spotlessJavaCheck` and
`:app-bootstrap:check` (77 tasks; 18 executed, 59 up-to-date). Owner, issue, start/sunset,
expiry enforcement, and the private-wiki provenance migration remain deliberately incomplete and
the corresponding Batch 5 checkboxes remain open.
### Batch 5-B/C unresolved semantic migrations audit (2026-08-02)
@@ -158,7 +156,6 @@ enabled.
The runbook corpus contains 43 stub documents, all with response owner `oncall` but no accountable
debt owner, real issue, approved expiry, or bounded debt window. The seven legacy registries contain
30 distinct `owner_branch` labels, none resolving to a current local/remote Git ref, while their
private-wiki paths are absent from a fresh clone. The repository files are now protected as the
tracked artifacts, but current owner IDs, historical-label migration, CODEOWNERS identities,
runbook expiry dates, the `INTERNAL_ERROR` reverse-link decision, and the four umbrella-runbook
retention decisions require real project-owner input. Placeholder owners, issues, selectors, and
@@ -226,7 +223,7 @@ passed, and a fresh repository `check` subsequently passed with the same boundar
- [x] Run full Gradle tests/checks and all repository validators.
- [x] Request an independent P2 code review, resolve actionable findings, and record semantic
blockers separately.
- [x] Update the LLM Wiki branch note and any honest derived raw documents.
- [x] Update the design record and any honest derived raw documents.
Fresh aggregate evidence (2026-08-02):
@@ -245,17 +242,15 @@ Fresh aggregate evidence (2026-08-02):
tracked-file assumption audit now reports only four Docker/Testcontainers integration
assumptions; no registry or repository-contract assumption remains.
LLM Wiki capture evidence (2026-08-02): `raw/branch-notes/main.md` records the integrated P1/P2
implementation, decisions, validation commands, failures, evidence grades, and unresolved semantic
migrations. It links bidirectionally to one resolved error note, one interview-prep note, and one
blog-topic note. The vault's targeted structure lint passed all three derived documents. The branch
note passed its content, frontmatter, required-section, and wikilink checks but retained one explicit
`NAMING_VIOLATION`: repository policy requires `<branch-name>.md` (`main.md`) while the vault naming
rule permits only `feature|fix|chore|experiment-` branch-note prefixes. Neither policy was silently
rule permits only `feature|fix|chore|experiment-` design record prefixes. Neither policy was silently
weakened; the exact conflict is the recorded capture-validation blocker.
Independent aggregate review evidence (2026-08-02): the first pass reported zero critical,
three important, and two minor findings. Wiki capture closed the capture-pending finding; the two
three important, and two minor findings. documentation update closed the capture-pending finding; the two
remaining important items were reclassified as the three project-semantic blockers already kept
open in Batch 5. The two minor code findings were corrected with an exact test-fixture-only
GraphQL SpotBugs exclusion and registry-derived scanning of all 18 production leaves in
@@ -264,5 +259,4 @@ assumption/upward-directory search in `PortfolioErrorCodeRegistryMappingTest`, r
canonical repository-root property, relative Gradle input, and missing-root/symlink-escape
fail-closed checks. The re-review found no new code defect; its only completion-evidence concern
was a stale SampleRemoval XML, addressed by the final repository `check` after these corrections.
The reviewer retained only the Wiki naming-policy disclosure and this Batch 5 checkbox wording as
minor documentation findings; both are now explicit here and in the branch note.
minor documentation findings; both are now explicit here and in the design record.
@@ -341,15 +341,13 @@ from the audit inventory
./gradlew check --warning-mode=fail --no-daemon --console=plain
```
## Task 10: Fresh repository verification, review, and Wiki capture
## Task 10: Fresh repository verification, review, and documentation update
**Files:**
- Modify: `docs/superpowers/plans/2026-08-02-warning-zero-build-refactoring.md` only if execution
evidence exposes a plan correction.
- Modify external Wiki capture:
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/main.md`
and `raw/errors/build-success-warning-debt-2026-08-02.md`.
- Modify external documentation update:
**Steps:**
@@ -381,7 +379,5 @@ from the audit inventory
cases and no qualification source set skipped.
6. Dispatch independent code review over behavior fixes, legacy/provider migrations, and
Gradle/test-noise gates. Apply only evidence-backed findings and rerun affected/full gates.
7. Update the mandatory Wiki branch/error notes with changed files, commands, results, suppression
inventory, blocked environment-only qualifications, and evidence grade. Run per-file Wiki lint;
retain the known `main.md` naming-policy conflict without weakening either policy.
8. Report success only if the clean build is exit zero and the final log is warning/noise clean.
@@ -100,8 +100,7 @@ Every task in every wave plan implicitly includes this section.
dependency edges, and runtime memberships. Never infer them from a document.
- Focused tests are derived as `./gradlew <gradle_path>:test --console=plain`, read from that
registry.
- Non-trivial work ends with an LLM Wiki capture at
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/<branch-name>.md`
- Non-trivial work ends with an documentation update at
(`AGENTS.md:79-90`).
- All Gradle commands run from `src/`, which is the Gradle root.
@@ -210,7 +209,7 @@ order; a wave's exit criterion is the entry criterion of the next.
| 3 | [wave3-environment-and-infra](2026-08-15-wave3-environment-and-infra.md) | Env-source separation, profileless fail-closed, Compose contract SSOT + both scripts, Keycloak realm, MinIO round trip | The full Compose lane matrix passes zero-skip with evidence |
| 4 | [wave4-warning-zero](2026-08-15-wave4-warning-zero.md) | MeterFilter ordering, BeanPostProcessor early-instantiation removal, Flyway warning root cause, IDE suppression narrowing, log/profile agreement | `local`, `dev`, `prod` startup logs contain zero WARN and zero ERROR, with an empty allowlist |
| 5 | [wave5-gradle-build-logic](2026-08-15-wave5-gradle-build-logic.md) | `build-logic` included build with eight TestKit-tested convention plugins; duplicated source-set/lane/API-surface machinery removed | Task graph, dependency graph, test selection, and evidence output are byte-identical to the Wave 4 baseline |
| 6 | [wave6-final-qualification](2026-08-15-wave6-final-qualification.md) | Full `clean check`, the activation matrix, every environment smoke, doc/metadata drift checks, Wiki capture | Every Definition-of-Done checkbox in spec §13 is ticked with attached evidence |
| 6 | [wave6-final-qualification](2026-08-15-wave6-final-qualification.md) | Full `clean check`, the activation matrix, every environment smoke, doc/metadata drift checks, documentation update | Every Definition-of-Done checkbox in spec §13 is ticked with attached evidence |
### Design patterns (spec §8) — where each one lands
@@ -1583,7 +1583,7 @@ Rules to implement, one test case each:
**Context (spec §4.3):** `management.endpoint.health.group.readiness.include: readinessState,db` is
static while `validate-group-membership: true`. With JPA off there is no `db` contributor and startup
fails on a name that cannot resolve. The repository already solves this shape once —
fails on a name that cannot resolve. The repository already solves this shape once —
`RedisReadinessGroupPostProcessor` appends `redisRequired` from the same predicate that creates the
bean, and `application.yml:248-278` explains at length why naming a conditional contributor
statically is wrong. `ReadinessGroupContributor` follows that precedent for `db`.
@@ -30,7 +30,7 @@ Inherited from the index. Wave 6 adds:
completion without the verification, or without naming why it could not run, a stop condition.
- **No conclusion broader than its evidence** (HARD-STOP 7). "The matrix passed" requires the matrix,
not a representative lane.
- **The wave ends with the LLM Wiki capture** required by `AGENTS.md:79-90`, or with an explicit
- **The wave ends with the documentation update** required by `AGENTS.md:79-90`, or with an explicit
reported reason it was blocked.
---
@@ -196,28 +196,23 @@ Walk spec §13 and tick each box **only** with attached evidence. Reproduced her
- [ ] Every P0 blocker on a runtime path from the detailed module reviews is either closed or its
capability is explicitly inactive/experimental.
- [ ] Changed files, commands, results, not-run/blocked items, and evidence grades are captured in the
LLM Wiki branch-note.
design record.
## Task 7: LLM Wiki capture
## Task 7: documentation update
Per `AGENTS.md:79-90`:
- [ ] Create or update
`/home/donghyeon/workspace/ai-tool/llm-wiki-private/raw/branch-notes/<branch-name>.md` with the
implementation, changed files, decisions, verification commands, failures/blocks, and evidence
grades.
- [ ] Create derived documents where genuine material exists: `raw/errors/`, `raw/interviews/`,
`raw/blog-topics/`. Each links upward via `## Parent`; the branch-note's `## Cluster / 묶음`
links back.
- [ ] Where no derived document is warranted, record that judgement explicitly ("추출할 별도 글감
없음") rather than omitting the section.
- [ ] Do not create `wiki/blog/`, `wiki/interview/`, `wiki/portfolio/`, `wiki/concepts/`, or
`wiki/projects/` without an explicit canonical extraction request.
## Task 8: Final report
Per `AGENTS.md:239-251`, the closing response states: changed files; the core changes; verification
commands run; verifications that failed or could not run, with reasons; the Wiki capture result; and
commands run; verifications that failed or could not run, with reasons; the documentation update result; and
remaining risks or follow-ups.
- [ ] Explicitly restate what remains **out of scope and not production-ready**, from the index's scope
@@ -232,6 +227,6 @@ remaining risks or follow-ups.
not-met with its reason.
- [ ] `docs/superpowers/plans/evidence/2026-08-15-wave6-final/` holds the output of every command in
Tasks 1–4.
- [ ] The LLM Wiki branch-note exists and links its derived documents.
- [ ] The design record exists and links its derived documents.
- [ ] No completion, "all passing", or "production-ready" claim appears anywhere without the command
output that supports it.
@@ -0,0 +1,12 @@
# Bootstrap Structured Log Fields — Plan
- [x] Centralize meter/fallback warning shapes in RuntimeWarnings
- [x] Structure fileserver cleanup outcome and retry logs
- [x] Structure outbox scheduler catch-all retry log without inventing an error code
- [x] Structure distributed-lock lease-expiry warning without promoting lock key to a field
- [x] Preserve existing startup and async structured fields
- [x] Add behavior test over real Logback events
- [x] Add operator-facing log-field dictionary
- [x] Run app-bootstrap formatting/full unit/architecture regression
- [x] Prove no WARN/ERROR production log remains without structured fields
- [x] git diff --check
@@ -0,0 +1,11 @@
# Bootstrap Structured Runtime Logging — Plan
- [x] Add structured fields to FileserverCleanupWorker success/failure logs
- [x] Add structured fields to OutboxRelayScheduler unexpected failure log
- [x] Add structured fields to MeteredDistributedLockPort lease-expiry warning
- [x] Add behavior tests that inspect actual Logback structured arguments
- [x] Add bootstrap operational log-field dictionary
- [x] Prove direct WARN/ERROR paths are either structured locally or routed through RuntimeWarnings
- [x] Run focused logging tests
- [x] Run app-bootstrap full test/architecture regression
- [x] git diff --check
@@ -0,0 +1,46 @@
# Deployment Composition Reachability Remediation — Plan
## Stage 0 — global Clock
- [x] Add RED contract for Boot import discovery of the application Clock auto-configuration
- [x] Add RED composition contract for exactly one default Clock and adopter override
- [x] Add BootstrapClockAutoConfiguration
- [x] Register it in app-bootstrap AutoConfiguration.imports
- [x] Remove the idempotency-owned Clock bean
- [x] Keep GraphQL standalone conditional fallback
- [x] Run focused Clock/import tests
- [x] Run app-bootstrap unit/architecture regression
## Stage 1 — currently unreachable bootstrap capability roots
- [x] Re-measure each Redis/outbox/lock/idempotency/tracing root against current conditions
- [x] Make Redis semantic composition a shipped auto-configuration ordered after Redis SDK
- [x] Make outbox composition a shipped auto-configuration preserving outbox.enabled
- [x] Make distributed-lock composition a shipped auto-configuration preserving its activation policy
- [x] Split idempotency scheduling from unconditional configuration and ship provider/application roots safely
- [x] Make tracing composition reachable without creating active tracing when disabled
- [x] Prove all-off still has no optional capability workers/adapters
- [x] Prove each enabled target is reachable from the shipped composition root
## Stage 2 — HTTP client structural gating
- [x] Add HTTP-client auto-configuration package to AUTO_CONFIGURED_PACKAGES
- [x] Add shipped-root off/on regression proof
- [x] Prove child configurations cannot leak through component scan
## Stage 3 — recurrence prevention
- [x] Add generic AutoConfiguration.imports reachability parity
- [x] Add optional-root imported-child scan-exclusion parity
- [x] Add off-import-filter target-list parity
- [x] Add negative fixtures proving the checks fail on missing import, scanned child and stale filter target
## Regression
- [x] app-bootstrap test
- [x] app-bootstrap architectureTest — PASS after the shared-worktree malformed Javadoc was repaired without changing architecture semantics
- [x] app-bootstrap systemTest
- [x] affected leaf checks
- [x] verifyCleanArchitectureDependencies
- [x] sample-portfolio check
- [x] git diff --check
@@ -0,0 +1,15 @@
# HTTP Client Capability Composition Ownership — Plan
- [x] Add generic capability startup-validation failure support and reporter coverage
- [x] Move StrictSettingsBinder to outbound support without duplicating binding policy
- [x] Move HTTP-client settings/binding/env-key ownership to the HTTP-client leaf
- [x] Move HTTP-client Spring auto-configuration and actuator ownership to the leaf
- [x] Move focused HTTP-client auto-configuration tests to the leaf
- [x] Publish HTTP-client root auto-configuration from the leaf JAR
- [x] Remove the bootstrap HTTP-client auto-configuration import and production package
- [x] Prove disabled capability creates no runtime beans
- [x] Prove enabled capability still assembles blocking/reactive client runtime and safety guards
- [x] Prove app-bootstrap/src/main has zero HTTP-client capability imports
- [x] Run HTTP-client unit/security/integration regression, bootstrap test/architecture regression
- [x] Refresh only affected dependency locks
- [x] git diff --check
@@ -0,0 +1,26 @@
# JPA Capability Composition Ownership — Plan
- [x] Add package-private leaf Boot roots under the JPA master switch
- [x] Move vendor/entity/repository/component import ownership to the leaf root
- [x] Add leaf-owned transaction executor and retry runtime composition
- [x] Move the existing JPA observation composition factory to the leaf without inventing new activation semantics
- [x] Keep OSIV/DDL, datasource/version and migration startup policy in app-bootstrap
- [x] Reduce PersistenceJpaRootAutoConfiguration to application startup policy only
- [x] Move leaf-owned composition tests to persistence-jpa
- [x] Register `autoconfigure` in the JPA package dependency catalog and entity-scan exemption registry
- [x] Prove JPA public API surface remains unchanged
- [x] Prove persistence-jpa production has zero bootstrap imports
- [x] Prove JPA-off structural gating is still rooted at the same master switch
- [x] Run persistence-jpa unit/check gates
- [x] Run PostgreSQL transaction integration against a real database
- [x] Run app-bootstrap test/architecture regression
- [x] Dependency-lock review: no coordinate changed, so no lock refresh was required
- [x] git diff --check
## Environment note
The first PostgreSQL transaction-lane run reached Docker and started Ryuk, but the remote host could
not connect back to Ryuk through `172.17.0.1:<mapped-port>`. The fail-closed readiness guard therefore
reported Docker unavailable before PostgreSQL creation. The same lane passed with
`TESTCONTAINERS_RYUK_DISABLED=true`; this was process-local verification only and did not change the
repository's Testcontainers policy.
@@ -0,0 +1,11 @@
# JPA Runtime Master Switch — Plan
- [x] Change the focused runtime fixture so normal runtime tests explicitly enable JPA
- [x] Add a RED test proving JPA-off contributes no runtime beans
- [x] Add the JPA master condition to PersistenceJpaRuntimeConfig
- [x] Preserve the existing addons-enabled secondary switch
- [x] Add/retain an addons-off test under JPA-on
- [x] Run focused persistence-jpa runtime tests
- [x] Run persistence-jpa check and public API surface gate
- [x] Run app-bootstrap unit/architecture/system composition regression
- [x] git diff --check
@@ -0,0 +1,14 @@
# Mongo Health Composition Ownership — Plan
- [x] Add spring-boot-health to persistence-mongo
- [x] Add package-private Mongo Actuator health contributor/config in the leaf
- [x] Import leaf health config from MongoRootAutoConfiguration
- [x] Move health SPI tests from app-bootstrap to persistence-mongo
- [x] Remove bootstrap Mongo production health bridge
- [x] Preserve bean name, master switch and override/back-off semantics
- [x] Prove Mongo public API surface remains unchanged
- [x] Prove app-bootstrap Mongo production ownership is zero
- [x] Refresh persistence-mongo dependency lock only
- [x] Run persistence-mongo test/check gates
- [x] Run app-bootstrap test/architecture regression
- [x] git diff --check
@@ -0,0 +1,25 @@
# Notification Capability Composition Ownership — Plan
- [x] Replace bootstrap StartupFailures dependency in notification secrets with capability startup validation
- [x] Move reusable Notification core/runtime/configuration slices to the notification leaf
- [x] Keep TransactionPort-bound application/use-case composition in app-bootstrap
- [x] Move health/observation support and required actuator dependencies to the leaf
- [x] Move leaf-owned notification composition tests to the leaf
- [x] Keep cross-layer callback composition evidence in app-bootstrap
- [x] Reuse NotificationPlatformAutoConfiguration as the leaf Boot entry point
- [x] Keep newly moved internal Spring configuration out of the public API surface
- [x] Remove the old bootstrap NotificationRootAutoConfiguration
- [x] Update activation/import coverage to capability-owned FQCNs
- [x] Prove notification leaf has zero bootstrap imports
- [x] Prove notification leaf has zero TransactionPort dependencies
- [x] Reduce app-bootstrap Notification production ownership to application composition only
- [x] Run notification API/configuration/evidence/check gates
- [x] Run app-bootstrap test/architecture regression including NTF-020
- [x] Refresh affected dependency locks only
- [x] git diff --check
## Deferred build-inclusion edge
NotificationApplicationCompositionAutoConfiguration currently imports NotificationDispatchProperties.
That single typed runtime-bounds edge is intentionally deferred to the build-inclusion/runtimeOnly
phase rather than duplicating the Notification configuration SSOT in app-bootstrap.

Some files were not shown because too many files have changed in this diff Show More