문제: 성숙도 리뷰 수정을 다시 읽은 재리뷰(Critical 0, 회귀 0)가 Important 27건·Minor 41건을 찾았다. 수정이 새로 만든 결함이 많았다. @SystemInvoked가 권한 규칙의 탈출구가 됐고, 데모 계정 거부가 정확히 prod일 때만 걸렸고, outbox 순서 번호가 업그레이드 때 뒤로 갔고, GraphQL union 아래 복잡도가 0이었고, 서블릿 오류 응답이 success:true로 나갔고, 호출자 deadline이 breaker를 열었다. 원래 리뷰 색인이 06 영역 발견 5건(06-10~14)을 빠뜨려 그동안 처리되지 않았다. 방법: 영역별 7묶음이 test-driven-development 절차로 실패 테스트를 먼저 쓰고 고쳤다. 결정은 재리뷰 README 4절에 적었다: 순서 번호는 V21이 기록한 전역 floor부터, 데모 계정은 local·test·demo 허용 목록, @SystemInvoked bean은 기동 실패, complete 단계 실패는 IDEMPOTENCY_COMPLETION_UNKNOWN(결과 불명), 캐시 조건부 쓰기는 별도 SCRIPT lane, strict lane 정책은 build cache 입력, 끝나지 않는 재시도 행은 원인 코드·지표·PARKED 절차. 레지스트리가 선언만 하고 아무 코드도 내보내지 않던 redis.capability.* 지표 6개는 빼고 runbook을 실제 지표(redis.lane.*) 기준으로 고쳤다. 위험·한계: V21을 V22 없이 직접 고쳤다(어느 배포에도 아직 없음). 이 브랜치의 V21을 적용한 개발 DB는 다시 만들어야 한다. 서블릿 오류 디스패치를 보안 체인이 허용한다. 발행·저장소 포트 시그니처가 바뀌어 파생 서비스 코드가 깨진다. prod에서 fixture-로 시작하는 설정값은 기동을 막는다. httpclient failure-injection lane의 main 단계 중복 실행은 이전 결정대로 남겼다. 실제 CI runner 실행은 확인하지 못했다. 검증: ci, mainCheck, :integrationCheck, -p optional-platforms ci integrationCheck performanceCheck, :performanceCheck, :releaseCheck (-PgitRevision), verify-compose-profile-contracts(18 lane) 통과. 첫 실행의 실패 2건(FindSecBugs 1, sample 동시 생성 테스트의 v4 event id)은 고친 뒤 ci·integrationCheck·mainCheck를 다시 돌려 통과했다. Refs: docs/reviews/2026-11-03-rereview/README.md 3·4·6·7절 BREAKING CHANGE: outbox 발행 포트와 저장소 포트 시그니처, 순서 번호 첫 값(V21 floor 다음), 샘플 데모 계정 프로필 허용 목록, 새 오류 코드 IDEMPOTENCY_COMPLETION_UNKNOWN, prod의 fixture- 값 거부, 기동 rule은 static·의존 없음이어야 한다.
153 lines
7.2 KiB
YAML
153 lines
7.2 KiB
YAML
name: ci-quality-gates
|
|
|
|
# The pull-request gate. Everything here blocks a merge.
|
|
#
|
|
# The job list used to include `gate-matrix-lint`, which ran .github/scripts/verify-gate-matrix.sh
|
|
# against .github/ci-gate-matrix.yml: a 1,025-line register of all 107 CI controls, checked for
|
|
# consistency against the Gradle task graph and this workflow by a 568-line shell script, which was
|
|
# itself checked by contract tests in :app-bootstrap. Adding one check meant editing Gradle, a
|
|
# workflow, the matrix, the verifier's expectations and a Java test. The information was already in
|
|
# the task graph and the job graph; the matrix was a third copy that had to be kept equal to both.
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
TESTCONTAINERS_REUSE_ENABLE: "false"
|
|
|
|
jobs:
|
|
quality-gates:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Export the live Gradle verification task map
|
|
working-directory: src
|
|
run: ./gradlew tasks --group verification --console=plain > ../verification-tasks.txt
|
|
- name: Upload the Gradle verification task map
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # actions/upload-artifact@v7.0.1
|
|
with:
|
|
name: gradle-verification-task-map
|
|
path: verification-tasks.txt
|
|
if-no-files-found: error
|
|
# `ci`, not `check`. A leaf's `check` is that leaf's — compile, its tests, Spotless, Checkstyle
|
|
# and Error Prone — and the repository-wide gates are named tasks of their own:
|
|
# ci = every leaf check + architectureCheck + qualityCheck
|
|
# A leaf's `check` includes its API surface verification (owner decision 20). The main-branch
|
|
# stage (`mainCheck`: environment contract, full-boot qualification, public-path baseline,
|
|
# transport and messaging lanes, document-contract lanes) runs in integration-main.yml.
|
|
- 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
|
|
|
|
sample-portfolio:
|
|
# The sample is excluded from production architecture/runtime membership policy, but it is still
|
|
# the reference implementation adopters copy. Compile/test/OpenAPI drift must therefore block PRs.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
# `qualityCheck` too: the root one covers the production leaves only, so the sample — the code
|
|
# adopters copy first — was analysed by no stage, and its SpotBugs exclusions matched nothing
|
|
# (review 2026-11-03 RR-06-05).
|
|
- name: Verify the standalone sample application
|
|
working-directory: src
|
|
run: ./gradlew :sample-portfolio:check :sample-portfolio:qualityCheck --stacktrace
|
|
|
|
optional-platforms:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Verify the optional gRPC platform build
|
|
working-directory: src
|
|
run: ./gradlew -p optional-platforms ci --stacktrace
|
|
# The optional build's own lane-reachability check: the main build's cannot see these lanes
|
|
# (review 2026-11-03 RR-06-03).
|
|
- name: Require every optional-platform strict lane to be in an executed stage
|
|
working-directory: src
|
|
run: ./gradlew -p optional-platforms :verifyStrictLaneStages --dry-run --stacktrace
|
|
|
|
# gRPC schema policy (owner decision 18). protoc compiles src/grpc/grpc-contract inside the
|
|
# optional-platforms build above; lint and breaking-change policy belong to Buf, configured by
|
|
# buf.yaml next to the schema. Buf is a native binary rather than a Maven artifact, so it runs here
|
|
# and not inside Gradle — and nothing in the repository re-implements its rules.
|
|
grpc-proto-buf:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
with:
|
|
# buf breaking reads the baseline schema from Git history.
|
|
fetch-depth: 0
|
|
- uses: bufbuild/buf-action@85aebf73123b5c15fd5528aaecbf9129cddf7fa7 # bufbuild/buf-action@v1.6.0
|
|
with:
|
|
version: 1.73.0
|
|
setup_only: true
|
|
- name: Lint the gRPC schema
|
|
working-directory: src/grpc/grpc-contract
|
|
run: buf lint
|
|
- name: Refuse a breaking change to the gRPC schema
|
|
working-directory: src/grpc/grpc-contract
|
|
env:
|
|
# Pull request: the target branch. Push: the commit this push replaced.
|
|
BASELINE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }}
|
|
run: |
|
|
set -euo pipefail
|
|
baseline_commit="$(git rev-parse --verify --quiet "${BASELINE}^{commit}" || true)"
|
|
if [[ -z "${baseline_commit}" ]] \
|
|
|| ! git cat-file -e "${baseline_commit}:src/grpc/grpc-contract/buf.yaml" 2>/dev/null; then
|
|
# The first change that introduces the module has nothing to be compatible with.
|
|
echo "::notice::grpc-proto-buf: baseline ${BASELINE} has no src/grpc/grpc-contract/buf.yaml; breaking check skipped."
|
|
exit 0
|
|
fi
|
|
buf breaking --against "../../../.git#ref=${baseline_commit},subdir=src/grpc/grpc-contract"
|
|
|
|
release-gate:
|
|
needs:
|
|
- quality-gates
|
|
- sample-portfolio
|
|
- optional-platforms
|
|
- grpc-proto-buf
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Require every current blocking job to succeed
|
|
env:
|
|
QUALITY_RESULT: ${{ needs.quality-gates.result }}
|
|
SAMPLE_RESULT: ${{ needs.sample-portfolio.result }}
|
|
OPTIONAL_PLATFORMS_RESULT: ${{ needs.optional-platforms.result }}
|
|
GRPC_PROTO_BUF_RESULT: ${{ needs.grpc-proto-buf.result }}
|
|
run: |
|
|
set -euo pipefail
|
|
for result in \
|
|
"${QUALITY_RESULT}" \
|
|
"${SAMPLE_RESULT}" \
|
|
"${OPTIONAL_PLATFORMS_RESULT}" \
|
|
"${GRPC_PROTO_BUF_RESULT}"; do
|
|
if [[ "${result}" != "success" ]]; then
|
|
echo "::error::release-gate: required job result was ${result}"
|
|
exit 1
|
|
fi
|
|
done
|
|
echo "release-gate: all current blocking quality jobs succeeded."
|