fix!: 성숙도 리뷰의 High·P1 결함 19건을 고친다

문제: 2026-11-01 성숙도 리뷰에서 High 21건·P1 25건이 나왔다. 결과를
모르는 일을 "확실함"으로 기록했다(발송 중 죽은 알림 재발송, 커밋 중
끊긴 쓰기를 재시도 가능으로 응답, 재시도 가능한 거부를 DEAD로). 중복을
DB가 아니라 코드 순서로 막았다(정산 job, 포스터 제목). 짝 프론트와
wire 계약이 달랐고(처리 중 409, Envelope null), JWT audience 검증이
기본으로 꺼져 있었고, 트레이스가 나가지 않았고, CI가 strict lane 14개를
한 번도 돌리지 않았다.

방법: 발견마다 실패하는 테스트를 먼저 쓰고 고쳤다. 주요 선택:
- 알림 attempt는 처음부터 "시작 여부 모름"으로 쓴다(호출 직전 갱신은
  쓰기가 하나 늘어 버림).
- 정산 job claim은 lease·fence를 갱신하는 UPDATE 한 문장(처리 전체를
  트랜잭션으로 감싸는 안은 외부 호출 동안 잠금을 잡아 버림).
- 커밋 단계 연결 끊김은 DB_COMPLETION_UNKNOWN(재시도 불가).
- 처리 중 409는 retryable=true + Retry-After: 2, Envelope null 필드는
  web Jackson mixin으로 생략(shared-contract는 stdlib only).
- 트레이싱은 자체 Tracer를 지우고 Boot 4 tracing·OTLP로.
- strict lane을 단계에 연결하고 verifyStrictLaneStages가 고아를 막는다.
발견별 RED·GREEN·버린 대안은 리뷰 README 13절 표에 있다.

위험·한계: JWT 모드는 APP_SECURITY_JWT_AUDIENCE가 없으면 기동하지
않는다. 짝 프론트는 409 retryable과 Envelope 키 규칙을 맞춰야 한다.
이 커밋 시점에는 MinIO 공식 이미지가 사라져 MinIO 2 lane이 실패한다
(다음 커밋에서 대체 이미지로 해결).

검증: ci 통과. mainCheck·integrationCheck는 MinIO 2 lane만 실패(이미지
pull 거부). -p optional-platforms ci integrationCheck, performanceCheck,
releaseCheck(-PgitRevision) 통과.

