refactor(build,src): testkit 소스셋 이관과 빌드 게이트 정상화, 미추적 빌드 파일 추적
한 커밋인 이유: src/build.gradle 안에서 ca.testkit-publisher 플러그인 제거와
게이트 수정이 얽혀 있다. 플러그인 적용부만 빼면 web·websocket·persistence-jpa·
persistence-mongo·app-bootstrap 이 사라진 testkitPublisher() 와 *Testkit
컨피규레이션을 계속 참조해 설정 단계에서 빌드가 죽는다. 파일 단위로 나눌 수 없다.
1) testkit 소스셋 → Gradle 표준 java-test-fixtures 이관
web, websocket, persistence-jpa, persistence-mongo, httpclient, graphql 과
이들의 testkit 컨피규레이션을 소비하던 app-bootstrap.
자체 제작 ca.testkit-publisher.gradle 77줄이 사라진다.
2) 실행되지 않거나 실패할 수 없던 빌드 게이트 정상화 (E등급)
- strict-test-lane 의 실행 카운터가 skip 을 실행으로 세던 것 수정.
전부 skip 인 레인은 이제 실패한다 (회귀 테스트 2건 추가)
- public-path 스냅샷이 gitignore 된 src/.env 를 읽던 것을
config/security.yml 의 바인딩 기본값으로 교체
- verifyEnvKeys 가 build/ 산출물을 소스로 읽어 삭제된 키를 사용 중으로
오판하던 것 수정 (입력 4,637 → 4,630 파일)
- jpa-evidence 가 git 실패를 "워크트리 깨끗함"으로 읽던 것을 fail-closed 로
- notification-evidence 의 Grade 열 탐지를 헤더 기준으로 교체 +
표 부재 시 fail-closed
- spring70CompatibilityTest 가 레인을 복제하며 잃은 fail-closed 복구
(태스크명 유지 — 워크플로 3곳과 gate-matrix 린트 무손상)
- 메시징 R2 스켈레톤 주변의 도달 불가 검증 45줄을 MSG-015 명시적 실패로 교체
3) git 에 없던 빌드 필수 파일 추적
- src/gradle/libs.versions.toml — src/build.gradle 이 9곳에서 참조하는데
추적되지 않아 깨끗한 체크아웃에서 설정이 실패했다
- app-bootstrap config/*.yml 15개 — application.yml 이 전부 import 한다.
하드코딩된 시크릿은 없고 값은 secret://environment/APP_* 참조다
4) 진행 중이던 구현 작업 반영 (redis/idempotency 구성, startup 검증,
아키텍처 테스트 클래스, notification 콜백 레지스트리 등)
검증:
- 깨끗한 체크아웃에서 ./gradlew help 통과
- :app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*'
→ 20개 클래스 174 tests, 실패 0, 스킵 0 (이전에는 0개 실행)
미해결: verifyOneTypePerFile 은 손대지 않았다(Checkstyle 로 교체 권고).
B/C/D 등급 100여 건과 CI 단계 분리는 별도 작업 —
docs/superpowers/plans/2026-09-16-ci-stage-separation.md 참고.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
981cd4c7c7
commit
c998cd1067
@@ -10,6 +10,6 @@ dependencies {
|
||||
// dependency was hidden from consumers: an adopter calling the documented method could not
|
||||
// name its return type without adding CloudEvents to their own build, and Gradle gave them no
|
||||
// hint why. A type in a public signature is part of the artifact's contract.
|
||||
api 'io.cloudevents:cloudevents-api:4.0.1'
|
||||
implementation 'io.cloudevents:cloudevents-core:4.0.1'
|
||||
api libs.cloudevents.api
|
||||
implementation libs.cloudevents.core
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ dependencies {
|
||||
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
|
||||
testImplementation 'org.testcontainers:testcontainers-kafka'
|
||||
testImplementation 'org.testcontainers:testcontainers-toxiproxy'
|
||||
testImplementation 'eu.rekawek.toxiproxy:toxiproxy-java:2.1.7'
|
||||
testImplementation libs.toxiproxy.java
|
||||
}
|
||||
|
||||
// The certification lane, and the gate that makes its output the only source of a Stable claim.
|
||||
|
||||
@@ -9,5 +9,5 @@ dependencies {
|
||||
api project(':messaging:messaging-security')
|
||||
api project(':messaging:messaging-admin-api')
|
||||
|
||||
implementation 'io.nats:jnats:2.26.2'
|
||||
implementation libs.jnats
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ dependencies {
|
||||
api project(':messaging:messaging-security')
|
||||
api project(':messaging:messaging-admin-api')
|
||||
|
||||
implementation 'org.apache.pulsar:pulsar-client:4.0.3'
|
||||
implementation libs.pulsar.client
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ dependencies {
|
||||
// api: AvroMessageCodec's constructors take a registry of org.apache.avro.Schema and
|
||||
// AvroCompatibilityGate.check takes and compares them. A consumer cannot build that
|
||||
// registry without naming the type, so hiding the dependency only stops them compiling.
|
||||
api 'org.apache.avro:avro:1.12.0'
|
||||
api libs.avro
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@ dependencies {
|
||||
|
||||
// api: ProtobufMessageContract is a public record over com.google.protobuf.Message and
|
||||
// Parser, and registering a contract is the first thing a consumer of this codec does.
|
||||
api 'com.google.protobuf:protobuf-java:4.29.3'
|
||||
api libs.protobuf.java.legacy
|
||||
}
|
||||
|
||||
+40
-2
@@ -270,6 +270,18 @@ class MessagingPublicSurfaceContractTest {
|
||||
boolean versioned = lastColon > 0 && coordinate.indexOf(':') != lastColon;
|
||||
exported.add(versioned ? coordinate.substring(0, lastColon) : coordinate);
|
||||
}
|
||||
// Version-catalog accessors are the same declaration in a different notation. Matching only the
|
||||
// literal string form would have let `api libs.cloudevents.api` read as "not declared api" — a
|
||||
// contract reported as broken because the build file was tidied, which is the most expensive
|
||||
// kind of false positive a gate can produce.
|
||||
Matcher catalogued =
|
||||
Pattern.compile("(?m)^\\s*api\\s+(libs\\.[A-Za-z0-9.]+)").matcher(buildScript);
|
||||
while (catalogued.find()) {
|
||||
String module = catalogModules().get(catalogued.group(1));
|
||||
if (module != null) {
|
||||
exported.add(module);
|
||||
}
|
||||
}
|
||||
Matcher projects =
|
||||
Pattern.compile("(?m)^\\s*api\\s+project\\('([^']+)'\\)").matcher(buildScript);
|
||||
while (projects.find()) {
|
||||
@@ -294,9 +306,35 @@ class MessagingPublicSurfaceContractTest {
|
||||
}
|
||||
|
||||
private static boolean declaresAsApi(String buildScript, String coordinate) {
|
||||
return Pattern.compile("(?m)^\\s*api\\s+'" + Pattern.quote(coordinate) + "(:[^']*)?'")
|
||||
if (Pattern.compile("(?m)^\\s*api\\s+'" + Pattern.quote(coordinate) + "(:[^']*)?'")
|
||||
.matcher(buildScript)
|
||||
.find();
|
||||
.find()) {
|
||||
return true;
|
||||
}
|
||||
return apiDependenciesOf(buildScript).contains(coordinate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Version-catalog accessor to {@code group:artifact}, read from the catalog itself.
|
||||
*
|
||||
* <p>{@code gradle/libs.versions.toml} declares {@code archunit-junit5 = { module = "..." }} and
|
||||
* Gradle exposes it as {@code libs.archunit.junit5}; the alias separators become dots. Parsing
|
||||
* the file rather than hard-coding the mapping keeps this test honest when an alias is renamed —
|
||||
* a stale table here would silently stop resolving and report the library as unexported.
|
||||
*/
|
||||
private static Map<String, String> catalogModules() {
|
||||
Map<String, String> modules = new LinkedHashMap<>();
|
||||
Path catalog = repositoryRoot().resolve("src/gradle/libs.versions.toml");
|
||||
if (!Files.isRegularFile(catalog)) {
|
||||
return modules;
|
||||
}
|
||||
Matcher entry =
|
||||
Pattern.compile("(?m)^([A-Za-z0-9_-]+)\\s*=\\s*\\{[^}]*module\\s*=\\s*\"([^\"]+)\"")
|
||||
.matcher(read(catalog));
|
||||
while (entry.find()) {
|
||||
modules.put("libs." + entry.group(1).replace('-', '.').replace('_', '.'), entry.group(2));
|
||||
}
|
||||
return modules;
|
||||
}
|
||||
|
||||
private static java.util.function.Predicate<Path> isNamed(String leaf) {
|
||||
|
||||
Reference in New Issue
Block a user