문제: src/sample-portfolio(311파일)와 src/Dockerfile.sample이 빌드 8곳,
registry, PR job, spotbugs 제외, 매뉴얼·leaf 문서 수십 곳에 얽혀 있다.
매뉴얼과 생성 명령이 예시를 맡게 된 뒤로 샘플은 유지 비용만 남았고,
문서 일부는 이미 없는 태스크(sampleOffTest)와 ArchUnit 규칙을 가리킨다.
고른 방법: 소유자 결정(2026-11-07)대로 샘플을 폴더째 지우고 역할은
옮기지 않는다. 샘플을 가리키던 것도 같은 변경에서 지운다.
- 빌드: registry 행, 루트 build.gradle의 샘플 태스크·의존·단계
(sampleWebContractCheck, :sample-portfolio:*, strict lane 단계),
app-bootstrap architectureTestRuntimeOnly, spotbugs 제외 3곳
- CI: ci-quality-gates.yml의 sample-portfolio job과 release-gate 칸
- 테스트: SampleRuntimeDefaultsContractTest, Dockerfile.sample 비교 테스트,
ArchUnit 규칙의 죽은 sample 패키지 제외. build-logic 테스트와
application-core 테스트의 가짜 이름은 example-app으로 바꾼다
- 문서: 매뉴얼 예시를 실제 코드(durable operation, identifier,
ErrorCodeRegistryMappingTest)로 바꾸고, 템플릿에 예가 없는 기법
(유일 제약 → 같은 409)은 규칙과 확인 방법만 적는다. 결정 색인의
샘플 전용 행은 "샘플과 함께 사라짐"으로 표시한다
버린 대안: 설계서 권장안(OpenAPI 스냅숏·웹 계약을 옮긴 뒤 삭제)은
소유자가 고르지 않았다.
위험·한계:
- 샘플 안에만 있던 검사(OpenAPI 스냅숏, Date 헤더, 가상 스레드 MDC
전파, 요청당 SQL 수 단언)가 함께 사라진다. 소유자가 남기라 하면
총괄이 따로 맡긴다.
- APP_CACHE_REDIS_ENABLED는 샘플이 읽지 않는 키라(설계서 가정과 다름)
지우지 않고 src/README.md 문장만 고쳤다. 제거 기한 2026-11-30은 그대로.
- docs/capability-status.md 「제거된 코드」 표와 docs/work/evidence.md의
샘플 경로는 이력이라 두었다.
검증(desktop, 트리 0525e14e, ~/t1-layout-logs/):
- ./gradlew :ci --warning-mode=fail rc=0 (502 executed, 83 from cache)
- :verifyStrictLaneStages --dry-run rc=0
- :app-bootstrap:documentContractTest rc=0
- -p build-logic check rc=0
- :verifyDependencyLocks rc=0
- python3 scripts/check-work-docs.py, 상대 링크 검사 rc=0
Refs: design-docs repo-structure/README.md 3.1, repo-structure/01-backend-layout.md 6.2
BREAKING CHANGE: src/sample-portfolio, src/Dockerfile.sample, 샘플 태스크와 job이 없어진다. 샘플을 고쳐 쓰던 파생 서비스는 병합 때 수정 대 삭제 충돌이 난다. docs/upgrade/2026-11-maturity-review.md B-49.
136 lines
6.3 KiB
YAML
136 lines
6.3 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
|
|
|
|
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
|
|
- 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 }}
|
|
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}" \
|
|
"${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."
|