Refs: docs/reviews/2026-11-01-maturity-review/README.md 2·13절
BREAKING CHANGE: JWT 모드에서 APP_SECURITY_JWT_AUDIENCE가 필수가 되고 role은
audience client와 realm 것만 읽는다. IDEMPOTENT_IN_FLIGHT가 retryable=true,
Retry-After: 2로 바뀌고 Envelope는 null 필드를 보내지 않는다.
This commit is contained in:
DongHyeonka
2026-11-03 19:52:06 +09:00
parent 01a8a2a70f
commit 34565130e0
253 changed files with 13849 additions and 1140 deletions
+6
View File
@@ -49,6 +49,12 @@ jobs:
- name: Run the pull-request gate
working-directory: src
run: ./gradlew :ci :verifyDependencyLocks --warning-mode=fail --stacktrace
# Plans every stage (`--dry-run`: nothing executes) and fails when a strict lane is in no stage
# a workflow executes, or a stage is executed by no workflow (review 2026-11-01 08-01). A new
# lane fails here, on its own pull request, instead of running nowhere after it merges.
- name: Require every strict lane to be in an executed stage
working-directory: src
run: ./gradlew :verifyStrictLaneStages --dry-run --stacktrace
- name: Verify Compose profile contracts render exactly as declared
run: bash scripts/verify-compose-profile-contracts.sh
+60 -161
View File
@@ -15,11 +15,13 @@ name: integration-main
# shared. They now run on every push to main as well as nightly, which is strictly more often
# than before.
#
# 2. Lanes that were registered in Gradle and invoked by nothing — the MongoDB container lanes and
# app-bootstrap's Testcontainers `integrationTest` — existed, failed closed, and executed in no
# workflow. A lane nobody runs is not coverage; it is a file that looks like coverage. They
# are here rather than in stage 1 because every one of them either starts containers or re-runs
# suites the PR gate already covers, and the pull-request budget is minutes for the whole gate.
# 2. The container-backed lanes, run as the root category aggregates `:integrationCheck` and
# `:performanceCheck` rather than one workflow line per lane. A lane nobody runs is not coverage;
# it is a file that looks like coverage — and naming lanes here one by one is how fourteen of
# them came to run nowhere (review 2026-11-01 08-01). The pull-request gate's
# `verifyStrictLaneStages` now fails when a strict lane is in no stage a workflow executes. They
# are here rather than in stage 1 because every one of them starts containers or real servers,
# and the pull-request budget is minutes for the whole gate.
#
# What is deliberately NOT here: the web "Advanced capability" nightly lane that used to exist as
# web-advanced-nightly.yml (websocket-advanced-nightly.yml went with the websocket Advanced code,
@@ -78,8 +80,13 @@ jobs:
- uses: ./.github/actions/setup-gradle-java
- name: Run the main-branch stage
working-directory: src
run: ./gradlew :mainCheck --warning-mode=fail --stacktrace
# `--continue`: one failed lane (an external image that cannot be pulled, say) must not stop
# the other main-stage gates from reporting (review 2026-11-01 08-04).
run: ./gradlew :mainCheck --continue --warning-mode=fail --stacktrace
# Storability only: the `--dry-run` below plans `integrationCheck` without running a lane. The
# lanes run in `integration-check`.
#
# Two questions. Can every task in the repository-wide gates be *stored* (a property of the task
# graph, so `--dry-run` answers it for all of them in seconds)? And is a stored entry *reused* while
# the build still executes its work (checked on the two core leaves)?
@@ -128,63 +135,71 @@ jobs:
exit 1
}
# Load, abuse and graceful shutdown measure behaviour that degrades gradually rather than breaking
# outright — which is exactly the kind of regression a per-PR gate never catches.
web-load-abuse-and-shutdown:
# The integration stage: every integration-category strict lane (`:integrationCheck`).
#
# This job replaced six jobs that named lanes one by one — the MongoDB lanes, app-bootstrap's
# Testcontainers lane, the moved messaging/object-storage/sample contracts, six of the
# persistence-jpa PostgreSQL contracts and the httpclient fault injection. Naming lanes was how
# eleven persistence-jpa readiness lanes ended up running nowhere: a lane added to Gradle without a
# workflow line was declared, failed closed, and executed on no machine (review 2026-11-01 08-01).
# The aggregate is the list now. A lane joins it by declaring `integration()`, and the root
# `verifyStrictLaneStages` (pull-request gate) fails when a strict lane is in no stage a workflow
# executes.
#
# `--continue` so that one red lane does not hide the others: every failed lane is named in the
# same run. Lanes that need an input this job does not have (the Redis topology coordinates, the
# protected AWS sandbox) are `explicitOnly`; the aggregate prints which ones it left out.
# The container lanes take the build-wide `exclusiveRealServerLane` slot one at a time, so the
# job's length is the sum of the lanes. Split the aggregate across jobs when it outgrows its
# timeout rather than going back to naming lanes.
integration-check:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 240
env:
# Reuse would hand the failover lane a replica set another lane had already faulted.
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Run the load, abuse and shutdown lanes on every container
- name: Run every integration-category strict lane
working-directory: src
run: >-
./gradlew
:adapter:inbound:web:test
:adapter:inbound:web:webJettyCompatTest
--stacktrace
- name: Publish the test reports
run: ./gradlew :integrationCheck --continue --stacktrace
- name: Publish the integration lane reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
with:
name: web-integration-reports
path: src/adapter/inbound/web/build/reports/tests/
name: integration-check-reports
path: src/**/build/reports/tests/
if-no-files-found: warn
# Needs a container runtime and real time (design §29). Separated from the per-PR gate rather than
# made optional inside it: a lane that cannot run here fails, it does not skip.
httpclient-fault-injection:
# The performance stage: every performance-category strict lane (`:performanceCheck`) — Tomcat and
# Jetty load, slow-client and graceful shutdown, the Hikari pool contract, the httpclient pool,
# streaming, retry and rotation bounds, the MongoDB resource budget. They measure behaviour that
# degrades gradually rather than breaking outright, which is the kind of regression a per-PR gate
# never catches. This job replaced `web-load-abuse-and-shutdown`, which despite its name ran
# `:adapter:inbound:web:test` and `webJettyCompatTest` — two lanes the pull-request and main stages
# already run — and never the load lanes (review 2026-11-01 08-01), and `httpclient-performance`.
performance-check:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Inject TCP faults against a real upstream
working-directory: src
run: >-
./gradlew
:adapter:outbound:httpclient:httpClientFailureInjectionTest
--stacktrace
httpclient-performance:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 120
env:
# A project property rather than a command-line flag, so the run command stays a plain,
# verifiable task invocation while the machine-dependent bounds are still asserted.
GRADLE_OPTS: -Dorg.gradle.project.performance.assertions.enabled=true
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Certify pool, streaming, retry, and rotation bounds
- name: Run every performance-category strict lane
working-directory: src
run: >-
./gradlew
:adapter:outbound:httpclient:httpClientPerformanceTest
--stacktrace
run: ./gradlew :performanceCheck --continue --stacktrace
- name: Publish the performance lane reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
with:
name: performance-check-reports
path: src/**/build/reports/tests/
if-no-files-found: warn
httpclient-http3-experimental:
runs-on: ubuntu-latest
@@ -198,123 +213,7 @@ jobs:
- uses: ./.github/actions/setup-gradle-java
- name: Exercise the experimental HTTP/3 opt-in
working-directory: src
run: >-
./gradlew
:adapter:outbound:httpclient:test
-Phttp3.tests.enabled=true
--stacktrace
# The six Docker-backed MongoDB lanes. Until now they ran in no workflow at all: the leaf excludes
# every one of their tags from `test` (build.gradle "Docker-backed lanes are excluded from the
# default unit run"), `check` gains only the hermetic `mongoStableContractTest`, and the only thing
# that named them was scripts/verify-mongodb-platform.sh, which nothing in .github invokes. Six
# lanes that fail closed without Docker, and no machine with Docker was ever asked to run them.
#
# Stage 2 rather than stage 1 because each lane starts real MongoDB containers — mongo:8.0.16,
# mongo:7.0.28 and a Toxiproxy in front of a three-node replica set. That is minutes per lane, and
# the pull-request budget is minutes for the whole gate.
#
# One single-line `./gradlew <task>` step per lane, not one folded command running six, because
# These command lines name each lane explicitly so that a lane which stops being invoked is
# actually executed — a folded command would leave six matrix rows unverifiable. It also means a
# red replica-set lane does not hide the compatibility lane behind it.
mongo-container-lanes:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
# Reuse would hand the failover lane a replica set another lane had already faulted.
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Single-node replica set contract lane
working-directory: src
run: ./gradlew :adapter:outbound:persistence-mongo:mongoReplicaSetTest --stacktrace
- name: Run MongoDB integration lanes
working-directory: src
run: >-
./gradlew
:adapter:outbound:persistence-mongo:mongoReplicaSetTest
:adapter:outbound:persistence-mongo:mongoFailoverTest
:adapter:outbound:persistence-mongo:mongoMigrationTest
:adapter:outbound:persistence-mongo:mongoCompatibilityTest
:adapter:outbound:persistence-mongo:mongoSecurityIntegrationTest
:adapter:outbound:persistence-mongo:mongoPerformanceTest
--stacktrace
- name: Publish the MongoDB lane reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
with:
name: mongo-lane-reports
path: src/adapter/outbound/persistence-mongo/build/reports/tests/
if-no-files-found: warn
# app-bootstrap's Testcontainers lane. The leaf gave it a source set of its own precisely so that
# `./gradlew :app-bootstrap:test` would not require a Docker daemon — and the consequence nobody
# closed is that a source set outside `test` is also outside `check`, so the real-PostgreSQL
# outbox and idempotency contracts compiled on every build and executed on none.
bootstrap-integration:
runs-on: ubuntu-latest
timeout-minutes: 45
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Run the real-PostgreSQL integration contracts
working-directory: src
run: ./gradlew :app-bootstrap:integrationTest --stacktrace
# Container contracts moved out of the default `test` source sets must remain executed after the
# ownership split. One step per lane keeps a failure attributable to the capability that broke.
moved-container-contracts:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Messaging outbox, inbox and admin-journal PostgreSQL contracts
working-directory: src
run: ./gradlew :messaging:messaging-reliability-jdbc-postgresql:integrationTest --stacktrace
- name: Messaging starter Kafka round trip
working-directory: src
run: ./gradlew :messaging:messaging-spring-boot-starter:integrationTest --stacktrace
- name: Object storage MinIO contract
working-directory: src
run: ./gradlew :adapter:outbound:objectstorage:integrationTest --stacktrace
- name: Standalone sample PostgreSQL contract
working-directory: src
run: ./gradlew :sample-portfolio:integrationTestLaneCheck --stacktrace
# These six PostgreSQL contracts moved from app-bootstrap into persistence-jpa. They are named
# directly instead of relying on readiness-card membership: provider ownership and evidence
# grading are different questions, and CI execution must not disappear when a card changes.
jpa-provider-ownership-contracts:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.github/actions/setup-gradle-java
- name: Distributed lock contract
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlDistributedLockIntegrationTest --stacktrace
- name: Integer lock migration compatibility
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlIntLockMigrationCompatibilityIntegrationTest --stacktrace
- name: Outbox transactional append
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlOutboxAppendTransactionalIntegrationTest --stacktrace
- name: Outbox concurrent relay
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlOutboxConcurrentRelayIntegrationTest --stacktrace
- name: Outbox row lifecycle
working-directory: src
run: ./gradlew :adapter:outbound:persistence-jpa:postgresqlOutboxRowLifecycleIntegrationTest --stacktrace
run: ./gradlew :adapter:outbound:httpclient:test -Phttp3.tests.enabled=true --stacktrace
# The optional gRPC platform build declares one strict INTEGRATION lane —
# `grpc-operation-ledger-jpa:integrationTest`, which certifies the atomic
+11 -1
View File
@@ -139,12 +139,22 @@ jobs:
:grpc:grpc-testkit:grpcNettyContractTest
:grpc:grpc-testkit:grpcFaultTest
--stacktrace
# The operation ledger's real-PostgreSQL lane ran only on main and nightly
# (integration-main.yml), so a tag could be cut from a main whose ledger lane was red. It needs
# Docker, which a release runner has (review 2026-11-01 03-12).
- name: Certify the gRPC operation ledger against real PostgreSQL
working-directory: src
env:
TESTCONTAINERS_REUSE_ENABLE: "false"
run: ./gradlew -p optional-platforms integrationCheck --stacktrace
- name: Publish the gRPC release evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
with:
name: grpc-release-evidence
path: src/grpc/grpc-testkit/build/reports/tests/
path: |
src/grpc/grpc-testkit/build/reports/tests/
src/grpc/grpc-operation-ledger-jpa/build/reports/tests/
if-no-files-found: warn
# Each gate runs as its own single-line `./gradlew <task>` step so that a failure names the gate