Files
clean-architecture-backend-…/src/composition/fileserver-platform/build.gradle
T
DongHyeonka 1400dc1506 feat!: 남은 리뷰 발견을 고치고 개발 매뉴얼과 기능 생성 명령을 더한다
문제: High·P1을 고친 뒤에도 P2·P3 약 90건이 남았다. 연결·구독·메시지
크기 상한이 없는 전송(WebSocket·gRPC·GraphQL deadline), 낙관적 충돌의
500, upsert 경쟁, Mongo 무제한 timeout, 샘플 목록 N+1, 갈라진 복사본
(TenantId 3벌, 이벤트 ID 문법 5곳, SQLState 표 2벌), 문서를 읽는 PR
테스트와 캐시를 막는 lane 설정 등이다. 새 기능을 어디에 어떤 순서로
만드는지 알려 주는 문서와 도구가 없었다. MinIO 공식 이미지가 사라져
객체 저장소 lane이 돌지 않았다.

방법: 영역별 묶음으로 실패 테스트를 먼저 쓰고 고쳤다. 고치는 중에 찾은
결함도 함께 고쳤다(durable operation id가 UUIDv4라 이벤트가 전부 DEAD,
S3 어댑터 생성·작은 chunk 읽기 실패, Redis 조건부 기록의 EVALSHA 권한).
MinIO는 pgsty/minio를 digest로 고정했다(Chainguard는 태그·실행 사용자·
mc 이미지 문제로 버림). docs/manual/에 작업 순서와 판단 지점을 쓰고,
scripts/new-feature.sh가 5개 leaf에 뼈대를 만든다. 생성→빌드→통과
왕복을 verifyFeatureScaffold가 mainCheck에서 본다. 묶음별 결과와
결정은 리뷰 README 14절에 있다.

위험·한계: 파생 서비스 동작이 바뀐다. JDBC batch 50 기본, 운영 jar에서
H2 제거, 트랜잭션 30초 제한, 격리 수준을 Hikari에서 고정, gRPC·
WebSocket·GraphQL 새 한도, correlation ID 규칙 밖이면 서버가 교체,
샘플 키 오류 코드 IDEMPOTENCY_KEY_INVALID. 새 leaf 두 개
(composition:durable-operation, adapter:inbound:messaging)와 새
마이그레이션(postgresql V20·V21, notification V11·V12, sample V8_1,
grpc-ledger V002)이 생긴다. V21 유일 인덱스는 기존 중복이 있으면
실패한다(runbook에 확인 쿼리).

검증: ci, mainCheck(생성 명령 왕복 포함), integrationCheck(MinIO 포함
전 컨테이너 lane), -p optional-platforms ci integrationCheck 통과.

Refs: docs/reviews/2026-11-01-maturity-review/README.md 14절
BREAKING CHANGE: JDBC batch 기본 켜짐, H2 운영 의존 제거, 트랜잭션
기본 제한 30초, gRPC·WebSocket·GraphQL 서버 한도 기본값 추가,
샘플 Idempotency-Key 오류 코드 변경.
2026-11-03 19:52:06 +09:00

75 lines
4.2 KiB
Groovy

plugins {
id 'ca.spring-library'
id 'ca.spring-config'
}
// The Fileserver capability's cross-adapter assembly.
//
// It exists because one capability spans leaves that must not see each other: the HTTP surface in
// `adapter:inbound:web-fileserver`/`web`, the storage and platform policy in
// `adapter:outbound:fileserver`, and the metadata tables in `persistence-fileserver` on the
// `persistence-jpa` platform. (It used to list identifier generation too; nothing here uses
// `adapter:outbound:identifier`, and the registry edge was removed — review 05-21.) An
// outbound adapter reaching an inbound one is the direction the architecture exists to forbid, so
// something has to hold the assembly — and until now that something was the composition root, which
// is why every application shipped Fileserver whether or not it wanted it.
//
// This module is not a composition root. It composes one capability; it does not run. What decides
// whether an application ships Fileserver is one commented `runtimeOnly` line in
// `app-bootstrap/build.gradle`.
//
// It is deliberately thin: cross-adapter wiring only. A configuration that knows one leaf belongs to
// that leaf — the fileserver platform's own settings, storage gateway, verification and security
// wiring already moved into `adapter:outbound:fileserver` and must not come back here.
dependencies {
implementation project(':application-core')
implementation project(':application-fileserver')
implementation project(':shared-contract')
implementation project(':adapter:inbound:web-fileserver')
// The web platform itself as well, for `web.auth`: the admin plane composes the capability's
// admin endpoints with the platform's authorization types. That edge is the reason this module
// exists — an adapter reaching a sibling adapter is what it is here to take on.
implementation project(':adapter:inbound:web')
implementation project(':adapter:outbound:fileserver')
implementation project(':adapter:outbound:persistence-fileserver')
// The relational platform the metadata tables live in: DataSource, Flyway core stream,
// capability schema registry and the TransactionPort every fileserver service needs. Without
// it, a service that picked this one line got Boot's relational auto-configuration with nothing
// behind it and failed to start with an unrelated-looking DataSource or missing-bean error.
// Runtime only: nothing here compiles against it. One line selects the whole capability.
runtimeOnly project(':adapter:outbound:persistence-jpa')
implementation project(':adapter:outbound:support')
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework:spring-jdbc'
implementation 'org.springframework:spring-context'
implementation 'org.slf4j:slf4j-api'
// The cleanup worker logs structured key/value pairs. Same encoder the rest of the runtime uses.
implementation libs.logstash.logback.encoder
}
dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-test'
testImplementation 'ch.qos.logback:logback-classic'
testImplementation libs.logstash.logback.encoder
}
dependencies {
testImplementation libs.archunit.junit5
}
// FileserverDocumentationCoverageTest reads the fileserver documents, the workflows that define the
// support-matrix jobs and the fileserver transport sources. They are inputs of `test`, or Gradle
// would call it up to date after an edit to any of them — which is the edit it exists to catch.
def repositoryRoot = rootProject.projectDir.parentFile
tasks.named('test') {
inputs.dir(new File(repositoryRoot, 'docs/fileserver')).withPropertyName('fileserverDocuments')
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir(new File(repositoryRoot, '.github/workflows')).withPropertyName('workflows')
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir(rootProject.file('adapter/inbound/web-fileserver/src/main/java')).withPropertyName('transportSources')
.withPathSensitivity(PathSensitivity.RELATIVE)
}