review-followup Wave 3 라운드 3(P28·P29): fileserver use case·file:* 권한, 보안 파일 primitive 공용화, jvm-test-suite

- 결정 32: fileserver transport 연산 21개를 `port.in` use case로, 쓰기·읽기에 `file:*` 권한(소유자·tenant 정책은 유지),
  inbound 서비스 이름 `*UseCase`, port 구현 이름 `<Tech><Port>` 규칙(S2-#13b, 24개)
- 디렉터리 descriptor 파일 primitive를 `adapter:outbound:support`로(S4-lead-2 일부 — fileserver는 번역만),
  persistence-fileserver를 scan·클래스별 조건 대신 명시적 `@Bean` 설정으로(S2-#8a 일부), `FileVerifier`를 adapter로
- 호출자 0인 `poster.image-attached` 이벤트 삭제, SES SDK client를 레지스트리 종료 때 close, fileserver migration V1–V5 고정
- P29: auxiliary 레인 → Gradle `jvm-test-suite`(BUILD-O3-5, build-logic 16,768 → 5,851줄), redis-sdk가 runtime을 api로(P22-new-3)
- 통합: JPA API surface 기준선 재승인(이름 규칙 변경), migration lane에 V19 반영, messaging 통합 테스트가 jar 안 migration 목록 조회(ORCH-new-5)
- P28·P29 에이전트가 세션 재시작으로 중단 — 커밋된 것만 합치고 결과 파일은 오케스트레이터가 확정, S6-#10a는 P30으로

검증: ./gradlew ci verifyDependencyLocks --warning-mode=fail(714 task) · mainCheck architectureCheck verifyPublicPathSnapshot
:app-bootstrap:verifyEnvKeys configContractCheck · :app-bootstrap:integrationTest :sample-portfolio:integrationTest
:sample-portfolio:systemTest integrationCheck · -p build-logic test · -p optional-platforms ci · releaseCheck qualificationBootJar 통과

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
donghyeon-ka
2026-09-29 14:54:06 +09:00
co-authored by Claude Opus 5.5
parent 09e2dd63d6
commit 0579935746
275 changed files with 5838 additions and 3312 deletions
+7 -7
View File
@@ -43,7 +43,7 @@ dev.caskeleton.adapter.outbound.persistence.api.query.SortDirection
dev.caskeleton.adapter.outbound.persistence.api.transaction.TransactionCompletionEvidence
dev.caskeleton.adapter.outbound.persistence.audit.AuditContextPort
dev.caskeleton.adapter.outbound.persistence.audit.AuditableEntity
dev.caskeleton.adapter.outbound.persistence.audit.DomainContextAuditContextPort
dev.caskeleton.adapter.outbound.persistence.audit.DomainContextAuditContext
dev.caskeleton.adapter.outbound.persistence.cache.CacheConcurrencyStrategy
dev.caskeleton.adapter.outbound.persistence.cache.CacheRegionCatalog
dev.caskeleton.adapter.outbound.persistence.cache.HibernateCacheGuard
@@ -103,12 +103,12 @@ dev.caskeleton.adapter.outbound.persistence.idempotency.jpa.IdempotencyReaper
dev.caskeleton.adapter.outbound.persistence.idempotency.jpa.IdempotencyRecordJpaRepository
dev.caskeleton.adapter.outbound.persistence.idempotency.jpa.entity.IdempotencyRecordEntity
dev.caskeleton.adapter.outbound.persistence.idempotency.postgresql.IdempotencySchemaStream
dev.caskeleton.adapter.outbound.persistence.idempotency.postgresql.PostgreSqlOwnerSafeIdempotencyStore
dev.caskeleton.adapter.outbound.persistence.liveevent.JpaLiveEventReplayAdapter
dev.caskeleton.adapter.outbound.persistence.idempotency.postgresql.PostgreSqlIdempotencyStore
dev.caskeleton.adapter.outbound.persistence.liveevent.JpaLiveEventReplay
dev.caskeleton.adapter.outbound.persistence.liveevent.LiveEventJpaRepository
dev.caskeleton.adapter.outbound.persistence.liveevent.entity.LiveEventEntity
dev.caskeleton.adapter.outbound.persistence.lock.DistributedLockPersistenceConfig
dev.caskeleton.adapter.outbound.persistence.lock.LockRegistryDistributedLockAdapter
dev.caskeleton.adapter.outbound.persistence.lock.LockRegistryDistributedLock
dev.caskeleton.adapter.outbound.persistence.lock.LockSettings
dev.caskeleton.adapter.outbound.persistence.migration.FlywaySchemaPolicy
dev.caskeleton.adapter.outbound.persistence.migration.SchemaManagementMode
@@ -117,13 +117,13 @@ dev.caskeleton.adapter.outbound.persistence.observation.LowCardinality
dev.caskeleton.adapter.outbound.persistence.observation.MicrometerQueryObservation
dev.caskeleton.adapter.outbound.persistence.observation.SqlDiagnosticRedactor
dev.caskeleton.adapter.outbound.persistence.operation.DurableOperationJpaRepository
dev.caskeleton.adapter.outbound.persistence.operation.DurableOperationStoreAdapter
dev.caskeleton.adapter.outbound.persistence.operation.JpaDurableOperationStore
dev.caskeleton.adapter.outbound.persistence.operation.entity.DurableOperationEntity
dev.caskeleton.adapter.outbound.persistence.outbox.h2.H2OutboxClaimRepository
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.JpaOutboxStore
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.OutboxClaimRepository
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.OutboxEventJpaRepository
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.OutboxReaper
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.OutboxStoreAdapter
dev.caskeleton.adapter.outbound.persistence.outbox.jpa.entity.OutboxEventEntity
dev.caskeleton.adapter.outbound.persistence.outbox.postgresql.PostgreSqlOutboxClaimRepository
dev.caskeleton.adapter.outbound.persistence.postgresql.PostgreSqlPersistenceConfig
@@ -172,4 +172,4 @@ dev.caskeleton.adapter.outbound.persistence.springdata.SafeSortMapper
dev.caskeleton.adapter.outbound.persistence.springdata.SafeSortRegistry
dev.caskeleton.adapter.outbound.persistence.springdata.ScrollPolicy
dev.caskeleton.adapter.outbound.persistence.transaction.CallerTransaction
dev.caskeleton.adapter.outbound.persistence.transaction.SpringTransactionPort
dev.caskeleton.adapter.outbound.persistence.transaction.SpringTransaction
@@ -8,13 +8,13 @@ dev.caskeleton.adapter.outbound.persistence.fileserver.FileserverJpaPersistenceC
dev.caskeleton.adapter.outbound.persistence.fileserver.FileserverSchemaActivation
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaCleanupQueue
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaContentReferenceLedger
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaFileMetadataStore
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaFileQuotaService
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaQuotaCommitGateway
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaQuotaReclaimGateway
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaFileMetadata
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaFileQuota
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaQuotaCommit
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaQuotaReclaim
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaRecoveryQueue
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaStagingUploadLocator
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaUploadSessionStore
dev.caskeleton.adapter.outbound.persistence.fileserver.JpaUploadSession
dev.caskeleton.adapter.outbound.persistence.fileserver.entity.CleanupItemEntity
dev.caskeleton.adapter.outbound.persistence.fileserver.entity.FileEntity
dev.caskeleton.adapter.outbound.persistence.fileserver.entity.QuotaReservationEntity
+5
View File
@@ -508,3 +508,8 @@ web 경로의 `W/`는 `src/adapter/inbound/web/src/main/java/dev/caskeleton/adap
| web `MdcKeys` | `src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/observability/MdcKeys.java` | `36ba0810` | shared-contract `observability.MdcKeys`로 이동(X2-P2-5) |
| `DurableOperationJpaRepositoryShapeTest` | `src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/operation/DurableOperationJpaRepositoryShapeTest.java` | `36ba0810` | `ScopedRowRepositoryShapeTest`로 흡수(테스트) |
| notification `UuidV7Generator` 비트 배치 구현 | `src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/dispatch/UuidV7Generator.java` | `36ba0810` | 클래스는 남기고 구현을 uuid-creator로 교체(S1-lead-2) |
| `poster.image-attached` v1 이벤트(`PosterEventPublisher.publishImageAttached`, `PosterImageAttached`, `PosterImageAttachedPayload`, `PortfolioEventContracts.POSTER_IMAGE_ATTACHED`, schema) | `src/sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/{domain/poster/PosterImageAttached.java,application/event/PosterImageAttachedPayload.java}`, `src/sample-portfolio/src/main/resources/contracts/messaging/poster.image-attached/` | `36ba0810` | legacy 업로드 삭제 뒤 호출자 0(P24-new-2·P25-new-2) |
| fileserver inbound 서비스 인터페이스 6개(`UploadApplicationService`, `FinalizeUploadService`, `SingleShotUploadService`, `DownloadApplicationService`, `FileLifecycleService`, `FileserverAdminService`)와 구현 `DefaultUploadApplicationService`·`DefaultFinalizeUploadService`·`DefaultSingleShotUploadService`·`DefaultDownloadApplicationService`·`DefaultFileLifecycleService`·`DefaultFileserverAdminService`, `download/DownloadRequest` | `src/application-fileserver/src/main/java/dev/caskeleton/application/fileserver/{upload,download,lifecycle,admin}/` | `36ba0810` | 결정 32: 연산별 `port.in` use case로 대체(S1-#6b·S1-#18b) |
| `FileserverDownloadLifecycleConfiguration`, `FileserverMaintenanceServiceConfiguration`의 admin 서비스 bean | `src/adapter/outbound/fileserver/src/main/java/dev/caskeleton/adapter/outbound/fileserver/platform/autoconfigure/` | `36ba0810` | application use case 조립을 composition root(`composition:fileserver-platform`)로 |
| `FileserverUploadServiceConfiguration`(→ `FileserverUploadSupportConfiguration`로 개명, 서비스 bean은 use case 설정으로) | `src/composition/fileserver-platform/src/main/java/dev/caskeleton/composition/fileserver/` | `36ba0810` | 같음 |
| `ca.auxiliary-source-set` 플러그인(`AuxiliarySourceSetPlugin`·`Extension`·`Spec`)과 `AuxiliarySourceSetConventionTest` | `src/build-logic/src/{main,test}/java/dev/caskeleton/buildlogic/auxiliary/` | `4f4bd1fd` | Gradle `jvm-test-suite`로 대체(BUILD-O3-5) |
+7
View File
@@ -45,6 +45,13 @@ Startup fails, rather than degrading, when any of these is missing or unsafe:
| `write-roles` | `ROLE_FILE_WRITE` | grants create, append, finalize, delete, copy, move |
| `admin-roles` | `ROLE_FILE_ADMIN` | grants reverify and force-delete, and gates `/internal/fileserver/**` at the servlet chain |
These roles decide the tier inside each operation. In front of it, every operation's use case
carries a `file:*` permission that the web adapter's method security checks against
`ca-skeleton.authz.role-permissions`; `security.yml` grants `file:read` to `ROLE_FILE_READ`,
`file:upload`, `file:delete`, `file:copy` and `file:move` to `ROLE_FILE_WRITE`, and `file:admin` to
`ROLE_FILE_ADMIN`. Renaming a tier role here means mapping the new name there as well, or the
caller is refused before the tier is consulted (`docs/fileserver/design-deviations.md` §5).
There is no anonymous-read switch. Every Fileserver route is authenticated by the servlet chain
before any application policy is consulted, so such a setting could only ever have described a
permission the transport had already refused — a configuration that reads as if it grants access
+36 -32
View File
@@ -12,7 +12,7 @@ A create that fails after the record exists must end in `FAILED`, but the table
The record therefore walks `CREATED → UPLOADING → FAILED`, which is also the honest reading: the
upload had been admitted before it failed.
Pinned by `UploadApplicationServiceTest` (application-core).
Pinned by `ResumableUploadUseCasesTest` (application-fileserver).
### 2. `ContentKey`'s alphabet admits a leading separator
@@ -28,7 +28,7 @@ Deleting a file that is mid-verification has no legal transition. The lifecycle
with `409 FILE_NOT_READY` rather than inventing an edge, which matches the allowed-state list the
JPA `markDeleting` statement already enforced.
Pinned by `FileLifecycleServiceTest`.
Pinned by `FileLifecycleUseCasesTest`.
### 4. `If-Match` is specified as an ETag but the lifecycle was designed around the row version
@@ -36,7 +36,7 @@ The HTTP contract sends an entity tag; the metadata store guards on a numeric ve
takes `Optional<String> expectedEtag` and compares against the record's strong validator, so the
precondition a client sends is the precondition that is checked.
Pinned by `FileLifecycleServiceTest`.
Pinned by `FileLifecycleUseCasesTest`.
### 5. The filename policy left `:` intact
@@ -174,40 +174,44 @@ an extension point for a backend this template does not ship:
`ContentStoreCapabilities` reports what the running store actually supports, so no unimplemented SPI
is advertised as available.
## Known deviation from the repository's application-layer contract
## The repository's application-layer contract
### 5. Fileserver application services are not `CommandUseCase` / `QueryUseCase`
### 5. Fileserver operations are use cases (resolved, owner decision 32)
`src/application-core/CLAUDE.md` requires every inbound port implementation to extend
`CommandUseCase` or `QueryUseCase` and to carry `@UseCaseCapability`, which declares its transaction
mode, idempotency and repository access. The Fileserver instead exposes multi-method services —
`UploadApplicationService`, `DownloadApplicationService`, `FileLifecycleService`,
`FileserverAdminService` and their `Default*` implementations.
Every operation the transport reaches is a `CommandUseCase` or `QueryUseCase` behind a one-method
port in `application.fileserver.port.in` — create, append, status, cancel, finalize and the
single-request upload; describe, prepare, open and transfer for downloads; delete, copy and move;
and the eight management-plane operations. Each implementation (`*ApplicationUseCase`) declares its
`@UseCaseCapability`, so the ArchUnit rules that check transaction mode, repository access and
outbound calls now see the Fileserver like every other feature.
This is a real deviation, not an oversight, and it is unenforced: the ArchUnit rules
`inbound_port_implementations_end_with_use_case` and
`inbound_port_implementations_declare_capability` only match types that implement `UseCase`, so a
service that never does is silently exempt. The capability contract that every other feature in
this repository declares is therefore absent here.
Two authorities guard a write, and both stay:
Two things follow from it. The transaction mode of each operation is expressed only by which
`TransactionPort` method the body happens to call, rather than declared and checked. And the
application layer holds transport policy it would not hold if each operation were a use case with
its own command: HTTP status codes on `FileserverErrorCode`, `Range` and conditional-request
parsing in `api.transfer`, and `Content-Disposition` construction.
| Check | Where | Decides |
| --- | --- | --- |
| `@RequiresPermission("file:…")` | the use case's proxy, enforced by the web adapter's method security | whether the caller's roles grant the operation at all |
| `FileAccessPolicyPort` | inside the use case, before any side effect | the tier (read/write/admin), and that the caller owns the file in its tenant |
The status mapping in particular is a deliberate trade rather than an accident. It lives in
`application-core` so the servlet transport, the reactive transport and the Nginx delegation path
cannot answer the same failure with three different statuses. Moving it to the transport layer
resolves the layering complaint and reintroduces exactly that drift, which is why this is an
architecture decision rather than a cleanup.
The permissions are `file:read` (describe, download, upload status), `file:upload` (create,
append, finalize, cancel, the single-request upload), `file:delete`, `file:copy`, `file:move` and
`file:admin` (every management-plane operation). `security.yml` grants them to `ROLE_FILE_READ`,
`ROLE_FILE_WRITE` and `ROLE_FILE_ADMIN` — the fileserver's own default tier roles — so a caller
holding a tier holds its permissions. A deployment that renames the tier roles, or supplies its own
`FileAccessPolicyPort` under other role names, maps those names in
`ca-skeleton.authz.role-permissions` too; `security.access-policy: unenforced` relaxes only the
tier and ownership check, never the permission gate.
**Status: open, deliberately unresolved in this change set.** Closing it means roughly thirty
command/query use cases, a decision about where the shared status vocabulary lives, and a change to
the ArchUnit rules so a service that bypasses the contract fails the build instead of being exempt
from it. That belongs in its own ADR with its own review, and doing it inside a correctness patch
would mix a large mechanical refactor into changes that need to be readable.
The resumable transfers run on the transfer pool, and method security reads the security context
of the calling thread, so `BlockingTransferExecutor` carries the request's context onto the worker
(`BlockingTransferExecutorSecurityContextTest`). Without it an authenticated append was refused as
anonymous.
Nothing here is pinned by a test, because the deviation is the absence of a constraint. The next
step is the ADR, not another test.
What is not a use case is what no transport calls: `CleanupService` and
`FileReconciliationService` are driven by background workers with no caller identity, and a
mutating use case must declare a permission a scheduler could not hold.
`FileserverUseCaseContractDeviationTest` freezes that list.
The HTTP status vocabulary on `FileserverErrorCode` stays in the application layer, for the reason
this section used to give: the servlet transport and the Nginx delegation path must not answer the
same failure with different statuses.
+1 -1
View File
@@ -5,7 +5,7 @@ Design §37. What is measured, and what must never appear in a measurement.
## What is emitted by default
Nothing JPA-specific. No composition constructs a `MeterRegistry`-backed observation for the
platform, and `SpringTransactionPort` records no transaction metric. The `jpa.transaction.*` meters
platform, and `SpringTransaction` records no transaction metric. The `jpa.transaction.*` meters
this page used to list (`duration`, `rollback`, `timeout`, `completion.unknown`) were produced by
`JpaTransactionObservation`, which nothing constructed; it was removed on 2026-09-25
(`docs/capability-status.md`). Transaction outcomes are visible through the shared persistence error
+1 -1
View File
@@ -27,7 +27,7 @@ reason.
**Signal:** `DB_DEADLOCK` / serialization failures rising in the persistence error codes.
`SpringTransactionPort` does not retry, so each one reaches the caller.
`SpringTransaction` does not retry, so each one reaches the caller.
1. Group the failures by operation. A single operation dominating means a hot row or an
inconsistent lock order.
+2 -2
View File
@@ -6,7 +6,7 @@ Design §15-§20. What owns a transaction, what may be retried, and what must ne
Repository adapters do not open transactions. The use case does, through `TransactionPort`,
because the unit of work is a business decision and only the use case knows where it starts and
ends. `SpringTransactionPort` is the only implementation: one pre-built `TransactionTemplate` per
ends. `SpringTransaction` is the only implementation: one pre-built `TransactionTemplate` per
mode over Spring's `PlatformTransactionManager`, every mode pinned to `READ_COMMITTED`.
| Call | Propagation | When |
@@ -28,7 +28,7 @@ maximumPoolSize >= (concurrent_threads x (1 + max_requires_new_depth)) + 1
## Nothing is retried by the port
`SpringTransactionPort` runs the action once. A failure rolls back and propagates, translated to
`SpringTransaction` runs the action once. A failure rolls back and propagates, translated to
the shared persistence error codes where the SQLSTATE is known. A caller that decides to retry must
re-run the whole use case in a new transaction — never re-issue one statement — because an
optimistic conflict or a serialization failure means the state the attempt computed against is no
@@ -0,0 +1,25 @@
## 행 결과
| ID | 결과 | 근거 |
|---|---|---|
| S1-#6b | 완료 | P28 W3 `b06b4166`(결정 32). transport가 부르는 21개 연산을 `application-fileserver/.../port/in/*UseCase`(연산 하나씩, `CommandUseCase`/`QueryUseCase`) + `*Command`/`*Query`로 선언하고 구현 `*ApplicationUseCase`(upload·download·lifecycle·admin 패키지)에 `@UseCaseCapability`를 단다. 권한: `file:read`(describe·prepare·open·transfer·upload status), `file:upload`(create·append·finalize·cancel·single-request upload), `file:delete`, `file:copy`, `file:move`, `file:admin`(관리 plane 8개). `FileAccessPolicyPort`(tier·소유자·tenant)는 각 use case 안에서 그대로(결정 32 "둘 다"). `security.yml` `"[ROLE_FILE_READ]": file:read`, `"[ROLE_FILE_WRITE]": file:upload,file:delete,file:copy,file:move`, `"[ROLE_FILE_ADMIN]": file:admin`(fileserver 기본 tier 역할 이름을 key로 — 한 역할이 권한과 tier를 함께 준다), dev Keycloak realm에 같은 client role 3개(`ROLE_FILE_ADMIN`은 서비스 계정에 미부여), `docs/fileserver/design-deviations.md` §5·`configuration.md`·`infra/keycloak/README.md`. 조립은 `composition:fileserver-platform`의 `FileserverUploadUseCaseConfiguration`·`FileserverFileUseCaseConfiguration`·`FileserverAdminReadUseCaseConfiguration`·`FileserverAdminActionUseCaseConfiguration`(BOOT-007 8-bean 한도), adapter의 download/lifecycle/admin 서비스 조립 삭제. 테스트: `FileserverCompositionIntegrationTest.anUploadByATierWithoutTheUploadPermissionIsRefusedBeforeAnythingIsStaged`(실제 PG, `MethodSecurityConfig` 없이 FAIL 1건 → 포함 PASS; fileserver tier는 통과하지만 권한 매핑이 없는 역할 `ROLE_UNMAPPED_WRITER`), 같은 클래스 3건 PASS; `BlockingTransferExecutorSecurityContextTest.workOnTheTransferPoolSeesTheCallersAuthentication` FAIL(assertion) → PASS(전송 풀 작업에 요청 SecurityContext 전달 — 없으면 append·finalize·download stream이 권한 게이트에서 익명으로 거부됨). ArchUnit: fileserver access policy 패키지(`adapter.outbound.fileserver.platform.security`, IO 없음)를 D7 in-process driven outbound로 추가(`ApplicationBoundaryArchitectureTest.isInProcessDrivenOutbound`), `FileserverUseCaseContractDeviationTest` 동결 목록을 `DefaultCleanupService`·`DefaultFileReconciliationService`·`WriterLeaseCoordinator`로 축소(배경 작업은 caller identity가 없어 권한을 가질 수 없음). `:app-bootstrap:architectureTest` PASS. 수정 방향과 다른 점: 트랜잭션을 열지 않던 append·status·download read·incomplete-list는 `USE_CASE_CAPABILITY_MATCHES_TRANSACTION_PORT_BOUNDARY` 때문에 해당 경계(`inWrite`로 lease commit 감쌈 — coordinator 경계에 join, `inRead`로 조회)를 직접 연다; 여러 use case를 합성하는 single-request upload·operator cleanup은 `RepositoryAccess.NONE`(각 단계가 자기 경계를 연다) |
| S1-#18b | 완료 | P28 W3 `b06b4166`: inbound `UploadApplicationService`·`DownloadApplicationService`·`FileLifecycleService`·`FileserverAdminService`·`SingleShotUploadService`·`FinalizeUploadService`와 `Default*` 구현을 `port.in/*UseCase` + `*ApplicationUseCase`로(notification의 `port.in` 규칙과 같음). 남긴 `*Service`는 transport가 부르지 않는 배경 작업 `CleanupService`·`FileReconciliationService`뿐 — 쓰기 use case는 `@RequiresPermission`이 필수인데 scheduler는 권한을 가질 caller가 없으므로 use case로 만들면 매 실행이 거부된다(`FileserverUseCaseContractDeviationTest` 주석) |
| S4-lead-2 | 남음 | 한 것(P28 W3 `da49df6c`): fileserver의 descriptor 기반 primitive를 `adapter/outbound/support/.../support/filesystem/SecureDirectoryWalk.java`(이동, public)·`SecureFileAccess.java`(신규: createNew·openForRead/Write·deleteRegularFile·readAttributes·isRegularFile·createParentDirectories)로 올리고, 거부를 에러 코드 없는 타입 있는 `IOException`(`SymbolicComponentException`·`PathEscapeException`·`NotRegularFileException`)으로. fileserver `SafeFileChannelFactory`는 위임 + `LocalStorageFailures` 번역만(P24 메모대로 번역 분리). 테스트: `SecureFileAccessTest` 8건(symlink leaf·symlink 디렉터리 component·`..` 탈출·create-only 충돌·symlink delete 거부·열린 뒤 디렉터리를 link로 바꾸는 race `aDirectorySwappedForALinkAfterItWasOpenedDoesNotRedirectTheOperation`), `SecureDirectoryWalkTest` 2건(support로 이동), `LocalStorageFailuresTest` 2건 FAIL→PASS(P28-new-1). fileserver·support `check`, PG lane `postgresqlFileserver{Migration,Metadata,Reclamation}IntegrationTest` 6·15·15 PASS. 남은 것: objectstorage `LocalObjectPathGuard`를 이 primitive로 바꾸는 재작성(과 objectstorage→support registry edge). 이유: local-dev provider의 쓰기는 "없거나 완전한" 게시를 위해 임시 파일을 `Files.createLink`(link(2))로 create-only 연결하는데, `SecureDirectoryStream`에는 linkat이 없고 `move`는 기존 대상을 덮어쓴다(renameat2 NOREPLACE 미노출). descriptor 기반으로 바꾸면 create-only 원자 게시를 잃거나(대상 선점 후 덮어쓰기 — 읽는 쪽이 빈/부분 객체를 볼 수 있음) native 호출이 필요해 설계 결정이 먼저다. 읽기·retire 경로만 바꾸면 쓰기 경로의 race가 남아 "한 primitive"가 되지 않으므로 이번 묶음에서는 손대지 않음(대상은 local-dev 전용 provider) |
| S6-#10a | 남음 | / P28 에이전트가 세션 재시작으로 중단(미커밋) — P30으로 |
| S2-#8a | 남음 | 한 것(P28 W3 `537310f9`): persistence-fileserver의 `@ComponentScan` + store 9개 클래스별 `@Repository`·`@ConditionalOnProperty`를 없애고, 조건 한 곳(`FileserverJpaPersistenceConfig`, 이 leaf의 `AutoConfiguration.imports` root) + 명시적 `@Bean` 설정 둘(`FileserverJpaMetadataStoreConfig`·`FileserverJpaQueueStoreConfig`)을 `@Import` — notification(`NotificationJpaPersistenceFacade`)과 같은 방식. web-fileserver 컨트롤러 4개·예외 처리기가 조립 root가 이미 거는 `app.fileserver-platform.enabled`를 반복하던 것 삭제(tus·draft12·admin은 자기 스위치만). 검증: persistence-fileserver·web-fileserver·composition fileserver `check`, PG lane `postgresqlFileserver{Metadata,Reclamation}IntegrationTest` 15·15, `FileserverCompositionIntegrationTest` 3 PASS. 남은 것: persistence-jpa `JpaAdapterComponentsConfig`의 8개 패키지 stereotype 스캔. 이유: 스캔이 있는 까닭이 이 leaf의 패키지 경계 목록(`JpaModuleBoundaryTest.PACKAGE_CATALOG`)이 `config`/`autoconfigure` → `audit`·`failure`·`liveevent`·`lock`·`operation`·`outbox` edge를 허용하지 않기 때문이다 — 명시적 `@Bean`으로 바꾸려면 (a) `autoconfigure`에 6개 edge를 추가하거나 (b) 패키지마다 capability 스위치를 반복하는 auto-configuration을 두어야 해서 leaf 내부 모듈 지도 결정이 먼저다(`JpaAdapterComponentsConfigTest`·`PersistenceEntityScanCoverageTest`가 스캔 계약을 고정). Mongo는 이미 자기 `AutoConfiguration.imports` 둘 + `@Bean` 방식이라 변경 없음(남은 것은 `MongoPlatformAutoConfiguration`의 bean별 조건 반복 19개) |
| S2-#13b | 완료 | P28 W3 `2619cb18`: 규칙 `<Tech><포트 이름에서 Port를 뺀 것>` 하나로 24개 개명(테스트 클래스 이름 포함). persistence-fileserver `JpaFileMetadata`·`JpaFileQuota`·`JpaQuotaCommit`·`JpaQuotaReclaim`·`JpaUploadSession`(이미 규칙대로인 `JpaCleanupQueue`·`JpaContentReferenceLedger`·`JpaRecoveryQueue`·`JpaStagingUploadLocator`는 유지); fileserver adapter `LocalCleanupContent`·`LocalCopyContent`·`LocalOrphanScan`·`LocalReconciliationContent`·`LocalStorageHealth`·`LocalStorageUsage`·`LocalUploadContent`·`LocalUploadStorage`·`StructuredAdminAudit`·`StructuredFileserverAudit`·`RandomUploadIdentifier`; persistence-jpa core `SpringTransaction`·`JpaOutboxStore`·`JpaDurableOperationStore`·`PostgreSqlIdempotencyStore`·`LockRegistryDistributedLock`·`MeteredDistributedLock`·`DomainContextAuditContext`·`JpaLiveEventReplay`. 행에 적힌 `CanonicalOutboxAppendAdapter`는 P18에서 이미 삭제됨. 유지(이유): `LocalBlockingContentStore`(포트 3개를 구현하는 store 자체), `VerificationCoordinator`(verifier 파이프라인 합성 — 기술 어댑터가 아님), `RoleBased`/`UnenforcedFileAccessPolicy`(이미 `<정책><Port>`). 문서·README·CLAUDE.md의 단순 이름과 PG 통합 테스트의 bean 이름 문자열도 갱신. API surface 재승인(`updateJpaApiSurface -PapproveJpaApiSurfaceChange`, `updatePersistenceFileserverApiSurface -PapprovePersistenceFileserverApiSurfaceChange`, 개수 증가 없음). persistence-jpa·persistence-fileserver·fileserver·composition fileserver·idempotency·application-core·notification·persistence-notification `check`, `:app-bootstrap:architectureTest`·`test` PASS |
| P24-new-2 | 해당 없음(코드 삭제) | P28 D `a49342e2`: `PosterEventPublisher.publishImageAttached`, `domain/poster/PosterImageAttached`, `PosterImageAttachedPayload`, `PortfolioEventContracts.POSTER_IMAGE_ATTACHED`와 그 bean, `contracts/messaging/poster.image-attached/v1.schema.json` 삭제. `git grep "ImageAttached\b"` 0건. `:sample-portfolio:test` PASS |
| P25-new-2 | 해당 없음(코드 삭제) | P24-new-2와 같음(`a49342e2`) |
| P24-new-3 | 완료 | P28 W3 `12f0b183`: `FileVerifier`를 `application-fileserver/.../api/security`에서 `adapter/outbound/fileserver/.../platform/verification/FileVerifier.java`로 이동(사용처는 그 패키지의 verifier 5개·`VerificationCoordinator`·`FileserverVerificationConfiguration`뿐). application은 `FileVerificationPort`만 본다 |
| P23-new-1 | 완료 | P28 W2 `b13cf08b`: `AppliedMigrationImmutabilityTest.MIGRATION_ROOTS`에 `../persistence-fileserver/src/main/resources/db/migration` 추가 → `everyVersionedMigrationIsPinned` FAIL(`AssertionError at AppliedMigrationImmutabilityTest.java:72`, `jpa/fileserver/V1..V5` 미고정) → `applied-migrations.sha256`에 5줄 추가 후 PASS. `persistence-jpa/build.gradle` test `inputs.dir(...fileserver migration)` 추가. 새 migration 버전은 추가하지 않음 |
| P23-new-2 | 완료 | P28 W2 `b13cf08b`: `ProviderRuntimeRegistryTest.closingTheRegistryClosesTheAdapterOfEveryRegisteredGeneration` FAIL(컴파일 실패 `cannot find symbol registry.close()`) → PASS; `SesNotificationProviderAdapterTest.closingTheAdapterClosesItsSdkClient` PASS. `SesNotificationProviderAdapter implements AutoCloseable`(`close()`→`client.close()`), `ProviderRuntime.release()`, `ProviderRuntimeRegistry implements AutoCloseable`(현재·drain 세대 모두 release) — `providerRuntimeRegistry` `@Bean`의 추론 destroy method로 context 종료 때 호출. `:adapter:outbound:notification:check` PASS |
## 제거된 코드
| 대상 | 경로 | 마지막으로 존재한 커밋 | 이유 |
|---|---|---|---|
| `poster.image-attached` v1 이벤트(`PosterEventPublisher.publishImageAttached`, `PosterImageAttached`, `PosterImageAttachedPayload`, `PortfolioEventContracts.POSTER_IMAGE_ATTACHED`, schema) | `src/sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/{domain/poster/PosterImageAttached.java,application/event/PosterImageAttachedPayload.java}`, `src/sample-portfolio/src/main/resources/contracts/messaging/poster.image-attached/` | `36ba0810` | legacy 업로드 삭제 뒤 호출자 0(P24-new-2·P25-new-2) |
| fileserver inbound 서비스 인터페이스 6개(`UploadApplicationService`, `FinalizeUploadService`, `SingleShotUploadService`, `DownloadApplicationService`, `FileLifecycleService`, `FileserverAdminService`)와 구현 `DefaultUploadApplicationService`·`DefaultFinalizeUploadService`·`DefaultSingleShotUploadService`·`DefaultDownloadApplicationService`·`DefaultFileLifecycleService`·`DefaultFileserverAdminService`, `download/DownloadRequest` | `src/application-fileserver/src/main/java/dev/caskeleton/application/fileserver/{upload,download,lifecycle,admin}/` | `36ba0810` | 결정 32: 연산별 `port.in` use case로 대체(S1-#6b·S1-#18b) |
| `FileserverDownloadLifecycleConfiguration`, `FileserverMaintenanceServiceConfiguration`의 admin 서비스 bean | `src/adapter/outbound/fileserver/src/main/java/dev/caskeleton/adapter/outbound/fileserver/platform/autoconfigure/` | `36ba0810` | application use case 조립을 composition root(`composition:fileserver-platform`)로 |
| `FileserverUploadServiceConfiguration`(→ `FileserverUploadSupportConfiguration`로 개명, 서비스 bean은 use case 설정으로) | `src/composition/fileserver-platform/src/main/java/dev/caskeleton/composition/fileserver/` | `36ba0810` | 같음 |
## 새로 발견한 결함
- `P28-new-1` (고침, `da49df6c`): `adapter/outbound/fileserver/.../platform/local/AtomicMoveContentPublisher.java`(`SecureDirectoryWalk.move`)와 `ContentPublishVerification.java`(`SecureDirectoryWalk.inDirectory`)는 walk를 직접 불러 거부를 `LocalStorageFailures.translate`로 번역했는데, 거기서는 `SymbolicComponentException`·경로 탈출이 일반 `IOException`으로 분류돼 `STORAGE_UNAVAILABLE`(재시도 가능 503)이 됐다 — 클라이언트가 이미 link로 바뀐 경로로 재시도한다. `SafeFileChannelFactory`만 symlink를 따로 잡고 있었다. `LocalStorageFailures.translate`가 walk의 타입 있는 거부를 모두 `PATH_OUTSIDE_NAMESPACE`(재시도 불가)로. `LocalStorageFailuresTest.aSymbolicComponentRefusedByTheWalkIsAPermanentPathRejection`·`aTargetOutsideTheRootIsAPermanentPathRejection` FAIL(분기 제거 시 2건 실패) → PASS. (커밋 라벨은 W3지만 이 결함 수정이 함께 들어 있다.)
@@ -0,0 +1,18 @@
# W3-P29 결과 (에이전트 중단 후 오케스트레이터가 통합 검증으로 확정)
worktree: `.claude/worktrees/agent-aa7d1d4704847ed1c` (브랜치 `worktree-agent-aa7d1d4704847ed1c`)
커밋: `e3a0bd32` (jvm-test-suite), `3967c9ef` (redis-sdk api)
## 행 결과
| ID | 결과 | 근거 |
|---|---|---|
| BUILD-O3-5 | 완료 | `e3a0bd32`. `ca.auxiliary-source-set` 삭제, 13 leaf → `testing.suites`. TDD: `StrictTestLaneConventionTest.aLaneNamedAfterItsJvmTestSuiteMakesTheSuiteTaskStrict` FAIL(이전 플러그인: "Cannot add task 'integrationTest' as a task with that name already exists.") → PASS / 통합 검증(2026-09-29): ci·mainCheck·build-logic test·optional-platforms ci·releaseCheck 통과, integrationCheck는 jar 리소스 목록 조회 1건 수정 후 재실행 |
| BUILD-결론-1 | 완료 | build-logic Java 6,068 → 5,851줄(main 3,966 + test 1,885) / 수정 방향(O3-2·5·6) 전부 이행: 16,768 → 5,851줄(main 3,966 + test 1,885). main+test 합계는 목표 3.5–4k 초과 — 남은 것은 아키텍처 코어·컨벤션·레인 하나와 그 테스트 |
| P22-new-3 | 완료 | `3967c9ef`. redis-sdk만 `java-library` + `api project(':adapter:outbound:redis-runtime')` / 통합 검증 통과(redis-sdk java-library + api redis-runtime) |
## 제거된 코드
| 대상 | 경로 | 마지막으로 존재한 커밋 | 이유 |
|---|---|---|---|
| `ca.auxiliary-source-set` 플러그인(`AuxiliarySourceSetPlugin`·`Extension`·`Spec`)과 `AuxiliarySourceSetConventionTest` | `src/build-logic/src/{main,test}/java/dev/caskeleton/buildlogic/auxiliary/` | `4f4bd1fd` | Gradle `jvm-test-suite`로 대체(BUILD-O3-5) |
## 새로 발견한 결함
@@ -583,7 +583,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| ID | 심각도 | 요약 | 상태 | 근거 | Wave | 수정 방향 |
|---|---|---|---|---|---|---|
| BUILD-결론-1 | 권고 | 빌드 코드가 목적에 비해 너무 큼(16,768줄 중 아키텍처 검사 13%) | 남음 | 현재 Java(main+test) build-logic 6,184 + build-tools 4,320 = 10,504줄. O3 목표는 3.5–4k줄<br>Wave 3 W3-P16: 미완 — build-logic+build-tools Java 10,504줄 → build-logic 6,185줄(main 4,184 + test 2,001; build-tools 0). 목표 3.5–4k에는 BUILD-O3-5 나머지(auxiliary → jvm-test-suite, release-provenance 제거)가 필요<br>Wave 3 W3-P27: 미완 — O3-5 나머지 뒤 build-logic Java 줄 수로 판정 | W3 | BUILD-O3-2·5·6 진행으로 줄인다 |
| BUILD-결론-1 | 권고 | 빌드 코드가 목적에 비해 너무 큼(16,768줄 중 아키텍처 검사 13%) | 완료 | Wave 3 W3-P29 (Wave 3 라운드 3 커밋): build-logic Java 6,068 → 5,851줄(main 3,966 + test 1,885) / 수정 방향(O3-2·5·6) 전부 이행: 16,768 → 5,851줄(main 3,966 + test 1,885). main+test 합계는 목표 3.5–4k 초과 — 남은 것은 아키텍처 코어·컨벤션·레인 하나와 그 테스트 | - | BUILD-O3-2·5·6 진행으로 줄인다 |
| BUILD-결론-2 | 권고 | 기능별 증거 검사(E)가 46%로 가장 큰 덩어리 | 완료 | Wave 3 W3-P16 (Wave 3 라운드 1 커밋): 기능별 evidence 검사 중 JPA(`jpa/` 2,701+706줄, `junit/` 138+76줄) 삭제. 남은 E는 redis topology(소유자 결정 4로 유지) | - | JPA evidence 폐기(BUILD-O3-2) |
| BUILD-결론-3 | 권고 | 아키텍처 게이트(방향 task·ArchUnit)는 크기가 적정하니 유지 | 완료 | `src/build-logic/src/main/java/dev/caskeleton/buildlogic/architecture/ArchitecturePlugin.java:58-223` 방향·순수성·ignored-source 유지, `src/app-bootstrap/build.gradle:45-52` architectureTest 레인 유지 | - | - |
| BUILD-결론-4 | 권고 | 09-16 단계 분리 계획이 절반만 이행됨(2단계 게이트가 PR에서 돎) | 완료 | Wave 3 W3-P16 (Wave 3 라운드 1 커밋): 하위 행으로 추적: B2·B4-17·B4-27·B4-28·B4-30·중복-6 완료, B3의 "변경 모듈만 실행"과 C는 보류(각 행) | - | 해당 행 참고 |
@@ -613,7 +613,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| BUILD-O3-2 | 권고 | O3: JPA evidence manifest(`ca.jpa-evidence`, `ca.jpa-qualification`) 폐기, leaf 테스트로 | 완료 | Wave 3 W3-P16 (Wave 3 라운드 1 커밋): build-tools `jpa/`·`junit/`, `ca.jpa-evidence`·`ca.jpa-qualification` 삭제. readiness 카드 검사 → `JpaReadinessRegistryTest`(persistence-jpa `test`, 입력 `readiness-cards.yaml`·`src/postgresqlIntegrationTest/java` 선언). `everyImplementedCardNamesTasksThisLeafDeclares` FAIL(삭제된 `verifyJpaPrimaryFoundationEvidence`를 가리키던 카드, AssertionError at :106) → 카드를 `integrationTestLaneCheck`로 고쳐 PASS. 카드가 인용한 scenario는 readiness 레인의 `requires` + `rejectSkipped`로(manifest가 JUnit XML로 확인하던 것). `jpaReleaseQualification`은 leaf 집계 태스크(registry의 blocking gate를 dependsOn). workflow: `jpa-r2-evidence.yml`, integration-main `jpa-candidate-evidence` 삭제 | - | 두 플러그인과 `junit` 패키지를 삭제하고, readiness/release registry 검사만 persistence-jpa 테스트(inputs 선언)로 옮김. workflow의 evidence task 호출도 정리 |
| BUILD-O3-3 | 권고 | O3: verifyEnvKeys 위치 | 완료 | 소유자 결정은 bootstrap에 유지. 현재 `src/app-bootstrap/build.gradle:5`(`ca.config-contract`), `src/build.gradle:75-79`→mainCheck | - | - |
| BUILD-O3-4 | 권고 | O3: redis topology lane을 strict lane으로 흡수 | 완료 | 소유자 결정은 유지. `src/build-logic/src/main/java/dev/caskeleton/buildlogic/redis/` 유지, `.github/workflows/redis-sdk-topology.yml` 경로 필터 PR | - | - |
| BUILD-O3-5 | 권고 | O3: build-logic에는 코어·컨벤션·레인 하나만 남김(인벤토리 #11·#18·#19·#20·#31) | 남음 | 남은 비핵심 플러그인(main+test 줄 수): publicpath 288+37, archive 216+46, release 138+71, bootstrap(developer-bootstrap·bootrun-dotenv) 328+203, auxiliary 151+145. leaf 버전은 아직 SHA 버전(`src/build-logic/src/main/java/dev/caskeleton/buildlogic/java/JavaConventionsPlugin.java:36-39`)<br>Wave 3 W3-P16: 미완 — 완료: public-path → app-bootstrap `PublicPathSnapshotTest`(main 단계 레인 `publicPathSnapshotTest`, 루트 별칭 `verifyPublicPathSnapshot`, 승인 `-PapprovePublicPathChange`; 기준선은 헤더의 명령만 바뀜), developer-bootstrap → `scripts/bootstrap-local.sh`, leaf version에서 revision 제거 후 archive-hygiene 삭제, app-bootstrap `springBoot.buildInfo`(`build.revision`, `time` 제외). 남음: (1) `ca.release-provenance` 플러그인 제거 — `src/optional-platforms/build.gradle`이 적용하고 있어 이번 Wave에서 건드리지 않기로 한 gRPC build 파일 수정이 필요, (2) auxiliary → `jvm-test-suite` — grpc·messaging 포함 14개 leaf build 파일을 바꾸는 작업이라 동시 묶음과 충돌. 둘 다 다음 순차 작업으로<br>Wave 3 W3-P27: 미완 — 완료분: `302ba915` `ca.release-provenance` 제거(leaf version·sourceRevision은 `ca.java-conventions`의 `JavaConventionsPlugin.sourceRevision`, 루트 `verifyReleaseProvenance`는 같은 함수를 부르는 build.gradle 태스크, TestKit 테스트는 `PlatformModuleConventionTest`로). 남은 것: auxiliary 레인 → `jvm-test-suite`(중단된 WIP 패치) | W3 | public-path는 app-bootstrap approval test로, release-provenance는 `springBoot { buildInfo() }`로 바꾸고, leaf 버전 고정 후 archive-hygiene 삭제. developer-bootstrap은 `scripts/`로, auxiliary는 `jvm-test-suite`로 |
| BUILD-O3-5 | 권고 | O3: build-logic에는 코어·컨벤션·레인 하나만 남김(인벤토리 #11·#18·#19·#20·#31) | 완료 | Wave 3 W3-P29 (Wave 3 라운드 3 커밋): `e3a0bd32`. `ca.auxiliary-source-set` 삭제, 13 leaf → `testing.suites`. TDD: `StrictTestLaneConventionTest.aLaneNamedAfterItsJvmTestSuiteMakesTheSuiteTaskStrict` FAIL(이전 플러그인: "Cannot add task 'integrationTest' as a task with that name already exists.") → PASS / 통합 검증(2026-09-29): ci·mainCheck·build-logic test·optional-platforms ci·releaseCheck 통과, integrationCheck는 jar 리소스 목록 조회 1건 수정 후 재실행 | - | public-path는 app-bootstrap approval test로, release-provenance는 `springBoot { buildInfo() }`로 바꾸고, leaf 버전 고정 후 archive-hygiene 삭제. developer-bootstrap은 `scripts/`로, auxiliary는 `jvm-test-suite`로 |
| BUILD-O3-6 | 권고 | O3: build-tools를 비움 | 완료 | Wave 3 W3-P16 (Wave 3 라운드 1 커밋): `config` 패키지를 `dev.caskeleton.buildlogic.config`로 이동(테스트 2개 포함), `includeBuild('build-tools')`·Dockerfile `COPY build-tools/`·build-logic.yml step 삭제, `src/build-tools` 삭제. 태스크는 `:app-bootstrap:verifyEnvKeys` 그대로(PASS) | - | JPA 폐기 후 `ConfigContractPlugin`을 build-logic으로 옮기고 `includeBuild('build-tools')` 삭제. task는 계속 `:app-bootstrap:verifyEnvKeys` |
| BUILD-바로할것-1b | Nit | runtime-membership 삭제 후 남은 주석 문구 | 남음 | `src/sample-portfolio/build.gradle:175`, `.github/workflows/ci-quality-gates.yml:55` "runtime-membership policy" | W5 | 두 주석에서 해당 문구 삭제 |
| BUILD-바로할것-4 | 권고 | `ca.strict-qualification`을 `strictTestLanes` requires + rejectSkipped로 (= O-8) | 완료 | `strictQualification` grep 0건, id 없음. 예: `src/app-bootstrap/build.gradle:61-68` 레인 `requires`+`rejectSkipped` | - | - |
@@ -783,7 +783,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| S1-#4 | Required | `NotificationDispatchService` 생성자 15개, record 필드별 재조립·실패 분류가 한 클래스에 (B-5 구조 원인) | 완료 | Wave 3 W3-P23 (Wave 3 라운드 3 커밋): 구조 변경(결함 아님, 기존 동작 테스트로 회귀 확인). record 재조립 4곳을 전이 메서드로: `application-notification/.../dispatch/DeliveryAttemptRecord.java:97`(`completed`)·`:135`(`closedBeforeSubmission`), `RecipientDeliveryRecord.java:73`(`advancedRoute`)·`:113`(`failedBeforeAttempt`)·`:156`(`afterAttempt`)·`:194`(`terminalStateFor`, 종료 상태 계산 1곳). catch 3분기는 `ProviderOutcomeClassifier.java:31`(`fromException`), 호출은 `NotificationDispatchService.java:332`. `DispatchOutcomeRecorder`는 `attempt.completed`·`current.afterAttempt` 두 줄. 새 테스트 `ProviderOutcomeClassifierTest`(3건) PASS, `NotificationDispatchServiceTest`·`DispatchOutcomeRecorderTest` 그대로 PASS. 남은 점: 생성자 인자는 여전히 15개(`NotificationDispatchService.java:82`, registry→renderer로 바뀐 것뿐). 인자는 모두 실제 포트·정책이라 수정 방향에 없는 묶음 record를 새로 만들지 않았다 | - | `DeliveryAttemptRecord.completed(result, at)`·`RecipientDeliveryRecord.advancedRoute(now)` 전이 메서드 추가, catch 분기는 `ProviderOutcomeClassifier` 정적 메서드로 분리 |
| S1-#5 | Required | fileserver retire 절차 3곳 복사, admin `forceDelete`는 content 없는 레코드를 DELETING에 남김 (C-4 관련) | 완료 | Wave 1–2 P4 (fcddab7e·Wave 2 커밋): `FileserverAdminServiceTest.forceDeletingAFileThatWasNeverPublishedRetiresItCompletely` FAIL(`expected: DELETED but was: DELETING`)→PASS. 세 호출부가 `src/application-fileserver/.../cleanup/FileRetirement.java:40` 하나를 쓴다: `DefaultFileLifecycleService.java:84`, `DefaultFileserverAdminService.java:167`, `DefaultUploadApplicationService.java:265`. `cleanup` 패키지에 둔 이유: 세 호출 패키지가 이미 cleanup을 의존하고 cleanup은 그들을 의존하지 않아 새 패키지 순환이 생기지 않는다 | - | `retire(FileRecord)` 하나로 합치고 content 없으면 DELETING→DELETED 전이를 세 호출부 모두에 적용 |
| S1-#6a | Required | fileserver 단일 구현 인터페이스 6개(fake 없음) | 완료 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): `1ec8f087`·`8e731b9f`. 구현 1개·대역 0인 `WriterLeaseCoordinator`·`TransferAdmissionController` 인터페이스를 지우고 `Default*`가 그 이름을 가짐, `FileStateMachine`은 S1-#13으로 삭제. 수정 방향과 다르게 남긴 3개와 이유: `FileLifecycleService`는 web-fileserver `FileLifecycleController`가 부르는 inbound 포트라 `INBOUND_ADAPTERS_DEPEND_ON_PORTS_NOT_APPLICATION_SERVICES`(architectureTest)가 구체 클래스 의존을 금지(없앴다가 architectureTest FAIL로 복원), `CleanupService`·`FileReconciliationService`는 composition `FileserverCleanupWorkerTest`·`FileserverStructuredLoggingTest`가 람다/익명 대역으로 구현(두 번째 구현 존재 — 현황표 근거 "fake 없음"이 틀림). `FileserverUseCaseContractDeviationTest.KNOWN_DEVIATIONS` 갱신 | - | 인터페이스 6개 삭제, `Default*`를 인터페이스 이름으로 개명 |
| S1-#6b | Required | fileserver 인바운드가 use-case 계약 밖(capability gate 미적용) | 남음 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): 사유: 결정 필요 — transport 연산 약 30개를 `CommandUseCase`/`QueryUseCase` + `@UseCaseCapability`로 바꾸면 `MUTATING_USE_CASES_DECLARE_REQUIRED_PERMISSION`(architectureTest) 때문에 쓰기 연산마다 `@RequiresPermission("file:…")`이 필요하고, 그 annotation은 web `RequiresPermissionAuthorizationManager`가 `AuthorizationPort`로 런타임에 강제한다. 즉 기존 `FileAccessPolicyPort`(역할·소유자 검사, C-8a) 위에 권한 게이트가 하나 더 생기고, 배포는 새 권한 이름을 부여해야 기존 업로드·다운로드가 계속 된다. (1) fileserver 연산에 method-security 권한을 추가할지(추가하면 권한 이름 체계), 아니면 (2) `RepositoryAccess`/권한 규칙에서 fileserver를 예외로 둘지를 정해야 한다(`docs/fileserver/design-deviations.md` §5가 ADR로 열어 둔 질문). 승인자: 저장소 소유자 결정 필요<br>결정 32(2026-09-28): 권한 추가로 결정 → 남음, P28 | W3 | transport가 부르는 연산을 `*UseCase` + `@UseCaseCapability`로 선언 |
| S1-#6b | Required | fileserver 인바운드가 use-case 계약 밖(capability gate 미적용) | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W3 `b06b4166`(결정 32). transport가 부르는 21개 연산을 `application-fileserver/.../port/in/*UseCase`(연산 하나씩, `CommandUseCase`/`QueryUseCase`) + `*Command`/`*Query`로 선언하고 구현 `*ApplicationUseCase`(upload·download·lifecycle·admin 패키지)에 `@UseCaseCapability`를 단다. 권한: `file:read`(describe·prepare·open·transfer·upload status), `file:upload`(create·append·finalize·cancel·single-request upload), `file:delete`, `file:copy`, `file:move`, `file:admin`(관리 plane 8개). `FileAccessPolicyPort`(tier·소유자·tenant)는 각 use case 안에서 그대로(결정 32 "둘 다"). `security.yml` `"[ROLE_FILE_READ]": file:read`, `"[ROLE_FILE_WRITE]": file:upload,file:delete,file:copy,file:move`, `"[ROLE_FILE_ADMIN]": file:admin`(fileserver 기본 tier 역할 이름을 key로 — 한 역할이 권한과 tier를 함께 준다), dev Keycloak realm에 같은 client role 3개(`ROLE_FILE_ADMIN`은 서비스 계정에 미부여), `docs/fileserver/design-deviations.md` §5·`configuration.md`·`infra/keycloak/README.md`. 조립은 `composition:fileserver-platform`의 `FileserverUploadUseCaseConfiguration`·`FileserverFileUseCaseConfiguration`·`FileserverAdminReadUseCaseConfiguration`·`FileserverAdminActionUseCaseConfiguration`(BOOT-007 8-bean 한도), adapter의 download/lifecycle/admin 서비스 조립 삭제. 테스트: `FileserverCompositionIntegrationTest.anUploadByATierWithoutTheUploadPermissionIsRefusedBeforeAnythingIsStaged`(실제 PG, `MethodSecurityConfig` 없이 FAIL 1건 → 포함 PASS; fileserver tier는 통과하지만 권한 매핑이 없는 역할 `ROLE_UNMAPPED_WRITER`), 같은 클래스 3건 PASS; `BlockingTransferExecutorSecurityContextTest.workOnTheTransferPoolSeesTheCallersAuthentication` FAIL(assertion) → PASS(전송 풀 작업에 요청 SecurityContext 전달 — 없으면 append·finalize·download stream이 권한 게이트에서 익명으로 거부됨). ArchUnit: fileserver access policy 패키지(`adapter.outbound.fileserver.platform.security`, IO 없음)를 D7 in-process driven outbound로 추가(`ApplicationBoundaryArchitectureTest.isInProcessDrivenOutbound`), `FileserverUseCaseContractDeviationTest` 동결 목록을 `DefaultCleanupService`·`DefaultFileReconciliationService`·`WriterLeaseCoordinator`로 축소(배경 작업은 caller identity가 없어 권한을 가질 수 없음). `:app-bootstrap:architectureTest` PASS. 수정 방향과 다른 점: 트랜잭션을 열지 않던 append·status·download read·incomplete-list는 `USE_CASE_CAPABILITY_MATCHES_TRANSACTION_PORT_BOUNDARY` 때문에 해당 경계(`inWrite`로 lease commit 감쌈 — coordinator 경계에 join, `inRead`로 조회)를 직접 연다; 여러 use case를 합성하는 single-request upload·operator cleanup은 `RepositoryAccess.NONE`(각 단계가 자기 경계를 연다) | - | transport가 부르는 연산을 `*UseCase` + `@UseCaseCapability`로 선언 |
| S1-#7 | Consider | 에러 코드마다 예외 서브클래스, 타입 분기는 몇 개뿐 | 완료 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): `6d6c69fe`. `FileserverException`을 구체 클래스로(`api/error/FileserverException.java:37` `of(code, message)`, `notReady(fileId, state)`). catch/instanceof로 타입 분기하는 5개(`FileNotFoundException`·`FileAlreadyExistsException`·`InvalidPathException`·`UploadOffsetMismatchException`·`AmbiguousCompletionException`)만 남기고 17개 삭제, 생성 지점 약 110곳을 `new FileserverException(message, context)`/`FileserverException.of(CODE, …)`로. 테스트의 타입 분기(`MvcUploadExecutorSaturationTest`, PG `aReleasedReservationCanNeverBeCommittedOrExtended`)는 `code()` 비교로. fileserver 5개 leaf `check`·PG lane 3개 PASS | - | base를 구체 클래스 + `of(code, …)`, 서브클래스는 catch로 타입 분기하는 5개만 남김 |
| S1-#8 | Consider | `PolicyTransactionPort` 계열이 호출 1곳용 | 해당 없음(코드 삭제) | 「제거된 코드」 `PolicyTransactionPort` 계열·`SpringPolicyTransactionPort`·`FileserverCompensationTransaction` 행. grep 0건 | - | - |
| S1-#9 | Consider | 같은 전략만 담은 레지스트리 2개 | 완료 | Wave 3 W3-P23 (Wave 3 라운드 3 커밋): `TemplateRendererRegistry`·`MapTemplateRendererRegistry`·`ThymeleafNotificationRenderer`, `ProviderEventProjectorRegistry`·`MapProviderEventProjectorRegistry`·`SesDeliveryProjector` 삭제(`bff135d6`). renderer 하나(`CanonicalNotificationRenderer`, channel은 `RenderCommand`에서; `NotificationPlatformProviderConfig.java:53`)와 projector 하나(`StandardDeliveryProjector`; `NotificationPlatformRegistriesConfig.java:38`)를 직접 주입. `ProviderEventProjector.providerId()`·`NotificationTemplateRenderer.channel()`, `AssembledProvider`/`AssembledPlatform`의 projector 슬롯, `ProviderCallbackAssembler.projector()`, `NO_PROJECTOR` 분기 삭제. 테스트 `NotificationProviderAssemblyTest.anSesHardBounceIsProjectedByTheSharedProjector` PASS. PG 테스트 `PostgreSqlNotificationBackgroundPassIntegrationTest.replayMarksAnEventWithNoProjectorFailed`는 그 분기가 없어져 삭제 | - | 레지스트리·`Map*Registry` 삭제, 구현체 직접 주입 |
@@ -801,7 +801,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| S1-#17a | Consider | objectstorage 식별자 클래스 6개·가드 2개 복사 | 완료 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): `7a21c6e7`. `ObjectId`·`ObjectReference`·`ObjectStageHandle`·`ObjectVersionToken`을 compact constructor + `toString`(redacted) record로(`identity/ObjectId.java:4`). `DirectTransferSessionId`·`PartReceiptToken`은 D-7a에서 이미 삭제. 가드는 `ObjectModelSupport.requireBoundedToken`(`model/ObjectModelSupport.java:9`) 하나, `ObjectRequestSupport.boundedToken` 삭제. `:application-objectstorage:check`, control record 골든 digest(`ObjectControlRecordCodecTest`) PASS | - | 식별자를 record + `toString` 재정의로, 가드는 하나로 |
| S1-#17b | Consider | legacy `application.storage` 네임스페이스 공존(Javadoc 모순) | 완료 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): `e8b6bae0`. sample에는 이미 canonical 포트 위의 `PublishPosterImageUseCase`(mode=publication)가 있어 legacy mode(`UploadPosterImageUseCase`·`LegacyPosterImageController`)를 지우고 local/test profile은 `mode: disabled`. `application.storage.ObjectStoragePort`·`StoredObject`와 legacy 어댑터 2개 삭제. `:sample-portfolio:check`·`systemTest` PASS | - | 「한 기능에 한 세대」: sample `UploadPosterImageUseCase`를 `application.objectstorage` 포트로 옮기고 legacy 포트·어댑터 2개 삭제 |
| S1-#18a | Consider | `V2` 접미사 타입 | 완료 | `6d27356e`: 멱등성 V2 → 무접미사, outbox V2 삭제. main의 `*V2*.java`는 sample 이벤트 스키마 버전 `PosterImageAttachmentReadyV2` 하나뿐 | - | - |
| S1-#18b | Consider | 포트·서비스 이름 규칙이 leaf마다 다름 | 남음 | Wave 3 W3-P24 (Wave 3 라운드 2 커밋): outbound 부분은 완료(`18ed5e7d`): `FileQuotaService`→`FileQuotaPort`, `FileMetadataStore`→`FileMetadataPort`, `UploadSessionStore`→`UploadSessionPort`, `*Gateway` 8개→`*Port`, 그 밖의 outbound 포트 9개에 `Port` 접미사(어댑터 구현 이름은 유지). 남은 inbound `*Service`→`*UseCase` 개명은 S1-#6b와 같은 결정에 묶인다 — 이름이 `UseCase`로 끝나고 `TransactionPort`를 쥔 클래스는 `ORCHESTRATION_ENTRYPOINTS_DECLARE_A_CAPABILITY`로 `@UseCaseCapability`가, 쓰기면 `@RequiresPermission`이 필요하다. 승인자: 저장소 소유자 결정 필요(S1-#6b와 함께)<br>결정 32(2026-09-28): 권한 추가로 결정 → 남음, P28 | W3 | 소유자 규칙대로 outbound `*Port`, inbound `*UseCase`로 기계적 개명 |
| S1-#18b | Consider | 포트·서비스 이름 규칙이 leaf마다 다름 | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W3 `b06b4166`: inbound `UploadApplicationService`·`DownloadApplicationService`·`FileLifecycleService`·`FileserverAdminService`·`SingleShotUploadService`·`FinalizeUploadService`와 `Default*` 구현을 `port.in/*UseCase` + `*ApplicationUseCase`로(notification의 `port.in` 규칙과 같음). 남긴 `*Service`는 transport가 부르지 않는 배경 작업 `CleanupService`·`FileReconciliationService`뿐 — 쓰기 use case는 `@RequiresPermission`이 필수인데 scheduler는 권한을 가질 caller가 없으므로 use case로 만들면 매 실행이 거부된다(`FileserverUseCaseContractDeviationTest` 주석) | - | 소유자 규칙대로 outbound `*Port`, inbound `*UseCase`로 기계적 개명 |
| S1-#19 | Nit | 이력 주석·inline FQN | 남음 | 재측정: 이력 문구("used to" 등) application-core 14·notification 23·fileserver 9·objectstorage 1줄, notification inline FQN 74줄 | W5 | 불변 조건 1~2줄만 남기고 이력은 git/ADR로, FQN은 import로 |
| S1-#20 | Nit | notification `dispatch/` 패키지에 여러 기능 | 남음 | `application-notification/.../platform/dispatch/` 46파일 3,855줄(제출·템플릿 게시·`ContactPoint*`·reconciliation 포함) | W5 | `submission/`, `dispatch/`, `reconciliation/`로 이동, `ContactPoint*`는 `contact/`로 |
| S1-lead-1 | 권고 | messaging 자체 outbox/inbox와 app-core outbox/inbox가 같은 패턴 3~4벌 | 완료 | app-core inbox 삭제(「제거된 코드」 same-store inbox 행), outbox V2 삭제. 남은 2벌(app outbox + vendored `messaging_outbox`)은 D2 결정(`docs/superpowers/specs/2026-09-25-capability-module-packaging-design.md:104` "messaging platform outbox는 vendored라 유지") | - | - |
@@ -821,14 +821,14 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| S2-#6a | Required | owner-lease claim 절차·`digestFields` 복사(inbox·polling) | 해당 없음(코드 삭제) | `PostgreSqlSameStoreInboxAdapter`·`PostgreSqlPollingDeliveryAdapter`·`PostgreSqlImmutableOutboxAppendAdapter` 삭제(「제거된 코드」 same-store inbox, JPA outbox V2 adapter 행). claim 절차는 멱등성 store에만 남음 | - | - |
| S2-#6c | Required | `capability_schema_registry` 확인 SQL 복사 | 완료 | Wave 3 W3-P23 (Wave 3 라운드 3 커밋): 추출 뒤 persistence-jpa 안의 `capability_schema_registry` 확인 SQL은 `PostgreSqlOwnerSafeIdempotencyStore.java:66` 하나뿐. notification 사본(`persistence-notification/.../NotificationSchemaActivation.java:29`)은 fileserver와 같은 처지(jpa edge 없는 capability leaf)가 되어 행의 "fileserver는 자기 사본 유지" 규칙을 그대로 따름. 두 capability의 공용화(support로)는 P18(idempotency 이동)·P24(fileserver)와 겹쳐 이번에 하지 않음 | - | persistence-jpa 안 2곳은 `CapabilitySchemaRequirement` record 하나로, fileserver는 jpa edge가 없어 자기 사본 유지(또는 support로) |
| S2-#7 | Required | JPA 플랫폼 라이브러리가 지원 표면 밖 | 완료 | 단일 구현 인터페이스 8개 grep 0(「제거된 코드」 work-claim·upsert 실행기, 단일 구현 인터페이스 행), 남은 라이브러리는 소유자 결정(Wave 3)대로 `adapter/outbound/persistence-jpa/README.md:61` 라이브러리 API 표에 명시. main 26.3k→20.0k줄 | - | - |
| S2-#8a | Consider | 조립 방식 3가지, 게이트 반복 | 남음 | `persistence-jpa/.../config/JpaAdapterComponentsConfig.java`(스캔 stereotype 16개), `notification/configuration/NotificationJpaPersistenceFacade.java`, `persistence-fileserver/.../FileserverJpaPersistenceConfig.java` + fileserver main `@ConditionalOnProperty` 10개, Mongo 6개<br>Wave 3 W3-P23: 미완 — 이유: 알림은 이미 feature config의 명시적 `@Bean` 한 방식(`NotificationJpaPersistenceFacade`, 이번에 이 leaf의 auto-configuration root로). 남은 대상 — `JpaAdapterComponentsConfig`의 stereotype 스캔(outbox·idempotency·lock 등), `persistence-fileserver`의 `@ComponentScan`+클래스별 `@ConditionalOnProperty`, Mongo — 은 동시에 도는 P18(outbox·멱등성 패키지 이동)·P24(fileserver)가 같은 파일을 옮기고 있어 충돌을 피해 손대지 않음. 통합 뒤 한 묶음으로 | W3 | feature config별 명시적 `@Bean` 한 방식으로, 클래스별 stereotype·조건 제거 |
| S2-#8a | Consider | 조립 방식 3가지, 게이트 반복 | 남음 | `persistence-jpa/.../config/JpaAdapterComponentsConfig.java`(스캔 stereotype 16개), `notification/configuration/NotificationJpaPersistenceFacade.java`, `persistence-fileserver/.../FileserverJpaPersistenceConfig.java` + fileserver main `@ConditionalOnProperty` 10개, Mongo 6개<br>Wave 3 W3-P23: 미완 — 이유: 알림은 이미 feature config의 명시적 `@Bean` 한 방식(`NotificationJpaPersistenceFacade`, 이번에 이 leaf의 auto-configuration root로). 남은 대상 — `JpaAdapterComponentsConfig`의 stereotype 스캔(outbox·idempotency·lock 등), `persistence-fileserver`의 `@ComponentScan`+클래스별 `@ConditionalOnProperty`, Mongo — 은 동시에 도는 P18(outbox·멱등성 패키지 이동)·P24(fileserver)가 같은 파일을 옮기고 있어 충돌을 피해 손대지 않음. 통합 뒤 한 묶음으로<br>Wave 3 W3-P28: 미완 — 한 것(P28 W3 `537310f9`): persistence-fileserver의 `@ComponentScan` + store 9개 클래스별 `@Repository`·`@ConditionalOnProperty`를 없애고, 조건 한 곳(`FileserverJpaPersistenceConfig`, 이 leaf의 `AutoConfiguration.imports` root) + 명시적 `@Bean` 설정 둘(`FileserverJpaMetadataStoreConfig`·`FileserverJpaQueueStoreConfig`)을 `@Import` — notification(`NotificationJpaPersistenceFacade`)과 같은 방식. web-fileserver 컨트롤러 4개·예외 처리기가 조립 root가 이미 거는 `app.fileserver-platform.enabled`를 반복하던 것 삭제(tus·draft12·admin은 자기 스위치만). 검증: persistence-fileserver·web-fileserver·composition fileserver `check`, PG lane `postgresqlFileserver{Metadata,Reclamation}IntegrationTest` 15·15, `FileserverCompositionIntegrationTest` 3 PASS. 남은 것: persistence-jpa `JpaAdapterComponentsConfig`의 8개 패키지 stereotype 스캔. 이유: 스캔이 있는 까닭이 이 leaf의 패키지 경계 목록(`JpaModuleBoundaryTest.PACKAGE_CATALOG`)이 `config`/`autoconfigure` → `audit`·`failure`·`liveevent`·`lock`·`operation`·`outbox` edge를 허용하지 않기 때문이다 — 명시적 `@Bean`으로 바꾸려면 (a) `autoconfigure`에 6개 edge를 추가하거나 (b) 패키지마다 capability 스위치를 반복하는 auto-configuration을 두어야 해서 leaf 내부 모듈 지도 결정이 먼저다(`JpaAdapterComponentsConfigTest`·`PersistenceEntityScanCoverageTest`가 스캔 계약을 고정). Mongo는 이미 자기 `AutoConfiguration.imports` 둘 + `@Bean` 방식이라 변경 없음(남은 것은 `MongoPlatformAutoConfiguration`의 bean별 조건 반복 19개) | W3 | feature config별 명시적 `@Bean` 한 방식으로, 클래스별 stereotype·조건 제거 |
| S2-#8b | Consider | "두 조립 루트가 `dev.caskeleton.adapter`를 스캔한다" 서술이 사실과 다름 | 남음 | `persistence-jpa/.../postgresql/idempotency/PostgreSqlOwnerSafeIdempotencyStore.java:53`, `src/test/.../CandidateAdapterCompositionTest.java:10-18`(현재 `CaSkeletonApplication`은 scan 제외식 없음, sample은 `SamplePortfolioApplication.java:31-40`처럼 좁게 스캔) | W5 | 잘못된 단락 삭제, 전제가 사라진 `CandidateAdapterCompositionTest` 삭제 또는 현재 조립 기준으로 재작성 |
| S2-#9a | Consider | 무관한 `inbox` 패키지 2개 | 해당 없음(코드 삭제) | `postgresql/inbox` 삭제(「제거된 코드」 same-store inbox 행) | - | - |
| S2-#9b | Consider | feature가 vendor별로 흩어짐 | 완료 | Wave 3 W3-P18 (Wave 3 라운드 2 커밋): 이동만 했다(`910ab7ab`). 새 패키지는 `persistence/outbox/{jpa(+entity),postgresql,h2}`, `persistence/idempotency/{jpa(+entity),postgresql}`다. JPA API surface는 `updateJpaApiSurface -PapproveJpaApiSurfaceChange`로 다시 승인했다. `JpaModuleBoundaryTest`에 autoconfigure→idempotency edge를 기록했다. `verifyJpaApiSurface`·`verifyJpaReadinessRegistry` PASS. | - | feature 기준 패키지(`outbox/{jpa,postgresql,h2}`, `idempotency/{jpa,postgresql}`)로 이동만 |
| S2-#10 | Consider | promotion/benchmark gate가 production classpath에 | 해당 없음(코드 삭제) | 「제거된 코드」 `experimental/next/*`, `MongoAdvancedPromotionGate`·`Evidence`, search·vector(benchmark·readiness gate 포함) 행. grep 0 | - | - |
| S2-#12 | Consider | Javadoc이 이력을 서술 | 남음 | 재측정: "used to/until now/never was/no longer" 포함 파일 jpa 25·mongo 36·fileserver 6 | W5 | 불변 조건 1~2줄만 남기고 이력은 git/ADR로 |
| S2-#13a | Nit | `JpaTransactionAutoConfiguration` 팩토리 2회 생성, `new JpaTransactionSettings(null ×9)` | 해당 없음(코드 삭제) | 「제거된 코드」 두 번째 엔진(`JpaTransactionAutoConfiguration`)·`JpaTransactionSettings` 행 | - | - |
| S2-#13b | Nit | port 구현 이름 규칙 7가지 | 남음 | `OutboxStoreAdapter`, `CanonicalOutboxAppendAdapter`, `Jpa*Store`(notification), `JdbcReconciliationJobStore`, `PostgreSqlOwnerSafeIdempotencyStore`, `SpringTransactionPort`, `LockRegistryDistributedLockAdapter`, `persistence-fileserver/.../JpaFileQuotaService`<br>Wave 3 W3-P23: 미완 — 알림 부분만 완료: `JpaNotificationSideEffectStore` → `JpaNotificationSideEffect`(`NotificationSideEffectPort`), 나머지 알림 구현은 이미 `<Tech><Port>`(`JdbcReconciliationJobStore` 포함). 이유: 행에 열거된 나머지(`OutboxStoreAdapter`, `CanonicalOutboxAppendAdapter`, `PostgreSqlOwnerSafeIdempotencyStore` — P18, `JpaFileQuotaService` — P24, `SpringTransactionPort`·`LockRegistryDistributedLockAdapter` — core)는 다른 묶음 소유이고 S1-#18b와 함께 기계적 개명으로 해야 함 | W3 | `<Tech><Port>` 규칙 하나로 개명(S1-#18b와 함께) |
| S2-#13b | Nit | port 구현 이름 규칙 7가지 | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W3 `2619cb18`: 규칙 `<Tech><포트 이름에서 Port를 뺀 것>` 하나로 24개 개명(테스트 클래스 이름 포함). persistence-fileserver `JpaFileMetadata`·`JpaFileQuota`·`JpaQuotaCommit`·`JpaQuotaReclaim`·`JpaUploadSession`(이미 규칙대로인 `JpaCleanupQueue`·`JpaContentReferenceLedger`·`JpaRecoveryQueue`·`JpaStagingUploadLocator`는 유지); fileserver adapter `LocalCleanupContent`·`LocalCopyContent`·`LocalOrphanScan`·`LocalReconciliationContent`·`LocalStorageHealth`·`LocalStorageUsage`·`LocalUploadContent`·`LocalUploadStorage`·`StructuredAdminAudit`·`StructuredFileserverAudit`·`RandomUploadIdentifier`; persistence-jpa core `SpringTransaction`·`JpaOutboxStore`·`JpaDurableOperationStore`·`PostgreSqlIdempotencyStore`·`LockRegistryDistributedLock`·`MeteredDistributedLock`·`DomainContextAuditContext`·`JpaLiveEventReplay`. 행에 적힌 `CanonicalOutboxAppendAdapter`는 P18에서 이미 삭제됨. 유지(이유): `LocalBlockingContentStore`(포트 3개를 구현하는 store 자체), `VerificationCoordinator`(verifier 파이프라인 합성 — 기술 어댑터가 아님), `RoleBased`/`UnenforcedFileAccessPolicy`(이미 `<정책><Port>`). 문서·README·CLAUDE.md의 단순 이름과 PG 통합 테스트의 bean 이름 문자열도 갱신. API surface 재승인(`updateJpaApiSurface -PapproveJpaApiSurfaceChange`, `updatePersistenceFileserverApiSurface -PapprovePersistenceFileserverApiSurfaceChange`, 개수 증가 없음). persistence-jpa·persistence-fileserver·fileserver·composition fileserver·idempotency·application-core·notification·persistence-notification `check`, `:app-bootstrap:architectureTest`·`test` PASS | - | `<Tech><Port>` 규칙 하나로 개명(S1-#18b와 함께) |
| S2-#14a | Nit | jpa CLAUDE.md의 "NoSQL은 미래 모듈"·MapStruct 절이 현실과 다름 | 남음 | `adapter/outbound/persistence-jpa/CLAUDE.md:17-19,202-206`(Mongo leaf 이미 존재), `:309-330` MapStruct 절(의존성 없음) | W5 | NoSQL 문장을 현재 leaf 기준으로 고치고 MapStruct 절 삭제 |
| S2-#14b | Nit | jpa API surface 파일에 옮겨간 타입 | 남음 | `docs/architecture/jpa-adopter-api-surface.txt:11` `...persistence.fileserver.FileserverSchemaActivation`(지금은 persistence-fileserver leaf) | W5 | 해당 줄 삭제(필요하면 fileserver 쪽 surface로) |
| S2-#14c | Nit | Mongo CLAUDE.md `MongoAdvancedProperties` 오기 | 완료 | `6d27356e`: 해당 이름 없음, `adapter/outbound/persistence-mongo/CLAUDE.md:146`이 "flags have no configuration property"로 갱신(`MongoAdvancedSettings`도 삭제) | - | - |
@@ -907,7 +907,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| S4-#17a | Nit | fileserver `*Config`/`*Configuration` 혼재, 클래스 이름의 버전 라벨 | 해당 없음(코드 삭제) | 루트 `*Config`(`FileserverR2Config` 등)와 `R2PublishedReferenceCodec` 삭제. 남은 fileserver 설정 8개는 모두 `*Configuration` | - | - |
| S4-#17b | Nit | notification `*ProviderProperties`는 `@ConfigurationProperties`가 아닌 파생 값 | 남음 | `Apns`/`Fcm`/`Ses`/`Smtp`/`Twilio`/`WebPushProviderProperties` 6개. 어느 것도 `@ConfigurationProperties`가 아님 | W5 | #3a 이후 남는 `Ses`·`SmtpProviderProperties`를 `*ProviderProfile`로 이름 변경 |
| S4-lead-1 | 권고 | 손으로 만든 canonical JSON codec이 3개 leaf에 있음 (= X1-8) | 해당 없음(코드 삭제) | fileserver 2벌·messaging `DeterministicEnvelopeWriter` 삭제. 남은 건 objectstorage `control/CanonicalJson{Reader,Writer}.java` 하나라 중복 아님 | - | - |
| S4-lead-2 | 권고 | 로컬 보안 파일시스템 primitive가 fileserver·objectstorage에 따로 있음 | 남음 | fileserver `platform/local/SafeFileChannelFactory.java:250`(`SecureDirectoryStream`)·`SecureDirectoryWalk.java`. objectstorage `filesystem/LocalObjectPathGuard.java:62-117`은 경로 검사 후 사용 방식(`rejectExistingLinks` → 생성). 방식과 검사가 다름. objectstorage는 `adapter-outbound-support` edge가 없음<br>Wave 3 W3-P24: 미완 — 이유: fileserver primitive 중 `SecureDirectoryWalk`는 JDK만 쓰지만 `SafeFileChannelFactory`는 `IOException`을 Fileserver 에러 코드로 바꾸는 번역을 품고 있어, support로 올리려면 에러 어휘를 떼어 내야 한다. 그리고 objectstorage `LocalObjectPathGuard`는 Path를 돌려주고 호출자(`LocalDevObjectDataStore`·`LocalDevObjectControlStore`·`LocalObjectStreamTransfer`, 약 520줄)가 `Files.*`로 여는 구조라, primitive를 쓰려면 이 I/O를 fd 기준(`SecureDirectoryStream`) 연산으로 다시 써야 한다. registry edge 추가만으로는 끝나지 않는 보안 민감 재작성이라 별도 묶음(권고 행)으로 남김 | W3 | fileserver 쪽 primitive를 `adapter:outbound:support`로 올리고, objectstorage에 support edge를 추가해서 `LocalObjectPathGuard`가 그것을 쓴다(registry 수정 포함) |
| S4-lead-2 | 권고 | 로컬 보안 파일시스템 primitive가 fileserver·objectstorage에 따로 있음 | 남음 | fileserver `platform/local/SafeFileChannelFactory.java:250`(`SecureDirectoryStream`)·`SecureDirectoryWalk.java`. objectstorage `filesystem/LocalObjectPathGuard.java:62-117`은 경로 검사 후 사용 방식(`rejectExistingLinks` → 생성). 방식과 검사가 다름. objectstorage는 `adapter-outbound-support` edge가 없음<br>Wave 3 W3-P24: 미완 — 이유: fileserver primitive 중 `SecureDirectoryWalk`는 JDK만 쓰지만 `SafeFileChannelFactory`는 `IOException`을 Fileserver 에러 코드로 바꾸는 번역을 품고 있어, support로 올리려면 에러 어휘를 떼어 내야 한다. 그리고 objectstorage `LocalObjectPathGuard`는 Path를 돌려주고 호출자(`LocalDevObjectDataStore`·`LocalDevObjectControlStore`·`LocalObjectStreamTransfer`, 약 520줄)가 `Files.*`로 여는 구조라, primitive를 쓰려면 이 I/O를 fd 기준(`SecureDirectoryStream`) 연산으로 다시 써야 한다. registry edge 추가만으로는 끝나지 않는 보안 민감 재작성이라 별도 묶음(권고 행)으로 남김<br>Wave 3 W3-P28: 미완 — 한 것(P28 W3 `da49df6c`): fileserver의 descriptor 기반 primitive를 `adapter/outbound/support/.../support/filesystem/SecureDirectoryWalk.java`(이동, public)·`SecureFileAccess.java`(신규: createNew·openForRead/Write·deleteRegularFile·readAttributes·isRegularFile·createParentDirectories)로 올리고, 거부를 에러 코드 없는 타입 있는 `IOException`(`SymbolicComponentException`·`PathEscapeException`·`NotRegularFileException`)으로. fileserver `SafeFileChannelFactory`는 위임 + `LocalStorageFailures` 번역만(P24 메모대로 번역 분리). 테스트: `SecureFileAccessTest` 8건(symlink leaf·symlink 디렉터리 component·`..` 탈출·create-only 충돌·symlink delete 거부·열린 뒤 디렉터리를 link로 바꾸는 race `aDirectorySwappedForALinkAfterItWasOpenedDoesNotRedirectTheOperation`), `SecureDirectoryWalkTest` 2건(support로 이동), `LocalStorageFailuresTest` 2건 FAIL→PASS(P28-new-1). fileserver·support `check`, PG lane `postgresqlFileserver{Migration,Metadata,Reclamation}IntegrationTest` 6·15·15 PASS. 남은 것: objectstorage `LocalObjectPathGuard`를 이 primitive로 바꾸는 재작성(과 objectstorage→support registry edge). 이유: local-dev provider의 쓰기는 "없거나 완전한" 게시를 위해 임시 파일을 `Files.createLink`(link(2))로 create-only 연결하는데, `SecureDirectoryStream`에는 linkat이 없고 `move`는 기존 대상을 덮어쓴다(renameat2 NOREPLACE 미노출). descriptor 기반으로 바꾸면 create-only 원자 게시를 잃거나(대상 선점 후 덮어쓰기 — 읽는 쪽이 빈/부분 객체를 볼 수 있음) native 호출이 필요해 설계 결정이 먼저다. 읽기·retire 경로만 바꾸면 쓰기 경로의 race가 남아 "한 primitive"가 되지 않으므로 이번 묶음에서는 손대지 않음(대상은 local-dev 전용 provider) | W3 | fileserver 쪽 primitive를 `adapter:outbound:support`로 올리고, objectstorage에 support edge를 추가해서 `LocalObjectPathGuard`가 그것을 쓴다(registry 수정 포함) |
| S4-lead-3 | 권고 | notification 자체 JDK HTTP gateway·SigV4 서명기 vs httpclient leaf·AWS SDK | 완료 | Wave 3 W3-P23 (Wave 3 라운드 3 커밋): 소유자 결정 17. `SesNotificationProviderAdapter.java:113` `client.sendEmail`(AWS SDK v2 `sesv2` 2.30.0, 카탈로그 `awsSdk`·SDK BOM, objectstorage와 같은 버전). client는 `SesClients.java`: SDK 재시도 끔(`:54` `AwsRetryStrategy.doNotRetry()`), 기본 자격 증명 체인 대신 던지는 provider, 설정 endpoint(라우팅 가드 통과)를 `endpointOverride`, Apache client(redirect 안 따라감). 자격 증명은 기존 계약 유지(설정 `access-key-id` + `ProviderCredentialManager`의 프로필·세대별 secret)로 요청마다 `AwsRequestOverrideConfiguration`에 실음. `JdkNotificationHttpGateway`·`NotificationHttpGateway/Request/Response/TransportException`·`AwsSignatureV4Signer`·`notificationHttpGateway` bean 삭제. SNS 인증서 fetch는 callback 설정 안의 redirect 없음·64KiB 상한 JDK 요청. 검증: SDK client를 로컬 HTTP 가짜(`ProviderFaultHarness`)에 `endpointOverride`로 붙인 계약 테스트 `SesNotificationProviderAdapterTest` 17건(수락·거절·응답 유실=AMBIGUOUS·throttle·첨부 raw MIME·프로필별 서명·경로 `/v2/email/outbound-emails`) + 새 `theSdkRetriesNothingSoAServerErrorIsOneRequest`·`aMessageRejectedAnswerIsAPermanentRejection` PASS, `CrossProviderContractSuiteTest` 5건 PASS. env 키·설정 키 변경 없음 | - | 결정(2026-09-25): AWS SDK(sesv2)로 교체, 자체 JDK gateway·SigV4 서명기 삭제 |
| S4-lead-4a | 권고 | adapter `LocalJsonSchemaRegistry` vs vendored `messaging-schema-json` | 해당 없음(코드 삭제) | `LocalJsonSchemaRegistry` grep 0건. 「제거된 코드」 표 123행 | - | - |
| S4-lead-4b | 권고 | `adapter:outbound:messaging-kafka`(R0 seam) vs vendored `messaging/messaging-kafka` | 완료 | Wave 3 W3-P18 (Wave 3 라운드 2 커밋): **삭제:** `core/MessageBroker` 계열(MessageBroker, MessagePublisher, OutboundMessage, OutboundMessagePublisher, DisabledMessagePublisher)과 `OutboxEnvelopeJson`, `adapter:outbound:messaging-kafka`의 Java 코드 전부.<br>**relay 경로:** relay는 claim한 row의 `ValidatedIntegrationEvent`를 bridge로만 보낸다(`OutboxMessagePublishAdapter(IntegrationEventPublishPort)`, `src/adapter/outbound/messaging/src/main/java/dev/caskeleton/adapter/outbound/messaging/outbox/OutboxMessagePublishAdapter.java:23`).<br>**leaf를 남긴 이유:** 계획은 leaf 삭제였다. 대신 bridge+starter-kafka를 싣는 코드 없는 capability 묶음으로 남겼다. 한 줄 선택이 유지되고, bridge leaf는 broker 중립으로 남는다.<br>**테스트:** `KafkaCapabilityActivationTest` PASS. | - | legacy `OutboxEvent`에 canonical metadata를 채우는 migration 후 relay를 bridge로 바꾸고 `adapter:outbound:messaging-kafka`와 `core/MessageBroker` 계열 삭제 |
@@ -982,7 +982,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
| S6-#7 | Required | sample이 bootstrap 인프라를 복사, 이미 갈라짐 | 완료 | Wave 3 W3-P18 (Wave 3 라운드 2 커밋): **새 leaf `composition:service-runtime`**(`dev.caskeleton.composition.runtime`, edge application-core, shared-contract, adapter-outbound-support, adapter-outbound-identifier):<br>- 원본을 app-bootstrap에서 옮겼다: `tracing`(TracingConfig 외 5), `metrics`(MetricsContractConfig+filter 2), `context`(DomainContextConfig/Settings), `logging`(PseudonymizationConfig, PrivacySettings), `management/security`(ManagementSecurityConfig).<br>- 모두 이 모듈의 `AutoConfiguration.imports`로, sampling bridge는 `spring.factories`로 등록한다.<br>- app-bootstrap과 sample이 `runtimeOnly project(':composition:service-runtime')`를 쓴다.<br>**sample:** 복사본 10개와 `spring.factories`를 삭제했다. 원본을 쓰므로 `staging=0.10` 분기도 사라졌다.<br>**sample actuator chain:** 복사본이 아니라 공개 데모라는 샘플만의 결정이라 남겼다. bean 이름을 `actuatorSecurityFilterChain`으로 바꿔 공용 chain이 물러나게 했다(`ConditionalOnMissingBean(name)`).<br>**테스트:** `ServiceRuntimeRegistrationTest` 4개(신규), 옮긴 테스트 9 클래스 — `:composition:service-runtime:test` 86 PASS. `ActuatorSecurityHttpTest`, `DefaultCompositionBootTest`, `StartupOrderContractTest`, `ConfigurationNamespaceContractTest` 갱신 후 PASS. | - | 소유자 결정대로 멱등성 executor·outbox relay 조립을 `composition:*` 모듈로 옮겨 두 root가 함께 쓰고, tracing·logging·metrics·context·management는 공용 library leaf로(registry edge 추가), staging 분기 삭제 |
| S6-#8 | Required | sample root가 다른 leaf 패키지를 넓게 scan | 완료 | Wave 3 W3-P25 (Wave 3 라운드 2 커밋): `SamplePortfolioApplication`: `@ComponentScan("dev.caskeleton.sample")`·`@ConfigurationPropertiesScan("dev.caskeleton.sample")`, 제외는 `WebSecurityAutoConfiguration` 하나(`SamplePortfolioApplication.java:31-32`). web·objectstorage는 각 auto-config로. `SamplePublicAccessSecurityConfigTest.sampleCompositionRootExcludesOnlyTheWebSecurityRoot`·`sampleCompositionRootScansOnlyTheSamplePackage`(옛 exclude-filter 단언 대체). sample `test`·`integrationTest` 51·`systemTest` 3·`webSystemTest` 5 PASS | - | scan을 `dev.caskeleton.sample`로 좁히고 web·identifier·objectstorage는 각 leaf auto-config로 받기(보안 설정 2개는 exclude/property로 끔) |
| S6-#9 | Required | sample `application.yml` 중 읽는 코드 없는 블록 | 남음 | 326줄 중 약 101줄: `src/sample-portfolio/src/main/resources/application.yml:150-177`(capabilities.cache), `:180-181`(bootstrap), `:210-226`(logging), `:255-279`(app.cache.redis), `:280-283`(messaging), `:284-288`(notification), `:289-308`(outbound.http). sample classpath에 해당 binder 없음(`src/sample-portfolio/build.gradle:48-83`) | W5 | 해당 블록 삭제 |
| S6-#10a | Consider | sample 대표 예제가 poster-image에 묻힘, 패키지 종류별·기능별 혼재 | 남음 | poster 관련 main 약 5.9k줄 vs WorkLog 약 2.2k줄. `SP/application/`에 `command/query/event/port/exception`과 `poster/posterimage/worklog` 공존<br>Wave 3 W3-P25: 미완 — 이유: 기능별 패키지 재배치와 poster-image 별도 sample 모듈 분리는 sample 전체 파일 이동(+`modules.json` leaf 등록)이라, 동시에 도는 P18(sample outbox·멱등성·`PosterEventPublisher`)·P24(object storage)와 같은 파일을 대량으로 겹친다. 통합 뒤 단독 작업으로 넘김. 이번 묶음에서 legacy 모드 삭제(S6-#10b)로 poster 표면은 줄었다 | W3 | 기능별 패키지로 정리, poster-image는 objectstorage 검증용 별도 sample 모듈로 이동 |
| S6-#10a | Consider | sample 대표 예제가 poster-image에 묻힘, 패키지 종류별·기능별 혼재 | 남음 | poster 관련 main 약 5.9k줄 vs WorkLog 약 2.2k줄. `SP/application/`에 `command/query/event/port/exception`과 `poster/posterimage/worklog` 공존<br>Wave 3 W3-P25: 미완 — 이유: 기능별 패키지 재배치와 poster-image 별도 sample 모듈 분리는 sample 전체 파일 이동(+`modules.json` leaf 등록)이라, 동시에 도는 P18(sample outbox·멱등성·`PosterEventPublisher`)·P24(object storage)와 같은 파일을 대량으로 겹친다. 통합 뒤 단독 작업으로 넘김. 이번 묶음에서 legacy 모드 삭제(S6-#10b)로 poster 표면은 줄었다<br>Wave 3 W3-P28: 미완 — / P28 에이전트가 세션 재시작으로 중단(미커밋) — P30으로 | W3 | 기능별 패키지로 정리, poster-image는 objectstorage 검증용 별도 sample 모듈로 이동 |
| S6-#10b | Consider | poster-image legacy API 모드 | 해당 없음(코드 삭제) | Wave 3 W3-P25 (Wave 3 라운드 2 커밋): `d54909c4`: `LegacyPosterImageController`·`UploadPosterImageUseCase`·`UploadPosterImageCommand`·`LegacyPosterImageAttachment`·`PosterImageApiConfig`·`PosterImageApiSettings`(LEGACY 모드)·`Poster.attachImage`·`Poster.imageKey()`·dual-read `rehydrate` 삭제. `PosterEntity`는 `image_key`를 매핑하지 않고, CAS attach가 `image_key = NULL`로 pre-V8 행을 정규 경로로 받는다(`PosterImageAttachmentCasRepository.java:32`). `PosterRepositoryAdapterIntegrationTest.aPreV8RawKeyRowReadsBackWithoutAnImage`·`canonicalAttachClearsAPreV8RawKeyOnTheSameRow` PASS(삭제에 따른 새 동작이라 FAIL 재현 없음). `PosterResponse.imageKey` wire 이름은 유지하고 published reference를 싣는다. sample `local` 프로필·systemTest yml의 `mode: legacy`·`object-storage.legacy` 블록 삭제 | - | legacy 모드와 전용 타입 삭제 |
| S6-#10c | Consider | 상태 머신이 application 계층, use case 생성자 14개 | 완료(부분 수정 방향 변경) | Wave 3 W3-P25 (Wave 3 라운드 2 커밋): `PublishPosterImageUseCase` 설정값 인자(destination·epoch·intentTtl·handoffLease)를 `PosterImagePublicationParameters` record 하나로(생성자 14→11, 양수 검증). 상태 머신(`PosterImageUploadIntent`)의 domain 이동은 하지 않음: 필드가 `application-objectstorage`·`application-core` 값 타입(`ObjectOperationKey`, `ObjectStageHandle`, `ObjectVersionToken`, `ObjectContentIdentity`, `ObjectMediaType`, `RequestFingerprint`)이라 domain으로 옮기면 domain→application 의존이 생긴다(HARD-STOP 1과 같은 방향 위반). sample `test` PASS | - | 상태 머신을 domain으로, 설정값 인자(TTL·lease·epoch·destination)를 record 하나로 |
| S6-#10d | Consider | `WorkLogSortField`(domain)가 HTTP 이름과 persistence 이름을 같이 앎 | 완료 | Wave 3 W3-P25 (Wave 3 라운드 2 커밋): `WorkLogSortField`·`PosterSortField`는 논리 필드만. 요청 이름은 web mapper `SORT_FIELDS`(`WorkLogWebMapper.java:24`, `PosterWebMapper.java:19`), persistence 속성은 `sortProperty`(`WorkLogPersistenceMapper.java:57`, `PosterPersistenceMapper.java:38`). 계약 테스트·integration 51 PASS | - | 요청 이름 매핑은 web mapper로, persistence 이름은 persistence mapper로; domain enum은 논리 필드만 |
@@ -1199,16 +1199,16 @@ Wave 1–2 구현 묶음(`P1`–`P13`)이 작업 중 찾은 결함과 통합 검
| P16-new-6 | 발견 | persistence-fileserver 공개 타입의 adopter import를 보는 검사가 없어짐(예전 정규식 테스트가 접두어 전체를 봤음). | 완료 | Wave 3 W3-P27 (Wave 3 라운드 3 커밋): `976c175f`: persistence-fileserver에 `ca.api-surface`, 공개 타입 24개 기준선과 adopter 목록(`FileserverSchemaActivation`) 승인 — 목록에서 빼면 composition import로 `verifyPersistenceFileserverApiSurface` 실패 | - | persistence-fileserver에 `ca.api-surface` 적용 — 빌드 잔여 묶음 |
| P16-new-7 | 발견 | `docs/study/postgresql-jpa-walkthrough.ko.md` §15.6 등이 삭제된 JPA evidence manifest를 설명. | 남음 | Wave 3 P16 결과 파일 | W5 | 결정 6: 현재 코드 기준으로 갱신 |
| P24-new-1 | 발견 | S3 응답 bridge가 source 무효화 전에 결과를 게시하고, 실패 원인 기록 전에 취소해 테스트가 간헐 실패(P14-new-2·P16-new-4의 원인). | 완료 | Wave 3 P24: 순서 수정, bridge 테스트 40회 반복 통과 | - | - |
| P24-new-2 | 발견 | legacy upload 삭제 뒤 `PosterEventPublisher.publishImageAttached`·`PosterImageAttached` 호출자 0. | 남음 | Wave 3 P24 결과 파일 | W3 | P18 통합 뒤 삭제(같은 파일) |
| P24-new-3 | 발견 | `FileVerifier`가 application-fileserver에 있지만 fileserver adapter만 쓴다. | 남음 | Wave 3 P24 결과 파일 | W3 | adapter로 이동 |
| P24-new-2 | 발견 | legacy upload 삭제 뒤 `PosterEventPublisher.publishImageAttached`·`PosterImageAttached` 호출자 0. | 해당 없음(코드 삭제) | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 D `a49342e2`: `PosterEventPublisher.publishImageAttached`, `domain/poster/PosterImageAttached`, `PosterImageAttachedPayload`, `PortfolioEventContracts.POSTER_IMAGE_ATTACHED`와 그 bean, `contracts/messaging/poster.image-attached/v1.schema.json` 삭제. `git grep "ImageAttached\b"` 0건. `:sample-portfolio:test` PASS | - | P18 통합 뒤 삭제(같은 파일) |
| P24-new-3 | 발견 | `FileVerifier`가 application-fileserver에 있지만 fileserver adapter만 쓴다. | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W3 `12f0b183`: `FileVerifier`를 `application-fileserver/.../api/security`에서 `adapter/outbound/fileserver/.../platform/verification/FileVerifier.java`로 이동(사용처는 그 패키지의 verifier 5개·`VerificationCoordinator`·`FileserverVerificationConfiguration`뿐). application은 `FileVerificationPort`만 본다 | - | adapter로 이동 |
| P25-new-1 | 발견 | `TomcatWebSocketAbuseIT` shutdown 테스트가 부하 중 `20.0006s < 20s`로 한 번 실패, 재실행 4회 통과(타이밍 의존). | 남음 | Wave 3 P25 결과 파일 | W4 | 시간 경계 단언을 결정적 신호로 |
| P25-new-2 | 발견 | legacy upload 삭제 뒤 `PosterEventPublisher.publishImageAttached`·`PosterImageAttached` 호출자 0(= P24-new-2). | 남음 | Wave 3 P25 결과 파일 | W3 | P24-new-2와 함께(P28) |
| P25-new-2 | 발견 | legacy upload 삭제 뒤 `PosterEventPublisher.publishImageAttached`·`PosterImageAttached` 호출자 0(= P24-new-2). | 해당 없음(코드 삭제) | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P24-new-2와 같음(`a49342e2`) | - | P24-new-2와 함께(P28) |
| P25-new-3 | 발견 | sample `local` 프로필이 기본값과 같은 `object-storage.enabled=false`만 남김. | 남음 | Wave 3 P25 결과 파일 | W5 | 불필요한 설정 삭제 또는 이유 주석 |
| P18-new-1 | 발견 | messaging outbox의 손으로 쓴 header JSON reader가 `\\`로 끝나는 값에서 다음 header를 삼켰다. | 완료 | Wave 3 P18: PostgreSQL `jsonb_object`/`jsonb_each_text`, `OutboxPostgresIT.aHeaderValueEndingInABackslashRoundTripsWithoutSwallowingTheNextHeader` FAIL→PASS | - | - |
| P18-new-2 | 발견 | root `CLAUDE.md`가 legacy outbox/realtime seam이 `src/messaging/CLAUDE.md`에 기록돼 있다고 적음(cutover 끝남). | 완료 | Wave 3 라운드 2 통합: `CLAUDE.md` Module families 문장 수정 | - | - |
| P18-new-3 | 발견 | actuator security chain이 auto-configuration이 되어, web security를 직접 켜지 않은 조립은 Boot 기본 actuator chain을 받는다(설계 노트). | 남음 | Wave 3 P18 결과 파일, `composition/service-runtime/.../ManagementSecurityConfig.java` | W5 | service-runtime README에 켜짐 조건 명시 |
| P23-new-1 | 발견 | fileserver migration V1–V5가 `applied-migrations.sha256`에 고정돼 있지 않다. | 남음 | Wave 3 P23 결과 파일 | W3 | `AppliedMigrationImmutabilityTest`에 fileserver 경로 추가 + 5줄. P28 |
| P23-new-2 | 발견 | profile마다 만드는 SES SDK client를 닫지 않는다(기동 때 한 번이라 유한). | 남음 | Wave 3 P23 결과 파일 | W3 | provider 종료 시 close. P28 |
| P23-new-1 | 발견 | fileserver migration V1–V5가 `applied-migrations.sha256`에 고정돼 있지 않다. | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W2 `b13cf08b`: `AppliedMigrationImmutabilityTest.MIGRATION_ROOTS`에 `../persistence-fileserver/src/main/resources/db/migration` 추가 → `everyVersionedMigrationIsPinned` FAIL(`AssertionError at AppliedMigrationImmutabilityTest.java:72`, `jpa/fileserver/V1..V5` 미고정) → `applied-migrations.sha256`에 5줄 추가 후 PASS. `persistence-jpa/build.gradle` test `inputs.dir(...fileserver migration)` 추가. 새 migration 버전은 추가하지 않음 | - | `AppliedMigrationImmutabilityTest`에 fileserver 경로 추가 + 5줄. P28 |
| P23-new-2 | 발견 | profile마다 만드는 SES SDK client를 닫지 않는다(기동 때 한 번이라 유한). | 완료 | Wave 3 W3-P28 (Wave 3 라운드 3 커밋): P28 W2 `b13cf08b`: `ProviderRuntimeRegistryTest.closingTheRegistryClosesTheAdapterOfEveryRegisteredGeneration` FAIL(컴파일 실패 `cannot find symbol registry.close()`) → PASS; `SesNotificationProviderAdapterTest.closingTheAdapterClosesItsSdkClient` PASS. `SesNotificationProviderAdapter implements AutoCloseable`(`close()`→`client.close()`), `ProviderRuntime.release()`, `ProviderRuntimeRegistry implements AutoCloseable`(현재·drain 세대 모두 release) — `providerRuntimeRegistry` `@Bean`의 추론 destroy method로 context 종료 때 호출. `:adapter:outbound:notification:check` PASS | - | provider 종료 시 close. P28 |
| P23-new-3 | 발견 | `app-bootstrap/build.gradle` 알림 선택 줄 주석이 persistence-jpa 줄을 함께 풀라고 함(composition이 직접 가져옴). | 완료 | Wave 3 라운드 3 통합: 주석 수정 | - | - |
| ORCH-new-2 | 발견 | `NotificationPayloadAtRestContractTest`가 저장소 소스·migration을 읽지만 test inputs를 선언하지 않아(`notification/build.gradle:98`이 필요 없다고 주장) 파일이 옮겨져도 up-to-date로 건너뜀. P23 worktree에서 통과, main 통합에서 실패(옛 `persistence-jpa` 경로·`build/` 경합 walk). | 남음 | 경로와 walk 범위는 통합 때 수정(`src/main/java`만) | W4 | 읽는 파일을 test `inputs`로 선언(CLAUDE.md build-logic 규칙) |
| ORCH-new-3 | 발견 | `web-advanced` `WebStreamingSoakIT.concurrent arrivals never exceed the node's ceiling`가 부하 중 `expected: 1000 but was: 1001`로 실패, 단독 3회 통과 — 상한을 1 넘는 실제 경합일 수 있다. | 완료 | Wave 3 W3-P19 (Wave 3 라운드 3 커밋): 커밋 `c3380270`. 원인: `WebStreamRegistry.register`가 `compute()` 안에서 `sessions.size()`를 읽음 — compute는 한 bin만 잠그고 크기 카운터는 잠금 해제 뒤 갱신되므로 다른 bin의 두 도착이 모두 999를 보고 삽입(실제 경합, 테스트 타이밍 문제 아님: 먼저 단언하는 `activeStreams()`가 1001). 수정: AtomicInteger CAS로 슬롯 선예약 + `putIfAbsent`, 중복·deregister는 슬롯 반환. 테스트 `stream/WebStreamRegistryAdmissionTest`(경쟁 도착 200라운드, 슬롯 반환 2건). FAIL 근거: P27 통합 ci의 `expected: 1000 but was: 1001` — 로컬에서는 수정 전 soak 형태 6회 + 200라운드로도 재현되지 않았다(창이 `addCount` 한 구간뿐). 수정 후 `WebStreamingSoakIT`+새 테스트 3회 반복 통과 | - | 재현(반복·부하)으로 경합 여부 판정, 경합이면 admission 카운터 수정. P19 |
@@ -1217,8 +1217,10 @@ Wave 1–2 구현 묶음(`P1`–`P13`)이 작업 중 찾은 결함과 통합 검
| P21-new-3 | 발견 | `src/messaging/CLAUDE.md`가 `MessagingPublicSurfaceContractTest`를 인용 — 테스트는 app-bootstrap에 있다(P21은 없다고 보고). 통합 때 이 테스트가 P21 변경(reactive facade 삭제, leaf 병합, starter-kafka 공개 consumer seam)을 반영하지 못해 실패 → 기대값 수정, starter-kafka에 `api kafka-clients` 선언. | 남음 | Wave 3 라운드 3 통합 | W5 | messaging CLAUDE.md의 테스트 위치 문구를 app-bootstrap 경로로 |
| P22-new-1 | 발견 | bootstrap `SecretSourceValidator`가 persistence-jpa의 모듈 스위치를 읽어 `APP_DATASOURCE_PASSWORD` 필요 여부를 판정(모듈 지식이 bootstrap에). | 남음 | Wave 3 P22 결과 파일 | W3 | Redis처럼 persistence-jpa가 secret 요구를 기여. P20 |
| P22-new-2 | 발견 | `infra/redis-sdk/acl/application.acl`·`all-accounts.acl`이 pub/sub 삭제 뒤에도 `+@pubsub`·`&prod:*`를 준다(최소 권한 위반, fixture). | 남음 | Wave 3 P22 결과 파일 | W3 | ACL fixture에서 제거 후 topology lane 재실행. P20 |
| P22-new-3 | 발견 | redis-sdk 공개 API가 runtime 타입을 노출하면서 runtime을 `implementation`으로만 의존. `ca.spring-library`에 `api` 구성이 없어 한 줄로 못 고침. | 남음 | Wave 3 P22 결과 파일, 통합 때 시도 | W3 | 컨벤션에 `java-library` 적용 또는 공개 표면에서 runtime 타입 제거. P29 |
| P22-new-3 | 발견 | redis-sdk 공개 API가 runtime 타입을 노출하면서 runtime을 `implementation`으로만 의존. `ca.spring-library`에 `api` 구성이 없어 한 줄로 못 고침. | 완료 | Wave 3 W3-P29 (Wave 3 라운드 3 커밋): `3967c9ef`. redis-sdk만 `java-library` + `api project(':adapter:outbound:redis-runtime')` / 통합 검증 통과(redis-sdk java-library + api redis-runtime) | - | 컨벤션에 `java-library` 적용 또는 공개 표면에서 runtime 타입 제거. P29 |
| ORCH-new-4 | 발견 | redis-sdk `RedisSdkModuleBoundaryTest`·`RedisSupportMatrixTest`가 옛 split package(`redis-runtime/.../redis/sdk`)를 훑음 — P22 worktree에서 통과, main 통합에서 `NoSuchFileException`(ORCH-new-2와 같은 유형: 저장소 파일을 읽지만 test inputs 미선언). | 남음 | 경로는 통합 때 수정(`redis-sdk` 하나) | W4 | 읽는 파일을 test `inputs`로 선언 |
| P19-new-1 | 발견 | notification `platform.api.TenantId`가 비어 있지 않음·100자 이하만 검사 — web·GraphQL이 거부하는 tenant(공백·줄바꿈·경로 문자)를 받는다. 강화하면 이미 저장된 행을 못 읽을 수 있다. | 남음 | Wave 3 P19 결과 파일 | W3 | 읽기는 관대하게, 새 쓰기만 공용 `TenantId` 문법으로. P30 |
| P19-new-2 | 발견 | redis-session 인증 경로(`PrimitiveSessionSecurityContextRepository.java:116`)가 세션에 tenant를 저장하지 않아 JWT 경로와 달리 principal에 tenant가 없다. | 남음 | Wave 3 P19 결과 파일 | W3 | 세션 저장·복원에 tenant 포함. P30 |
| P19-new-3 | 발견 | `docs/study/postgresql-jpa-walkthrough.ko.md:818`이 삭제된 `JpaStreamScope`를 설명. | 남음 | Wave 3 P19 결과 파일 | W5 | 결정 6: 현재 코드 기준으로 |
| P28-new-1 | 발견 | fileserver `AtomicMoveContentPublisher`·`ContentPublishVerification`이 보안 walk를 직접 불러 거부를 번역하지 않고 내보냈다. | 완료 | Wave 3 P28 `da49df6c` | - | - |
| ORCH-new-5 | 발견 | P18의 V19가 persistence-jpa `postgresqlMigrationIntegrationTest` 기대값(버전 목록·제약 목록, legacy 미발행 행 삽입)에 반영되지 않았다 — P18 게이트에 이 lane이 없었다. messaging `OutboxPostgresIT`는 P29의 jvm-test-suite 전환 뒤 main 리소스가 jar로 와서 migration 목록을 `File`로 못 읽었다. | 완료 | Wave 3 라운드 3 통합: V19·제약 추가, legacy 행은 PUBLISHED로(V19가 미발행 legacy 행을 거부하는 것이 의도), jar/디렉터리 모두 읽는 목록 조회 — `integrationCheck` 통과 | - | - |
+11 -11
View File
@@ -318,12 +318,12 @@ application-core:
+ inTransaction(TransactionRequest, Supplier) : TransactionResult<T>
adapter:
SpringTransactionPort implements PolicyTransactionPort
SpringTransaction implements PolicyTransactionPort
├─ 레거시 4모드 → 미리 만들어 둔 TransactionTemplate 3개
└─ inTransaction → SpringPolicyTransactionPort (package-private 위임체)
```
### 3.1 `SpringTransactionPort` — 레거시 4-mode
### 3.1 `SpringTransaction` — 레거시 4-mode
모드별로 `TransactionTemplate`을 **생성 시점에 하나씩 미리 만들어 둔다.**
@@ -1627,7 +1627,7 @@ provision하므로 DDL 체크를 건너뛴다.
`JdbcLockRegistry(lockRepository, settings.leaseTtl())` — SI 7.0 이후 기본 TTL은 repository
setter가 아니라 **registry 생성자**에서 설정한다.
`LockRegistryDistributedLockAdapter`의 계약:
`LockRegistryDistributedLock`의 계약:
- **D4 — transaction-commit ordering invariant.** 이 어댑터는 트랜잭션 경계를 관리하지 않는다.
호출자는 보호된 트랜잭션이 **커밋된 뒤에만** 핸들을 release해야 한다. 커밋 전에 release하면
@@ -1670,7 +1670,7 @@ setter가 아니라 **registry 생성자**에서 설정한다.
6. **Spring stereotype 없음** — 두 composition root가 `dev.caskeleton.adapter`를
component-scan하므로 `@Repository`를 붙이면 선택하지 않은 배포에서도 빈이 된다.
### 10.1 `PostgreSqlOwnerSafeIdempotencyStore`
### 10.1 `PostgreSqlIdempotencyStore`
`IdempotencyStorePort` 구현. 상태:
`CLAIMED → EXECUTING → COMPLETED | FAILED_RETRYABLE | ABANDONED`.
@@ -2442,7 +2442,7 @@ audited 엔티티에 대한 `update`가 audit 컬럼을 set하는지 확인한
> 통과와 실패 케이스가 한 번도 실행된 적 없는 아키텍처 규칙은 **모양을 알 수 없는 규칙**이고,
> production 그래프에는 오늘 audited bulk update가 없어서 그래프만으로는 통과만 보여줄 수 있다.
`DomainContextAuditContextPort`는 actor를 `DomainContextPropagator`에서 읽고, 빈/blank면
`DomainContextAuditContext`는 actor를 `DomainContextPropagator`에서 읽고, 빈/blank면
`"system"`으로 떨어뜨린다 — scheduler / Flyway / anonymous 경로에서도 NOT NULL
`created_by`/`updated_by`를 항상 만족시키려고. `ACTOR_KEY`를 상수로 격리해서 canonical actor
key가 바뀌어도 **정확히 한 클래스**만 손대면 된다.
@@ -2690,8 +2690,8 @@ app.fileserver-platform.enabled && transaction-provider != none
> 정규식으로 제외하고, 그 제외는 **옳다**: 그게 optional capability를 optional하게 만든다.
>
> 빠진 건 나머지 절반이다. 이 leaf의 여덟 클래스가 scanned component로 쓰여 있는데 —
> `SpringTransactionPort`, `PersistenceExceptionTranslator`, `StandardSqlStateErrorMapping`,
> `DomainContextAuditContextPort`, idempotency store와 reaper, outbox store와 reaper —
> `SpringTransaction`, `PersistenceExceptionTranslator`, `StandardSqlStateErrorMapping`,
> `DomainContextAuditContext`, idempotency store와 reaper, outbox store와 reaper —
> 넓은 scan이 그들에게 도달하기를 멈추자 **아무것도 도달하지 않았다.** `@Component`와
> `@Repository`가 붙어 있고 **돌고 있는 어떤 애플리케이션에서도 빈이 아니었다**:
> 특히 `TransactionPort`는 구현이 전혀 없어서, **트랜잭션을 여는 모든 유스케이스가 열
@@ -3296,12 +3296,12 @@ grep -rnE "[0-9]+ ?(개 ?)?-?(leaf|leaves)" docs | grep -v "^docs/superpowers/\|
|---|---|
| `PostgreSqlIdempotencyStoreConfig` | `@ConditionalOnProperty(ca-skeleton.capabilities.idempotency.provider = postgresql)` |
| `IdempotencyReaper` | 동일 |
| `OutboxStoreAdapter` | **없음** (`@Repository`만) |
| `JpaOutboxStore` | **없음** (`@Repository`만) |
| `OutboxReaper` | **없음** (`@Component` + `@Scheduled`) |
`JpaAdapterComponentsConfig`가 `...persistence.outbox` 패키지를 component scan한다. 따라서
`ca-skeleton.persistence-jpa.enabled=true`이면 `ca-skeleton.outbox.enabled=false`여도
`OutboxStoreAdapter`와 `OutboxReaper`가 빈이 되고, reaper의 `@Scheduled`가 10분마다
`JpaOutboxStore`와 `OutboxReaper`가 빈이 되고, reaper의 `@Scheduled`가 10분마다
`delete from outbox_event where status='PUBLISHED' and occurred_at < ?`를 돈다.
**확인**
@@ -3330,7 +3330,7 @@ V1 `OutboxReaper`의 bulk delete가 매 주기 실패한다.** 지금은 V2가 c
않았지만, cutover 런북에 "V1 reaper/relay 먼저 끄기"가 명시돼야 한다.
**제안**
- `OutboxStoreAdapter` / `OutboxReaper`에 `@ConditionalOnProperty(prefix="ca-skeleton.outbox",
- `JpaOutboxStore` / `OutboxReaper`에 `@ConditionalOnProperty(prefix="ca-skeleton.outbox",
name="enabled", havingValue="true")` 추가.
- cutover 절차에 V1 writer 비활성화 단계를 명시.
@@ -3495,7 +3495,7 @@ import하지 않는다** (§11.0 측정).
- **`SafeSortMapper.MAX_SORT_TERMS = 4`**: registry에 더 많이 등록할 수 있지만 요청은 4개까지.
의도로 보인다.
- **`PgRangeCodec.parse("empty")` 거부**: 의도이고 근거가 적혀 있다.
- **`SpringTransactionPort`의 non-`@Autowired` 생성자들**: 테스트 전용
- **`SpringTransaction`의 non-`@Autowired` 생성자들**: 테스트 전용
(`withoutAcquisitionEnvelope`). package-private이라 표면이 넓어지지 않는다.
---
+2 -2
View File
@@ -78,7 +78,7 @@ The design gives `web-idempotency` its own `IdempotencyStore`, `IdempotencyRecor
`IdempotencyState`, `IdempotencyScope` and `RequestFingerprint`. This repository already has the
equivalents in `application-core/idempotency` — `IdempotencyStorePort`, `IdempotencyState`,
`IdempotencyScopeDigest` and `RequestFingerprint` — with two provider stores behind the port:
PostgreSQL (`PostgreSqlOwnerSafeIdempotencyStore` in `persistence-jpa`) and Redis
PostgreSQL (`PostgreSqlIdempotencyStore` in `persistence-jpa`) and Redis
(`RedisIdempotencyStoreAdapter` in `cache-redis`), selected by
`ca-skeleton.capabilities.idempotency.provider`. That is what the design's Tasks 39 and 40 ask for,
built in the direction the registry permits.
@@ -118,7 +118,7 @@ holding a JPA store for long-running operations, with the port
This is the same shape as §6 and takes the same resolution — the one the repository already used
for idempotency, where `IdempotencyStorePort` lives in `application-core` and
`PostgreSqlOwnerSafeIdempotencyStore` in `persistence-jpa`:
`PostgreSqlIdempotencyStore` in `persistence-jpa`:
| Design type | Here |
| --- | --- |