외부 리뷰("현재 상태를 유지하기 위한 검증이 너무 많고, 그 검증 자체를
다시 검증하는 구조까지 생겼다")를 설계 문서로 정리하고 코드로 반영한다.
설계·판단 근거는 docs/superpowers/specs/2026-09-16-verification-surface-reduction-design.md.
삭제
- .github/ci-gate-matrix.yml(1,025줄) + verify-gate-matrix.sh(568줄):
Gradle task graph와 workflow graph에 이미 있는 정보의 3중 복제
- verify-gradle-wrapper.sh(799줄): workflow 바이트 해시 잠금.
wrapper 검증은 gradle/actions/wrapper-validation(full SHA 핀)에 위임
- DeveloperExperienceContractTest 등의 CI YAML mutation 테스트:
애플리케이션 test suite가 GitHub Actions YAML 파서를 검증하던 계층 역전
- 문서 drift 파서: verifyReadmeCommands, verifyRunbookReferences,
verifyDocumentedLeafCount, verifyTestSourceSetRegistry
- 빈 레지스트리를 지키던 커스텀 YAML 파서: verifyTrivyignore,
verifyQuarantineSunset, flaky-quarantine.yaml
- verifyConfigurationPropertiesProcessor, verifyOneTypePerFile:
각각 ca.spring-config convention과 Checkstyle OneTopLevelClass가 대체
- 정상 입력으로도 성공할 수 없던 messaging always-fail task
- ModuleRegistry의 JSON 필드 집합 정확 일치, sample-portfolio negative guard
이동
- java/quality/spring 공통 설정을 configure(subprojects) 블록에서
ca.java-conventions / ca.quality-conventions / ca.java-library /
ca.spring-library convention plugin으로
- 아키텍처 검증을 ca.architecture로, JPA·messaging qualification을
gradle/qualification/ 아래로, verifyEnvKeys를 :app-bootstrap 소유로
완화
- Git revision은 releaseCheck·아카이브 생성에서만 요구. 일반 빌드는 SNAPSHOT
- SpotBugs/FindSecBugs는 로컬 check에서 빼고 qualityCheck 레인으로
task 계층
- leaf check는 그 leaf만. architectureCheck / qualityCheck /
configContractCheck / integrationCheck / ci / releaseCheck로 이름 분리
CI
- _reusable-gradle.yml 신규. checkout + wrapper validation + JDK/캐시 공통화
- fileserver-release.yml -> fileserver-certification.yml (CD가 아니라 certification)
- GitHub Actions = CI + artifact, Argo CD = CD 경계를 docs/ci-cd/boundary.md로 고정
순증감 +3,274 / -7,483.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
148 lines
7.7 KiB
YAML
148 lines
7.7 KiB
YAML
name: notification-platform
|
|
|
|
# Verification tiers for the Notification Delivery Platform.
|
|
#
|
|
# The PR tier is deliberately free of any external provider. A gate that depends on a third-party
|
|
# sandbox fails for reasons that have nothing to do with the change under review, and a gate people
|
|
# learn to re-run is not a gate. Real provider smoke tests live in the secret-protected tier, where
|
|
# a failure is an environment signal rather than a merge blocker.
|
|
#
|
|
# Every job that invokes Gradle validates the wrapper first with the repository's pinned action;
|
|
# the wrapper JAR is executable code fetched at build time, so validating it is what keeps a
|
|
# compromised wrapper from turning any workflow run into arbitrary code execution.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
# The filter used to stop at the four notification source trees, so a change to the
|
|
# composition root, the settings binding, the schema migrations, or the evidence manifest
|
|
# ran none of this — and those are exactly the surfaces that decide whether the platform
|
|
# assembles, binds and migrates at all.
|
|
- 'src/application-core/src/**/notification/**'
|
|
- 'src/adapter/outbound/notification/**'
|
|
- 'src/adapter/outbound/persistence-jpa/src/**/notification/**'
|
|
- 'src/adapter/outbound/persistence-jpa/src/main/resources/db/migration/jpa/notification-platform/**'
|
|
- 'src/adapter/inbound/web/src/**/notification/**'
|
|
- 'src/app-bootstrap/src/**/notification/**'
|
|
- 'src/app-bootstrap/src/main/resources/application*.yml'
|
|
- 'src/gradle/notification-*.gradle'
|
|
- 'src/config/architecture/modules.json'
|
|
- 'src/.env'
|
|
- 'docs/notification/**'
|
|
- 'infra/notification/**'
|
|
- '.github/workflows/notification-platform.yml'
|
|
# Every Gradle job here installs its toolchain through this composite action, so a change to
|
|
# it changes what this gate runs.
|
|
- '.github/actions/setup-gradle-java/action.yml'
|
|
push:
|
|
branches: [ main ]
|
|
schedule:
|
|
# Nightly: the chaos tier, which is slower and inherently less deterministic than the PR tier.
|
|
- cron: '0 17 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: notification-platform-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pr:
|
|
name: contract (Java 21, no external provider)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Compile and format check
|
|
working-directory: src
|
|
run: ./gradlew :application-core:compileJava :adapter:outbound:notification:compileJava --console=plain
|
|
- name: Application contracts
|
|
working-directory: src
|
|
run: ./gradlew :application-core:test --console=plain
|
|
- name: Provider contract suite
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:notification:test --console=plain
|
|
- name: Persistence and web
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:persistence-jpa:test :adapter:inbound:web:test --console=plain
|
|
# The PR tier never touched a database, so every claim about migrations, claim atomicity and
|
|
# lease fencing rested on a fake. Docker is available on this runner; the lane fails closed
|
|
# when the container cannot start, because a skipped contract reports success for a database
|
|
# nobody tested.
|
|
- name: Notification schema and claim contracts (real PostgreSQL)
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:persistence-jpa:jpaPlatformContractTest --console=plain
|
|
- name: Notification migration upgrade (real PostgreSQL)
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:persistence-jpa:jpaPlatformMigrationTest --console=plain
|
|
- name: Architecture gates
|
|
working-directory: src
|
|
run: |
|
|
./gradlew verifyCleanArchitectureDependencies --console=plain
|
|
./gradlew :app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*' --console=plain
|
|
- name: Configuration surface
|
|
working-directory: src
|
|
run: |
|
|
./gradlew :app-bootstrap:verifyEnvKeys verifyPublicPathSnapshot --console=plain
|
|
./gradlew verifyNotificationApiSurface verifyNotificationConfiguration --console=plain
|
|
# A support grade is a promise about production behaviour. This refuses one the pipeline
|
|
# cannot back — the check that would have caught five channels reading "Stable" while no
|
|
# request had ever left the process.
|
|
- name: Evidence manifest
|
|
working-directory: src
|
|
run: ./gradlew verifyNotificationEvidence --console=plain
|
|
- name: Static analysis
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:notification:check -x test --console=plain
|
|
|
|
nightly-chaos:
|
|
name: chaos (ambiguity, restart recovery, callback burst)
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
# This job is named for ambiguity, restart recovery and callback burst. It used to run a
|
|
# unit-test filter and then `test` — neither of which restarts anything or bursts anything —
|
|
# so the job name was the only place those three properties existed.
|
|
- name: Ambiguity and fault harness
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:notification:test --tests '*ChaosSecurity*' --tests '*CrossProviderContractSuite*' --console=plain
|
|
- name: Concurrency and rotation races
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:notification:test --tests '*ConcurrencyTest' --tests '*ProviderRuntimeStateTest' --console=plain
|
|
- name: Restart recovery and lease fencing (real PostgreSQL)
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:persistence-jpa:jpaPlatformContractTest :adapter:outbound:persistence-jpa:jpaPlatformFailureTest --console=plain
|
|
- name: Full suite
|
|
working-directory: src
|
|
run: ./gradlew test --console=plain
|
|
# A filter that matches nothing passes. Each --tests filter above names a class that exists
|
|
# today; if one is renamed the job must fail rather than quietly stop covering it.
|
|
- name: Every named suite actually ran
|
|
working-directory: src
|
|
run: |
|
|
set -euo pipefail
|
|
for suite in ChaosSecurity CrossProviderContractSuite ConcurrencyTest ProviderRuntimeStateTest; do
|
|
if ! find . -path '*/build/test-results/*' -name "*${suite}*.xml" | grep -q .; then
|
|
echo "no test results for ${suite}: the filter matched nothing and the job passed vacuously" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# There is no provider-sandbox job. It ran only on workflow_dispatch and could not succeed by
|
|
# any path: with no credentials its first step exit 1-ed, and with credentials the only test it
|
|
# ran was ProviderSandboxSmokeTest, whose body is an unconditional fail() saying a real sandbox
|
|
# call is not implemented. Its credential check read secrets.NOTIFICATION_SANDBOX_CREDENTIALS,
|
|
# which nothing in this repository consumes — the test reads NOTIFICATION_SANDBOX_ENABLED — so
|
|
# any non-empty string satisfied it and was then dropped.
|
|
#
|
|
# The unimplemented state is still stated in two places that do not depend on a workflow:
|
|
# ProviderSandboxSmokeTest itself, and the unsatisfied provider-wire-qualified claim in
|
|
# docs/notification/evidence-manifest.json, which verifyNotificationEvidence enforces inside
|
|
# check. When a real sandbox call is implemented, the job comes back with it.
|