문제: src/ 최상위에 계층 폴더와 들여온 제품 폴더(messaging, grpc,
grpc-advanced)와 optional 빌드 폴더(optional-platforms)가 같은 높이로
놓여, 무엇이 이 애플리케이션의 계층인지 폴더만으로 안 보인다.
src/config/에는 빌드 전체 설정과 기능 하나가 주인인 데이터(jpa,
messaging, mongodb)가 섞여 있다.
고른 방법(소유자 결정 2026-11-07, 설계 가-1):
- git mv로 src/platforms/{messaging,grpc,grpc-advanced,optional-build}.
registry source_path 28행만 바꾸고 Gradle 경로(:messaging:*, :grpc:*)는
그대로다. optional 빌드의 이름(optional-platforms)도 그대로다.
- optional 빌드가 한 단계 깊어져, build-logic이 "optional 빌드의 부모 =
주 빌드"로 가정한 네 곳(registry settings, ArchitecturePlugin, 테스트
이미지 catalog, checkstyle·spotbugs 설정)을 MainBuild(위로 올라가며
registry·설정 파일을 찾음)로 바꾼다.
- settings.gradle·build.gradle의 상대 경로, workflow의 -p 값과 경로,
buf 작업 폴더를 고친다. buf breaking은 이동 전 baseline에서도 옛
경로로 비교해 이동 PR에서 건너뛰지 않는다.
- config/jpa, config/messaging, config/mongodb의 데이터를 주인 leaf의
release/로 옮기고 읽는 빌드 줄·테스트·스크립트·문서를 고친다.
- 루트 CLAUDE.md 5절에 최상위 폴더 지도를 한 줄로 적는다.
버린 대안: Gradle 루트를 저장소 루트로(가-3, CI 재편 때 다시 봄),
application-* 묶기(가-2, 파생 서비스 충돌이 큼).
위험·한계: Gradle 문서의 "이름 = 위치" 권고와 한 단계 어긋난다
(:messaging:x가 platforms/messaging/x). 옮긴 폴더를 고쳐 쓰던 파생
서비스는 이름 바뀜 충돌이 날 수 있다(B-52). docs/capability-status.md
「제거된 코드」 표와 docs/work/evidence.md의 옛 경로는 이력이라 두었다.
검증(desktop, 트리 2b3354a4, ~/t1-layout-logs/):
- ./gradlew :ci :verifyDependencyLocks --warning-mode=fail --continue
첫 실행 rc=1: MessagingAuthorityContractTest가 src/messaging을 찾아 실패
→ 경로를 고침. 두 번째 rc=1: messaging-policy
MessagingAdmissionControllerTest.aWaitingCallerIsAdmittedOnceAPermitIsReturned
(2초 대기 경쟁, 부하 7.3에서 한 번 실패, 코드 변경 없는 leaf) → --rerun
3회 모두 통과. 세 번째 rc=0
- -p platforms/optional-build ci rc=0, 두 빌드의 verifyStrictLaneStages
--dry-run rc=0, -p build-logic check rc=0
- :app-bootstrap:documentContractTest
:adapter:outbound:persistence-mongo:mongoDocumentContractTest rc=0
- ./gradlew projects(주 빌드)와 optional 빌드 projects의 프로젝트 목록이
이동 전 트리와 같다(Gradle 경로 불변)
- check-work-docs.py, 상대 링크 검사 rc=0
Refs: design-docs repo-structure/README.md 3.1, repo-structure/01-backend-layout.md 6.1
BREAKING CHANGE: src/messaging·src/grpc·src/grpc-advanced·src/optional-platforms가 src/platforms/ 아래로, src/config/{jpa,messaging,mongodb}가 주인 leaf의 release/로 옮겨졌다. optional 빌드는 -p platforms/optional-build로 부른다. docs/upgrade/2026-11-maturity-review.md B-52.
93 lines
5.0 KiB
Groovy
93 lines
5.0 KiB
Groovy
plugins {
|
|
id 'ca.architecture'
|
|
// Every strict lane of this build belongs to a stage a workflow executes, checked here exactly
|
|
// as in the main build: the main build's check cannot see this build's lanes, and while only it
|
|
// applied the plugin, grpcPerformanceTest ran nowhere (review 2026-11-03 RR-06-03).
|
|
id 'ca.strict-lane-stages'
|
|
}
|
|
|
|
// No `ca.release-provenance` any more: each gRPC leaf's `ca.java-conventions` derives its version
|
|
// and `sourceRevision` from the same -PreleaseVersion/-PgitRevision (GIT_SHA, GITHUB_SHA) inputs the
|
|
// main build reads, so one commit produces one version scheme in both builds (review BUILD-O3-5).
|
|
|
|
tasks.register('resolveAndLockAll') {
|
|
group = 'build setup'
|
|
description = 'Regenerates dependency locks for every optional gRPC leaf (requires --write-locks).'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:resolveAndLockAll" }
|
|
}
|
|
|
|
tasks.register('checkAll') {
|
|
group = 'verification'
|
|
description = 'Runs every gRPC optional-platform leaf check.'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:check" }
|
|
}
|
|
|
|
tasks.register('qualityCheck') {
|
|
group = 'verification'
|
|
description = 'Runs production-bytecode static analysis for every optional-platform leaf.'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:qualityCheck" }
|
|
}
|
|
|
|
// SpotBugs + FindSecBugs over the test source sets (config/spotbugs/exclude-test.xml). This build has
|
|
// no main stage, and the run is short (eleven tasks), so it joins `ci`.
|
|
tasks.register('testQualityCheck') {
|
|
group = 'verification'
|
|
description = 'Runs test-code static analysis for every optional-platform leaf.'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:testQualityCheck" }
|
|
}
|
|
|
|
tasks.register('ci') {
|
|
group = 'verification'
|
|
description = 'Runs the optional gRPC platform verification surface.'
|
|
dependsOn tasks.named('checkAll')
|
|
dependsOn tasks.named('qualityCheck')
|
|
dependsOn tasks.named('testQualityCheck')
|
|
// architectureCheck, not only the direction gate: it also runs verifyNoIgnoredSourcePackages, so
|
|
// a gRPC source Git would drop fails this build's ci the way it fails the main build's.
|
|
dependsOn tasks.named('architectureCheck')
|
|
}
|
|
|
|
// A strict integration lane that no workflow invokes is not coverage; it is a file that looks like
|
|
// coverage. `grpc-operation-ledger-jpa` declares a Testcontainers PostgreSQL lane that certifies the
|
|
// atomic `INSERT ... ON CONFLICT DO NOTHING` claim the whole durable-idempotency contract rests on,
|
|
// and until this aggregate existed `ci` reached `checkAll`, `qualityCheck` and the dependency
|
|
// verifier only — none of which runs a lane whose category is INTEGRATION.
|
|
//
|
|
// Kept out of `ci`: every lane here starts a container, and `ci` is the per-PR gate for this build.
|
|
// The caller is integration-main.yml, the stage that owns container-backed lanes.
|
|
tasks.register('integrationCheck') {
|
|
group = 'verification'
|
|
description = 'Runs every optional-platform leaf integration test lane. Needs a container runtime.'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:integrationTestLaneCheck" }
|
|
}
|
|
|
|
// The performance stage of this build: grpcPerformanceTest. It asserts the shape of a measurement
|
|
// (ordered percentiles, a gate that reads them) with a generous budget, not a number, so it can run
|
|
// on a shared runner. integration-main.yml's performance-check job runs it next to the main build's
|
|
// `:performanceCheck`; before this aggregate it ran when somebody asked for it by name, which was
|
|
// nobody (review 2026-11-03 RR-06-03).
|
|
tasks.register('performanceCheck') {
|
|
group = 'verification'
|
|
description = 'Runs every optional-platform leaf performance test lane.'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:performanceTestLaneCheck" }
|
|
}
|
|
|
|
// The tag-only stage of this build: the hermetic strict lanes (the three gRPC certification lanes).
|
|
// Their tests already run inside each leaf's `test`; the lanes add the one thing `test` cannot say —
|
|
// that a tag still selects something — which is worth asserting once per release tag. release.yml
|
|
// runs this aggregate instead of naming the lanes, so a lane added here is in the release gate
|
|
// without a workflow edit.
|
|
tasks.register('releaseCheck') {
|
|
group = 'verification'
|
|
description = 'Runs every optional-platform leaf hermetic strict test lane (the release gate).'
|
|
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:testLaneCheck" }
|
|
}
|
|
|
|
// The stages this build's strict lanes may belong to, executed by workflows as
|
|
// `./gradlew -p platforms/optional-build <stage>` from `src`. A command counts when it starts in this
|
|
// directory (working-directory joined with -p), which the plugin reads from where this build is.
|
|
strictLaneStages {
|
|
stage ':ci', ':integrationCheck', ':performanceCheck', ':releaseCheck'
|
|
workflowDirectory = layout.projectDirectory.dir('../../../.github/workflows')
|
|
}
|