review-followup Wave 3 라운드 3(P19): 3-D 공통 유틸 — Sha256·HmacSha256·Backoff·MdcKeys·TenantId, caller 트랜잭션 guard 하나

- shared-contract `Sha256`(약 65벌 흡수, notification `MessageDigestPort` 삭제), `HmacSha256`(서명 헬퍼), `Backoff`("full jitter" 뜻 하나),
  `MdcKeys`(gRPC·STOMP에도 상관관계), registry edge application-notification → shared-contract
- application-core `TenantId` 하나로 web·GraphQL tenant 문법 통일, web operation 경로에 tenant 해석(JWT `tenant_id`)
- persistence-jpa `CallerTransaction` 하나(복사본 4벌 + `JpaStreamScope` 흡수), 범위 없는 멱등성·outbox 리포지토리 메서드 제거(E-6b)
- 주입된 `Clock` 우회 제거(objectstorage·websocket·mongo·web stream), GraphQL 오류가 HTTP request id 사용, notification UUIDv7은 uuid-creator
- 호출처 없는 `WebRequestContext`·argument resolver 삭제
- 결함 수정: `WebStreamRegistry` 상한 경합(ORCH-new-3 — bin 하나만 잠그는 lock 안에서 크기 확인, 원자 카운터로 슬롯 예약)
- 현황표: 소유자 결정 33(persistence-notification·fileserver → persistence-jpa edge), 34(id 포트 domain 전환 보류), 35(X2-P2-6b 나머지 보류)

검증: ./gradlew check architectureCheck verifyDependencyLocks verifyPublicPathSnapshot :app-bootstrap:verifyEnvKeys configContractCheck
:app-bootstrap:integrationTest :sample-portfolio:integrationTest :sample-portfolio:systemTest graphql·websocket systemTest
persistence-jpa jpaPlatformContractTest·postgresql{Idempotency,Outbox*}IntegrationTest --continue 통과(695 task)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
donghyeon-ka
2026-09-29 14:17:48 +09:00
co-authored by Claude Opus 5.5
parent 4f4bd1fd34
commit 09e2dd63d6
163 changed files with 2216 additions and 1389 deletions
+11
View File
@@ -497,3 +497,14 @@ web 경로의 `W/`는 `src/adapter/inbound/web/src/main/java/dev/caskeleton/adap
| `IdempotencyScriptsConcurrencyContractTest` | `src/adapter/outbound/cache-redis/src/test/java/dev/caskeleton/adapter/outbound/cache/redis/idempotency/` | `423a29c4` | reflection으로 `digests` Map 구조를 고정하던 테스트. 슬롯이 `RegisteredLuaScript` final 필드가 되어 대상이 없음; 동작은 `RegisteredLuaScriptTest`가 검증 |
| `SecretSourceValidator.REDIS_ENABLED_PROPERTY`와 Redis 역할 prefix 분기(`isRedisMaterial`, `isRedisRoleSelected`, `isRedisCacheBound`, `isSelected`), `REQUIRED_PROD_SECRETS`의 Redis 8개 | `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceValidator.java` | `423a29c4` | cache-redis `RedisProductionSecrets`가 기여(S6-#2c) |
| shared `RateLimitBounds.MAXIMUM_CLEANUP_GRACE`·`MAXIMUM_CLOCK_REGRESSION`, `EdgeRateLimitProviderNeutralContractTest.allPortableAlgorithmsHaveBoundedProviderNeutralPolicies` | `src/shared-contract/src/{main,test}/java/dev/caskeleton/shared/ratelimit/` | `423a29c4` | 정책 타입이 cache-redis로 이동(S1-#15c). 정책 검증 테스트는 이동한 `RateLimitPolicyTest`에 있음 |
| `WebRequestContext` | `src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/core/WebRequestContext.java` | `36ba0810` | store 호출 0 → 선언한 컨트롤러는 항상 500, 소비자 0 (I-1c) |
| `ExternalRequestContext` | `src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/core/ExternalRequestContext.java` | `36ba0810` | `WebRequestContext` 전용 |
| `WebMvcRequestContextArgumentResolver`·`WebMvcRequestContextHolder` | `src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/mvc/context/` | `36ba0810` | I-1c |
| `webMvcRequestContextConfigurer` bean | `src/adapter/inbound/web/src/main/java/dev/caskeleton/adapter/inbound/web/mvc/autoconfigure/WebMvcPlatformAutoConfiguration.java` | `36ba0810` | I-1c |
| app-core `Sha256` | `src/application-core/src/main/java/dev/caskeleton/application/messaging/contract/Sha256.java` | `36ba0810` | shared-contract `digest.Sha256`로 이동 |
| `MessageDigestPort` | `src/application-notification/src/main/java/dev/caskeleton/application/notification/platform/dispatch/MessageDigestPort.java` | `36ba0810` | stdlib 포장 포트(X1-#10b) |
| `Sha256MessageDigestAdapter`·`NotificationDigest` | `src/adapter/outbound/notification/src/main/java/dev/caskeleton/adapter/outbound/notification/platform/template/` | `36ba0810` | 위 포트의 adapter·SHA-256 헬퍼 |
| `JpaStreamScope` | `src/adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/springdata/JpaStreamScope.java` | `36ba0810` | 읽기 전용 caller 트랜잭션 guard를 `transaction/CallerTransaction.requireReadOnly`로 합침(JPA API surface 순증 0) |
| 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) |