외부 리뷰("현재 상태를 유지하기 위한 검증이 너무 많고, 그 검증 자체를
다시 검증하는 구조까지 생겼다")를 설계 문서로 정리하고 코드로 반영한다.
설계·판단 근거는 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>
129 lines
5.2 KiB
YAML
129 lines
5.2 KiB
YAML
name: jpa-release
|
|
|
|
# The release gate. src/config/jpa/release-registry.json is the source: every gate it declares has a
|
|
# job or an assertion here, JpaReleaseRenderingTest holds this file's matrix and promotion lists to
|
|
# the registry's Stable majors, and verifyJpaReleaseGateTasks resolves each gate's task against the
|
|
# real Gradle graph. So a gate removed from the registry, or a major demoted in it, fails the build
|
|
# rather than quietly ceasing to be checked.
|
|
#
|
|
# The matrix below is therefore not free to drift: editing it without editing the registry fails the
|
|
# unit lane.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
# One job per PostgreSQL major, because one job for three majors was one job for one major.
|
|
#
|
|
# `-Pjpa.matrix.versions=16,17,18` reached JpaPlatformContractSupport.start(), which started
|
|
# selectedVersions().get(0) — so twenty-eight integration classes ran against PG16 and nothing
|
|
# ran against 17 or 18, while docs/jpa/support-matrix.md recorded all three as "full contract
|
|
# suite, release lane". A JSONB mapping, a Hibernate dialect difference or a Flyway upgrade that
|
|
# only breaks on 18 shipped with a green release.
|
|
#
|
|
# start() now fails closed on a multi-version selection, so the fan-out is not optional: the
|
|
# matrix is the only way the three majors get covered, and removing a major from it removes the
|
|
# evidence rather than quietly reusing another major's.
|
|
jpa-release-gate:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
postgresql: ["16", "17", "18"]
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the full JPA release gate on PostgreSQL ${{ matrix.postgresql }}
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
jpaReleaseGate
|
|
-Pjpa.matrix.versions=${{ matrix.postgresql }}
|
|
--no-daemon
|
|
--stacktrace
|
|
- name: Record which major this evidence covers
|
|
if: always()
|
|
working-directory: src
|
|
run: |
|
|
mkdir -p build/jpa-release-evidence
|
|
{
|
|
echo "sha=${{ github.sha }}"
|
|
echo "ref=${{ github.ref }}"
|
|
echo "postgresql-major=${{ matrix.postgresql }}"
|
|
echo "task=jpaReleaseGate"
|
|
} > "build/jpa-release-evidence/manifest-${{ matrix.postgresql }}.properties"
|
|
- name: Upload the release evidence
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: jpa-release-evidence-pg${{ matrix.postgresql }}
|
|
path: |
|
|
src/build/jpa-release-evidence/manifest-${{ matrix.postgresql }}.properties
|
|
src/adapter/outbound/persistence-jpa/build/test-results/**/*.xml
|
|
retention-days: 30
|
|
if-no-files-found: error
|
|
|
|
# The promotion decision. Three majors' evidence, and all three must come from this SHA — an
|
|
# aggregate that accepted a re-run artifact from another commit would promote a release on
|
|
# evidence produced by different code.
|
|
jpa-release-promotion:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
needs: jpa-release-gate
|
|
steps:
|
|
- name: Download every major's evidence
|
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # actions/download-artifact@v4.3.0
|
|
with:
|
|
pattern: jpa-release-evidence-pg*
|
|
path: evidence
|
|
- name: Require all three majors, all from this SHA
|
|
run: |
|
|
set -euo pipefail
|
|
missing=0
|
|
for major in 16 17 18; do
|
|
manifest=$(find evidence -name "manifest-${major}.properties" -print -quit)
|
|
if [ -z "${manifest}" ]; then
|
|
echo "::error::no release evidence for PostgreSQL ${major}"
|
|
missing=1
|
|
continue
|
|
fi
|
|
sha=$(sed -n 's/^sha=//p' "${manifest}")
|
|
if [ "${sha}" != "${{ github.sha }}" ]; then
|
|
echo "::error::PostgreSQL ${major} evidence is from ${sha}, not ${{ github.sha }}"
|
|
missing=1
|
|
fi
|
|
done
|
|
if [ "${missing}" -ne 0 ]; then
|
|
echo "::error::the release gate covers three PostgreSQL majors; promotion needs all three"
|
|
exit 1
|
|
fi
|
|
echo "PostgreSQL 16, 17 and 18 evidence all present and all from ${{ github.sha }}."
|
|
|
|
jpa-architecture-and-docs:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Verify architecture boundaries and the support matrix
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
verifyCleanArchitectureDependencies
|
|
checkstyleMain
|
|
:app-bootstrap:test --tests 'dev.caskeleton.bootstrap.architecture.*'
|
|
:adapter:outbound:persistence-jpa:test --tests '*JpaReleaseManifestTest'
|
|
--no-daemon
|
|
--stacktrace
|