refactor(repo)!: 들여온 플랫폼을 src/platforms 아래로 묶는다
문제: 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.
This commit is contained in:
@@ -5,8 +5,8 @@ registry entries with `"build": "optional-grpc"`) are kept out of the main multi
|
||||
internal project dependencies while making their configuration opt-in.
|
||||
|
||||
```bash
|
||||
./gradlew -p optional-platforms ci
|
||||
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcInProcessContractTest
|
||||
./gradlew -p platforms/optional-build ci
|
||||
./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcInProcessContractTest
|
||||
```
|
||||
|
||||
`adapter:inbound:grpc` remains in the main application build because it is an application adapter;
|
||||
|
||||
+2
-2
@@ -84,9 +84,9 @@ tasks.register('releaseCheck') {
|
||||
}
|
||||
|
||||
// The stages this build's strict lanes may belong to, executed by workflows as
|
||||
// `./gradlew -p optional-platforms <stage>` from `src`. A command counts when it starts in this
|
||||
// `./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')
|
||||
workflowDirectory = layout.projectDirectory.dir('../../../.github/workflows')
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# optional-platforms is a build of its own (`./gradlew -p optional-platforms ...`), and Gradle reads
|
||||
# optional-platforms is a build of its own (`./gradlew -p platforms/optional-build ...`), and Gradle reads
|
||||
# gradle.properties from the build's root directory only, so src/gradle.properties never reached it:
|
||||
# the optional build ran serially and without the build cache (review 2026-11-01 08-06).
|
||||
# The values and their reasons are src/gradle.properties'. settings.gradle fails the build when the
|
||||
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
# grpc — local authority for the gRPC platform family
|
||||
|
||||
이 문서는 `grpc:*` family의 **local authority**다. gRPC platform은 기본 application build와 분리된
|
||||
`src/optional-platforms` build가 소유한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급,
|
||||
`src/platforms/optional-build` build가 소유한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급,
|
||||
Stable 범위의 경계와 application에 채택될 때 필요한 계약이다.
|
||||
|
||||
Root 정책(`CLAUDE.md` / `AGENTS.md`)과 충돌하면 root가 이긴다.
|
||||
@@ -11,7 +11,7 @@ Root 정책(`CLAUDE.md` / `AGENTS.md`)과 충돌하면 root가 이긴다.
|
||||
`adapter:inbound:grpc`를 통해 라이브러리로서 도달한다.
|
||||
|
||||
설계 근거와 원본 계획 대비 deviation은
|
||||
[docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md](../../docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md)가 SSOT다.
|
||||
[docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md](../../../docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md)가 SSOT다.
|
||||
|
||||
## Family와 framework 규칙
|
||||
|
||||
@@ -86,7 +86,7 @@ capability flag 뒤에 있다. `GrpcPlatformStartupValidator`가 Stable catalog
|
||||
|
||||
`grpc:*`와 `grpc-advanced:*`는 기본 `ca-skeleton` settings에 include되지 않는다. 따라서 일반
|
||||
`:app-bootstrap:build`는 이 project들을 configure하지 않는다(목록은 registry의 `"build": "optional-grpc"`). 플랫폼 자체는
|
||||
`./gradlew -p optional-platforms ci`로 검증하고, application runtime에 실제 채택하려면 composition root가
|
||||
`./gradlew -p platforms/optional-build ci`로 검증하고, application runtime에 실제 채택하려면 composition root가
|
||||
명시적으로 dependency를 가져오는 별도 변경이 필요하다.
|
||||
|
||||
런타임 포함 여부와 qualification은 별개다. in-process·Netty·fault lane이 통과해도 실제 배포 환경의
|
||||
@@ -115,11 +115,11 @@ focused test는 registry의 `gradle_path`에서 파생한다.
|
||||
|
||||
```bash
|
||||
cd src
|
||||
./gradlew -p optional-platforms :grpc:<leaf>:test --console=plain
|
||||
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcInProcessContractTest --console=plain
|
||||
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcNettyContractTest --console=plain
|
||||
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcFaultTest --console=plain
|
||||
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcPerformanceTest --console=plain
|
||||
./gradlew -p platforms/optional-build :grpc:<leaf>:test --console=plain
|
||||
./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcInProcessContractTest --console=plain
|
||||
./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcNettyContractTest --console=plain
|
||||
./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcFaultTest --console=plain
|
||||
./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcPerformanceTest --console=plain
|
||||
```
|
||||
|
||||
## 금지
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
# build.gradle) owns compilation. CI runs both `buf lint` and `buf breaking` from this directory —
|
||||
# see the `grpc-proto-buf` job in .github/workflows/ci-quality-gates.yml.
|
||||
#
|
||||
# cd src/grpc/grpc-contract
|
||||
# cd src/platforms/grpc/grpc-contract
|
||||
# buf lint
|
||||
# buf breaking --against '<baseline>#subdir=src/grpc/grpc-contract'
|
||||
# buf breaking --against '<baseline>#subdir=src/platforms/grpc/grpc-contract'
|
||||
#
|
||||
# No dependencies: the only imports are protoc's own well-known types (google/protobuf/*.proto).
|
||||
version: v2
|
||||
|
||||
@@ -27,7 +27,7 @@ configurations {
|
||||
// dependency on the main build (it would pull the whole main build into this one), and a test that
|
||||
// compares two copies (two definitions stay, and the test would have to parse Java source text).
|
||||
def sharedMigrationFileSources = tasks.register('sharedMigrationFileSources', Sync) {
|
||||
from(file('../../adapter/outbound/persistence-jpa/src/testFixtures/java')) {
|
||||
from(file('../../../adapter/outbound/persistence-jpa/src/testFixtures/java')) {
|
||||
include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/VersionedMigrationFiles.java'
|
||||
include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/ConcurrentIndexMigrationInspector.java'
|
||||
include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/MigrationResource.java'
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class GrpcPackageOwnershipTest {
|
||||
List<String> leaves = List.of("grpc-core-api", "grpc-runtime", "grpc-operation-ledger-jpa");
|
||||
Map<String, List<String>> owners = new LinkedHashMap<>();
|
||||
for (String leaf : leaves) {
|
||||
Path source = repo.resolve("src/grpc").resolve(leaf).resolve("src/main/java");
|
||||
Path source = repo.resolve("src/platforms/grpc").resolve(leaf).resolve("src/main/java");
|
||||
try (var files = Files.walk(source)) {
|
||||
for (Path file : files.filter(path -> path.toString().endsWith(".java")).toList()) {
|
||||
var matcher = PACKAGE.matcher(Files.readString(file));
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
pluginManagement {
|
||||
includeBuild('../build-logic')
|
||||
includeBuild('../../build-logic')
|
||||
}
|
||||
|
||||
plugins {
|
||||
@@ -13,7 +13,7 @@ dependencyResolutionManagement {
|
||||
}
|
||||
versionCatalogs {
|
||||
libs {
|
||||
from(files('../gradle/libs.versions.toml'))
|
||||
from(files('../../gradle/libs.versions.toml'))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,9 @@ def readBuildProperties = { File file ->
|
||||
file.withInputStream { properties.load(it) }
|
||||
properties
|
||||
}
|
||||
def mainBuildProperties = readBuildProperties(new File(settingsDir, '../gradle.properties'))
|
||||
def mainBuildProperties = readBuildProperties(new File(settingsDir, '../../gradle.properties'))
|
||||
def ownBuildProperties = readBuildProperties(new File(settingsDir, 'gradle.properties'))
|
||||
if (mainBuildProperties != ownBuildProperties) {
|
||||
throw new GradleException("optional-platforms/gradle.properties differs from src/gradle.properties: " +
|
||||
throw new GradleException("platforms/optional-build/gradle.properties differs from src/gradle.properties: " +
|
||||
"${ownBuildProperties} vs ${mainBuildProperties}. Copy the main build's values.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user