Merge pull request 'ci: 백엔드 CI를 runner에서 초록으로 만들고 job 준비 비용을 줄인다' (#13) from claude/w2-be-ci-perf-e89fe7 into main
main / main (push) Successful in 35m56s
main / build-logic (push) Successful in 1m17s
main / configuration-cache (push) Successful in 2m3s
main / links (push) Successful in 18s
main / vulnerabilities (push) Successful in 57s
main / http3-experimental (push) Successful in 1m34s
main / jpa-postgresql (16) (push) Skipped
main / jpa-postgresql (17) (push) Skipped
main / jpa-postgresql (18) (push) Skipped
main / httpclient-transport (apache) (push) Skipped
main / httpclient-transport (jdk) (push) Skipped
main / redis-topology (7.2, cluster) (push) Skipped
main / redis-topology (7.2, sentinel) (push) Skipped
main / redis-topology (7.4, cluster) (push) Skipped
main / redis-topology (7.4, tls) (push) Skipped
main / redis-topology (8.2, standalone) (push) Skipped
main / compose-smoke (push) Skipped
main / redis-topology (7.2, standalone) (push) Skipped
main / redis-topology (7.4, sentinel) (push) Skipped
main / redis-topology (7.4, standalone) (push) Skipped
main / redis-topology (8.2, cluster) (push) Skipped
main / redis-topology (8.2, sentinel) (push) Skipped
main / redis-topology (8.2, tls) (push) Skipped
main / fileserver-nfs-ambiguity (push) Skipped
main / notification-chaos (push) Skipped
main / jpa-next (hibernate-8, Hibernate 8 is not resolvable from this build, so nothing has been compiled or run against it, Hibernate 8, *Hibernate8CompatibilityTest) (push) Skipped
main / jpa-next (jakarta-persistence-4, the JPA 4 API is not on any configuration this build resolves, so nothing has been compiled against it, Jakarta Persistence 4, *Jpa4CompatibilityTest) (push) Skipped
main / jpa-next (postgresql-19, no PostgreSQL 19 image is published yet, so no container of that major has ever been started by this lane, PostgreSQL 19, *PostgreSql19CompatibilityTest) (push) Skipped
main / object-storage-aws (push) Skipped
main / done (push) Skipped
main / performance (push) Skipped

This commit was merged in pull request #13.
This commit is contained in:
2026-11-12 09:43:41 +00:00
30 changed files with 500 additions and 167 deletions
@@ -11,9 +11,26 @@ description: >-
# and a pinned commit SHA, the only immutable action reference. The JDK is the version in
# .tool-versions under the name Temurin publishes it (`+10.0.LTS`); setup-java rejects `+10`.
# The JDK comes from the runner's cache when it can. Every job starts in a fresh container, so
# setup-java found an empty tool cache and downloaded the same 190 MB from GitHub in every job (about
# 22 of the 25 seconds a job spent before Gradle, and the step that failed with 504s). setup-java
# looks in the tool cache first, so restoring the directory it installs into is enough. Only a run
# on main saves the entry, the rule setup-gradle follows below: the key is fixed and the first entry
# saved under it stays, so a branch that saved it first would decide the JDK every later main run
# restores, without review.
runs:
using: composite
steps:
- if: ${{ github.ref == 'refs/heads/main' }}
uses: https://github.com/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # actions/cache@v4.3.0
with:
path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
key: jdk-temurin-21.0.11+10.0.LTS-${{ runner.os }}-${{ runner.arch }}
- if: ${{ github.ref != 'refs/heads/main' }}
uses: https://github.com/actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # actions/cache/restore@v4.3.0
with:
path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
key: jdk-temurin-21.0.11+10.0.LTS-${{ runner.os }}-${{ runner.arch }}
- uses: https://github.com/actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # actions/setup-java@v4.7.1
with:
distribution: temurin
+74 -43
View File
@@ -4,12 +4,13 @@
# On every push to main: the main stage, the container lanes, the build-logic tests, configuration
# cache, links and the dependency scan. Nightly (and on a manual run) also the jobs that need a matrix
# or an environment the stage tasks do not have, and last the performance lanes, which need a
# machine nothing else is using: the runner takes one job at a time, and `needs` puts them after
# every other heavy job (owner decision 2026-11-07).
# machine nothing else is using: the runner takes one job at a time, and the performance job is the
# last one in this file (owner decision 2026-11-07; the job says why not `needs`).
#
# Which lanes a stage means is decided by its Gradle task (build.gradle). The stage jobs
# (`main`, `integration`, `performance`) run it as one line; `verifyStrictLaneStages` fails a pull
# request that changes that line, its condition, or adds a way for it to pass quietly.
# Which lanes a stage means is decided by its Gradle task (build.gradle). The stage jobs (`main`
# for the main and integration stages, `performance`) run them as one line;
# `verifyStrictLaneStages` fails a pull request that changes that line, its condition, or adds a
# way for it to pass quietly.
name: main
on:
@@ -28,36 +29,34 @@ on:
permissions:
contents: read
# One group per trigger and branch. A newer push cancels the older push run on the same branch, and a
# newer nightly the older nightly, queued or running: the newer run tests everything the older one
# would have, and the runner is shared. A push leaves a nightly alone (the nightly has jobs a push
# does not), and a manual run cancels only an older manual run on the same branch. Gitea cancels the
# queued and blocked runs of a group even without cancel-in-progress; with it, the running ones too.
concurrency:
group: main-${{ github.ref }}
cancel-in-progress: false
group: main-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
env:
# Reuse would hand one lane a container another lane had already faulted.
TESTCONTAINERS_REUSE_ENABLE: "false"
jobs:
# Environment contract, full-boot qualification, public-path baseline, transport and messaging
# qualification, document-contract lanes, test-code analysis, the feature generator round trip.
# `--continue`: one failed lane must not hide the others.
# Both main-branch stages in one Gradle run (build.gradle `strictLaneStages` says why).
# mainCheck: environment contract, full-boot qualification, public-path baseline, transport and
# messaging qualification, document-contract lanes, test-code analysis, the feature generator
# round trip. integrationCheck: every integration-category strict lane, against real PostgreSQL,
# MongoDB, Kafka, MinIO, nginx and Toxiproxy; a lane joins by declaring `integration()`, no line
# here names it, and lanes that need an input this job does not have are explicitOnly and named
# in the output. `--continue`: one failed lane must not hide the others.
main:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :mainCheck --continue
# Every integration-category strict lane: real PostgreSQL, MongoDB, Kafka, MinIO, nginx, Toxiproxy.
# A lane joins by declaring `integration()`; no line here names it. Lanes that need an input this
# job does not have are explicitOnly and named in the output.
integration:
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :integrationCheck --continue
- run: ./gradlew :mainCheck :integrationCheck --continue
# The included build's own tests (TestKit for the convention plugins). The main task graph does
# not reach them; `ci` already runs every plugin they test (owner decision 2026-11-07: main stage).
@@ -84,9 +83,14 @@ jobs:
timeout-minutes: 15
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
# v2.9.0 runs lychee v0.24.2. v2.0.2 ran v0.16.1, which has no --root-dir at all; a relative
# --root-dir works from lychee v0.22.0. The job token is this Gitea's and means nothing to the
# GitHub hosts lychee would send it to, so none is passed, and Gitea has no job summary page.
- name: Check committed documentation links
uses: https://github.com/lycheeverse/lychee-action@7cd0af4c74a61395d455af97419279d86aafaede # lycheeverse/lychee-action@v2.0.2
uses: https://github.com/lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # lycheeverse/lychee-action@v2.9.0
with:
token: ""
jobSummary: false
args: >-
--no-progress
--root-dir .
@@ -187,11 +191,22 @@ jobs:
FILESERVER_NFS_TESTS: "true"
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
# The NFS server is the host kernel's nfsd, which a container cannot load: the runner's daemon
# has no /lib/modules. Without the module the server exits at once and the compose step only
# says "dependency failed to start" (runs 52 and 63). The runner host loads it once, at boot:
# echo nfsd | sudo tee /etc/modules-load.d/nfsd.conf && sudo modprobe nfsd
- name: The runner host has the nfsd kernel module
run: |
grep -qw nfsd /proc/filesystems || {
echo "fileserver-nfs: the runner host kernel has no nfsd module; load it on the host:" >&2
echo " echo nfsd | sudo tee /etc/modules-load.d/nfsd.conf && sudo modprobe nfsd" >&2
exit 1
}
- uses: ./.gitea/actions/setup-java-gradle
- run: docker compose -f adapter/outbound/fileserver/compose/nfs/compose.yml up -d --wait
- run: docker compose -f src/adapter/outbound/fileserver/compose/nfs/compose.yml up -d --wait
- run: ./gradlew :adapter:outbound:fileserver:test --tests '*NfsAmbiguityIntegrationTest'
- if: ${{ always() }}
run: docker compose -f adapter/outbound/fileserver/compose/nfs/compose.yml down -v
run: docker compose -f src/adapter/outbound/fileserver/compose/nfs/compose.yml down -v
# The notification fault, race and restart suites run again on their own: one green run says least
# about exactly these.
@@ -202,12 +217,13 @@ jobs:
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- name: Ambiguity and fault harness
run: ./gradlew :adapter:outbound:notification:test --tests '*ChaosSecurity*' --tests '*CrossProviderContractSuite*' --rerun
- name: Concurrency and rotation races
run: ./gradlew :adapter:outbound:notification:test --tests '*ConcurrencyTest' --tests '*ProviderRuntimeStateTest' --rerun
- name: Restart recovery and lease fencing (real PostgreSQL)
run: ./gradlew :adapter:outbound:persistence-jpa:jpaPlatformContractTest :adapter:outbound:persistence-jpa:jpaPlatformFailureTest
# One invocation for the four suites. A second `test --rerun` deletes the first one's result
# files, and the check below then finds no results for the suites that ran first.
- name: Ambiguity and fault harness, concurrency and rotation races
run: >-
./gradlew :adapter:outbound:notification:test --rerun
--tests '*ChaosSecurity*' --tests '*CrossProviderContractSuite*'
--tests '*ConcurrencyTest' --tests '*ProviderRuntimeStateTest'
# A filter that matches nothing passes. Each filter above names classes that exist today; if
# one is renamed the job fails rather than quietly stops covering it.
- name: Every named suite actually ran
@@ -218,6 +234,8 @@ jobs:
exit 1
}
done
- name: Restart recovery and lease fencing (real PostgreSQL)
run: ./gradlew :adapter:outbound:persistence-jpa:jpaPlatformContractTest :adapter:outbound:persistence-jpa:jpaPlatformFailureTest
# Advisory probes for the next JPA, Hibernate and PostgreSQL majors. The targets are not resolvable
# yet, so each records NOT_EXECUTABLE with its reason instead of implying compatibility evidence.
@@ -276,21 +294,34 @@ jobs:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- run: bash scripts/run-compose-runtime-smoke.sh --matrix src/bootstrap/app/compose-lanes/compose-profile-contracts.json
# Not a gate: the pull-request stage once more, on main, so that a pull request finds main's
# results in the build cache and runs only what its change touches. setup-gradle keys its cache by
# job name and a job first restores the newest entry of its own name, so this job is named after
# pr.yml's one job. Main saves, a pull request only reads (.gitea/actions/setup-java-gradle).
# Nightly and manual runs only: a push does not wait for it, and a pull request after a day's
# merges reruns the modules those changed.
done:
if: ${{ github.event_name != 'push' }}
runs-on: ubuntu-latest
timeout-minutes: 75
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :prCheck
# Load, slow-client, shutdown, pool and resource bounds. Last, after every other heavy job of the
# run, so the bounds are measured on a runner that is not building something else.
#
# Last by position, not by `needs`. This Gitea (1.27) decides a job's `if` on the server once the
# jobs it needs finish, and it left this job Blocked in every run it reached: 2.5 days on a manual
# run (63), and on every push, where the nightly jobs it waited for are skipped (79). A throwaway
# workflow started by hand reproduced it with nothing else in it (2026-11-11, three variants):
# every job with both `needs` and `if` stayed Blocked, whatever the `if` said and whether or not
# the jobs it needed had passed. A job without `needs` is queued when the run starts, and the one
# runner (capacity 1) takes a run's jobs in the order they were created, which is their order in
# this file. A second runner would let this job overlap the others; it would still run.
performance:
needs:
- main
- integration
- build-logic
- configuration-cache
- jpa-postgresql
- httpclient-transport
- redis-topology
- fileserver-nfs-ambiguity
- notification-chaos
- compose-smoke
if: ${{ !cancelled() && github.event_name != 'push' }}
if: ${{ github.event_name != 'push' }}
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
+15 -29
View File
@@ -1,5 +1,5 @@
# Pull-request stage. Everything here blocks a merge, and the branch protection requires one check:
# `done`. Which leaves, lanes and checks the stage means is decided by the Gradle task `prCheck`
# `done`, which is the whole stage. Which leaves, lanes and checks the stage means is decided by the Gradle task `prCheck`
# (build.gradle), not here; `verifyStrictLaneStages` fails when this job stops running it as one
# line (docs/work/reference/gates.md).
#
@@ -14,6 +14,9 @@ on:
permissions:
contents: read
# One group per pull request: the ref of a pull_request run is refs/pull/<number>/head. A push to the
# pull request cancels the run of the head it replaces, queued or running, so the one runner spends
# its slot on the head that can merge.
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
@@ -22,39 +25,22 @@ env:
TESTCONTAINERS_REUSE_ENABLE: "false"
jobs:
gradle:
# The whole stage is this one job, and it is the one required check (`pr / done`). Separate
# gradle, scan and `done` jobs made `done` wait for the runner a second time: a job that `needs`
# others joins the runner's queue only when they finish, behind everything queued meanwhile, and
# on 2026-11-08 that put a finished pull request's `done` three hours behind a manual main run.
# One job also pays the checkout, JDK and Gradle start once instead of twice.
#
# The scan runs last. A Gradle failure therefore hides the scan's result until it is fixed; the
# main stage and the nightly run scan the same tree again.
done:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 75
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :prCheck
# Plans every stage (--dry-run: nothing executes), so it cannot be a dependency of prCheck.
- run: ./gradlew :verifyStrictLaneStages --dry-run
# Known High and Critical vulnerabilities and CISA KEV matches in the dependency tree.
vulnerabilities:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
# Known High and Critical vulnerabilities and CISA KEV matches in the dependency tree.
- run: bash scripts/ci/trivy-scan.sh filesystem
# The one required check. A job added above joins `needs` here, and the branch protection does
# not change.
done:
needs: [gradle, vulnerabilities]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Require every job of this stage to have succeeded
env:
RESULTS: ${{ needs.gradle.result }} ${{ needs.vulnerabilities.result }}
run: |
for result in ${RESULTS}; do
if [ "${result}" != success ]; then
echo "pr / done: a job of this stage ended with ${result}"
exit 1
fi
done
echo "pr / done: every job of this stage succeeded."
+21 -26
View File
@@ -38,38 +38,29 @@ jobs:
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :releaseCheck
# Every web lane `check` cannot reach. webAdvancedTest selects tests `:web-advanced:test` already
# runs; what it adds is failing closed when its tag selects nothing.
web-stable-release-gate:
# The web, WebSocket and HTTP client release lanes, one Gradle run with --continue. They were three
# jobs, and each paid checkout, JDK, Gradle start and the compile of the modules it shares with the
# others (about two minutes of a 2.5-minute job, release run 62); --continue still reports every
# lane that fails. The JPA and fileserver jobs below stay jobs of their own: their names and the
# PostgreSQL matrix are what JpaReleaseRenderingTest and the fileserver support matrix read.
# webAdvancedTest selects tests `:web-advanced:test` already runs; what it adds is failing closed
# when its tag selects nothing.
stable-release-gates:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: ./gradlew :adapter:inbound:web:systemTest :adapter:inbound:web:webJettyCompatTest :adapter:inbound:web-advanced:webAdvancedTest
websocket-stable-release-gate:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 120
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: >-
./gradlew
./gradlew --continue
:adapter:inbound:web:systemTest
:adapter:inbound:web:webJettyCompatTest
:adapter:inbound:web-advanced:webAdvancedTest
:adapter:inbound:websocket:test
:adapter:inbound:websocket:systemTest
:adapter:inbound:websocket:websocketJettyTest
:adapter:inbound:websocket:websocketNginxTest
:adapter:inbound:websocket:websocketTransportQualificationTest
httpclient-release-gate:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
- uses: ./.gitea/actions/setup-java-gradle
- run: >-
./gradlew
:adapter:outbound:httpclient:test
:adapter:outbound:httpclient:spring62ApiSurfaceScan
:adapter:outbound:httpclient:spring70CompatibilityTest
@@ -149,9 +140,7 @@ jobs:
app-image-release:
needs:
- release
- web-stable-release-gate
- websocket-stable-release-gate
- httpclient-release-gate
- stable-release-gates
- httpclient-documentation
- jpa-release-gate
- jpa-registry-and-docs
@@ -235,10 +224,14 @@ jobs:
# Signs the pushed digest with the release key pair and verifies the signature before the release
# counts as done, so a signature a cluster would reject fails here rather than at admission. A job
# of its own, so the private key exists only in a job that checks nothing out and builds nothing.
#
# The tag condition is on each step, not on the job. This Gitea (1.27) leaves a job that has both
# `needs` and `if` Blocked (main.yml `performance` says how that was found), so a manual run never
# finished: the job waited forever. With no job `if` it starts after app-image-release, and on a
# manual run every step is skipped.
app-image-signing:
needs:
- app-image-release
if: ${{ github.ref_type == 'tag' }}
runs-on: ubuntu-latest
timeout-minutes: 30
env:
@@ -248,6 +241,7 @@ jobs:
# lines of the official v3.1.3 cosign_checksums.txt. The checksum file is fetched again and must
# still carry the pinned line, so a re-published asset fails the job.
- name: Install pinned cosign
if: ${{ github.ref_type == 'tag' }}
run: |
set -euo pipefail
readonly COSIGN_VERSION='3.1.3'
@@ -271,6 +265,7 @@ jobs:
chmod 0755 "${install_dir}/cosign"
echo "${install_dir}" >> "${GITHUB_PATH}"
- name: Sign the image digest and verify the signature
if: ${{ github.ref_type == 'tag' }}
env:
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
+19 -4
View File
@@ -1,16 +1,16 @@
# 의존성 취약점 정책
이 정책을 강제하는 것은
[`scripts/ci/trivy-scan.sh`](../scripts/ci/trivy-scan.sh)(pull request·main·nightly workflow의
`vulnerabilities` job과 release workflow의 이미지 job이 부른다),
[`scripts/ci/trivy-scan.sh`](../scripts/ci/trivy-scan.sh)(pull request workflow의 `done` job, main·nightly
workflow의 `vulnerabilities` job, release workflow의 이미지 job이 부른다),
[`../.trivyignore.yaml`](../.trivyignore.yaml), CODEOWNERS,
[`../renovate.json`](../renovate.json)이다.
## 실행 위치와 플랫폼 경계
workflow는 `.gitea/workflows`의 `pr.yml`·`main.yml`·`release.yml`이고 Gitea Actions(desktop runner)에서 돈다.
`vulnerabilities` job은 pull request, `main` push, 매일 예약 실행, 손으로 부른 실행에서 돈다. pull request의
필수 검사 `pr / done`이 그 결과를 포함한다.
검사는 pull request(필수 검사 `pr / done`의 마지막 step), `main` push, 매일 예약 실행, 손으로 부른 실행에서
돈다.
외부 action은 확인한 전체 커밋 SHA로만 실행한다. 리뷰를 위해 같은 줄 주석에 바뀌지 않는 릴리스 태그를
남긴다. 스캐너는 action이 아니라 체크섬을 고정한 릴리스 실행 파일이다.
@@ -21,6 +21,21 @@ GitHub dependency review와 dependency submission은 GitHub.com API에만 있어
이미지 빌드·스캔, SBOM, 서명, 태그 릴리스는 `.gitea/workflows/release.yml`이 맡는다. 이미지 스캔도 같은
스크립트(`image` 모드)와 같은 예외 파일을 쓴다.
릴리스 이미지(2026-11-11 소유자 결정):
- 기본 이미지는 고칠 수 있는 최신 digest로 둔다(`Dockerfile`, 지금 `eclipse-temurin:21-jre-noble`).
OS 패키지의 High/Critical도 아래 표대로 막는다. 최신 digest가 Ubuntu 보안 업데이트보다 늦을 수 있어
이미지를 만들 때 `apt-get upgrade`로 이미 나온 수정을 받는다(2026-11-12: apt CVE-2026-109518).
- 아직 고친 버전이 없는 High/Critical만 `.trivyignore.yaml`에 이유와 `expired_at`을 달아 둔다.
- 라이선스: 배포하는 의존성의 금지 라이선스(Trivy CRITICAL)만 막는다. 배포하는 것은 기본 조립의 jar이므로
`src/bootstrap/app/gradle.lockfile`의 `runtimeClasspath` 항목을 본다. 그 밖의 라이선스 결과(OS 패키지,
빌드 도구 SpotBugs·Checkstyle·Error Prone, 시험 라이브러리, restricted 등급)는 보고만 한다. 배포판의 GPL
패키지는 이 애플리케이션의 이용 조건이 아니다.
- 이 라이선스 판정은 pull request의 `done` job이 빌드한 뒤에 돈다. Trivy는 같은 기계의 Gradle 캐시에서만
lockfile의 라이선스를 읽고, 이미지 안 jar의 라이선스는 읽지 못한다. 예전의 따로 된 검사 job에는 캐시가
없어 라이선스 검사가 라이선스를 한 번도 보지 못했다(2026-11-12 확인). 캐시가 없으면 건너뛴다고 적고,
캐시가 있는데 라이선스를 하나도 읽지 못하면 실패한다.
## 심각도와 대응
| 심각도 | CI 처리 | 고칠 기한 |
+24 -7
View File
@@ -23,8 +23,9 @@ ARG GIT_SHA
ARG SOURCE_URL
# ---- Stage 1: builder -------------------------------------------------------
# Uses the full JDK only in the build stage, never in the final image.
FROM eclipse-temurin:21-jdk-jammy@sha256:801b7e1a9c4befaf82bf9a2a58025ef43a7694bbc84779187ad0524d84742772 AS builder
# Uses the full JDK only in the build stage, never in the final image. Same Ubuntu release as the
# runtime stage below.
FROM eclipse-temurin:21-jdk-noble@sha256:114cabb73033ca4ce7ceec3deb62396bc1b716282bae051ed3c1d82e38fcab2d AS builder
ARG RELEASE_VERSION
ARG GIT_SHA
@@ -104,8 +105,11 @@ RUN java -Djarmode=tools \
# ---- Stage 2: runtime image -------------------------------------------------
# JRE-only slim image (D3: no full JDK in production image).
# Uses eclipse-temurin:21-jre-jammy — the Adoptium-supported JRE variant.
FROM eclipse-temurin:21-jre-jammy@sha256:199aebeb3adcde4910695cdebfe782ada38dadb6cc8013159b58d3724451befd AS runtime
# Uses eclipse-temurin:21-jre-noble (Ubuntu 24.04), the Adoptium-supported JRE variant. The release
# scan fails on a High or Critical finding that has a fix (2026-11-11 owner decision), and jammy
# (22.04) carried seven OS findings with a fix (apt, openssl, libbrotli1, ...). When the scan
# reports one again, the fix is a newer digest of this same tag.
FROM eclipse-temurin:21-jre-noble@sha256:0eda5830ed7b669abc246a8dc520ea8a23cab06f9a8d4b6964109e2f2394e46f AS runtime
ARG BUILD_VERSION
ARG GIT_SHA
@@ -120,8 +124,18 @@ LABEL org.opencontainers.image.title="caskeleton" \
# A release image without source/version metadata is not an artifact this contract permits.
RUN test -n "${BUILD_VERSION}" && test -n "${GIT_SHA}" && test -n "${SOURCE_URL}"
# ---- OS security updates ----------------------------------------------------
# The release scan fails on a High or Critical OS finding that has a fix. The newest Temurin digest
# can lag the Ubuntu security updates: on 2026-11-12 it carried apt 2.8.3, and the scan failed on
# CVE-2026-109518, fixed in 2.8.4ubuntu0.1. The image takes the published updates when it is built
# and drops the package lists again. The digest above stays the starting point; what this adds is
# whatever the archive has fixed since that digest was made.
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends upgrade \
&& rm -rf /var/lib/apt/lists/*
# ---- Locale / timezone (D4) -------------------------------------------------
# C.UTF-8 is available in eclipse-temurin:21-jre-jammy without installing extra packages.
# C.UTF-8 is available in eclipse-temurin:21-jre-noble without installing extra packages.
# Do NOT use en_US.UTF-8 — it requires the locales package and may not exist in a slim image.
ENV TZ=UTC \
LANG=C.UTF-8 \
@@ -157,7 +171,10 @@ ENV JAVA_TOOL_OPTIONS="\
RUN mkdir -p /var/tmp/heap && chmod 1777 /var/tmp/heap
# ---- Non-root user (D3) -----------------------------------------------------
RUN groupadd --system --gid 1000 app \
# The noble base image ships a login user `ubuntu` with uid and gid 1000, which are the app user's.
# It is removed first, so uid 1000 is this account and nothing else.
RUN userdel --remove ubuntu \
&& groupadd --system --gid 1000 app \
&& useradd --system --uid 1000 --gid app --no-create-home --shell /usr/sbin/nologin app
# No data directory and no VOLUME. The image is the shipped composition, which keeps nothing on
@@ -204,7 +221,7 @@ EXPOSE 8080 9001
# Kubernetes ignores HEALTHCHECK and uses its own probes against the same path; this exists for
# docker and Compose.
#
# wget is present in eclipse-temurin:21-jre-jammy, so nothing is installed for it.
# wget is present in eclipse-temurin:21-jre-noble, so nothing is installed for it.
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD wget --no-verbose --tries=1 --spider \
http://localhost:9001/actuator/health/readiness || exit 1
+1 -1
View File
@@ -26,7 +26,7 @@ registry, settings, build-logic, 루트 라이프사이클이 정하는 것을
## 단계 job의 모양
- `verifyStrictLaneStages --dry-run`(PR)은 `explicitOnly`가 아닌 strict lane마다 `build.gradle`의 `strictLaneStages`가 선언한 단계 태스크 하나의 계획에 들어 있는지 본다(그래프 검사).
- 단계마다 선언한 workflow job은 step의 `run: ./gradlew <단계> <옵션>` 줄을 가지고, 다른 step `run:`도 셸 문법 없는 `./gradlew` 한 줄이며, 선언 밖의 `if:`, 선언한 조건이 `!cancelled()`·`always()`가 아닌데 `needs:`, `continue-on-error`·`shell:`·`defaults:`, 따옴표 키·flow 형식, 이 빌드 밖의 `working-directory`가 없다. workflow는 선언한 이벤트로, 선언한 필터 한 줄만 달고 시작하고, PR 단계 job 하나가 이 검사를 돌린다(형식 검사, 셸을 해석하지 않는다).
- 단계마다 선언한 workflow job은 step의 `run: ./gradlew <단계> <옵션>` 줄을 가지고(같은 job을 쓰는 단계는 선언한 `line`대로 한 줄을 나눠 쓸 수 있다: `./gradlew :mainCheck :integrationCheck --continue`), 다른 step `run:`도 셸 문법 없는 `./gradlew` 한 줄이나 `bash scripts/<이름>.sh` 한 줄이며, 선언 밖의 `if:`, 선언한 조건이 `!cancelled()`·`always()`가 아닌데 `needs:`, `continue-on-error`·`shell:`·`defaults:`, 따옴표 키·flow 형식, 이 빌드 밖의 `working-directory`가 없다. workflow는 선언한 이벤트로, 선언한 필터 한 줄만 달고 시작하고, PR 단계 job 하나가 이 검사를 돌린다(형식 검사, 셸을 해석하지 않는다).
- 단계를 더하거나 job을 바꾸면 `strictLaneStages`의 `stage` 줄과 workflow를 같은 커밋에서 고친다.
## 테스트
@@ -13,7 +13,7 @@ import org.gradle.api.file.DirectoryProperty;
* <pre>
* strictLaneStages {
* workflowDirectory = layout.projectDirectory.dir('.gitea/workflows')
* stage ':prCheck', workflow: 'pr.yml', event: 'pull_request', job: 'gradle'
* stage ':prCheck', workflow: 'pr.yml', event: 'pull_request', job: 'done'
* stage ':mainCheck', workflow: 'main.yml', event: 'push', filter: 'branches: [main]',
* job: 'main', options: '--continue'
* stage ':performanceCheck', workflow: 'main.yml', event: 'schedule', job: 'performance',
@@ -21,7 +21,10 @@ import org.gradle.api.file.DirectoryProperty;
* }
* </pre>
*
* <p>The job runs the stage as {@code ./gradlew <stage> <options>} on a line of its own. {@code
* <p>The job runs the stage as {@code ./gradlew <stage> <options>} on a line of its own. Stages
* that share a job may share that line: each then declares the same {@code line}, the stage tasks
* in the order the line names them, and the line is {@code ./gradlew <line> <options>}. One Gradle
* run compiles once and lets the stages' work overlap. {@code
* filter} is the one line under the event (none if absent; a schedule takes its cron lines), and
* {@code condition} is the job's {@code if:}: both are written out here so that changing when a
* stage runs is a reviewed change of the build rather than an edit to a workflow. Single quotes,
@@ -45,7 +48,14 @@ public abstract class StrictLaneStagesExtension {
job.get("filter"),
required(job, "job", taskPath),
job.getOrDefault("options", ""),
job.get("condition"));
job.get("condition"),
job.getOrDefault("line", taskPath));
List<String> lineTasks = List.of(stage.line().split(" ", -1));
if (!lineTasks.contains(taskPath)
|| !lineTasks.stream().allMatch(task -> task.startsWith(":") && task.length() > 1)) {
throw new GradleException(
"stage " + taskPath + ": line '" + stage.line() + "' must name task paths, this one too");
}
for (String option : stage.options().split(" ", -1)) {
if (!option.isEmpty() && !STAGE_OPTIONS.contains(option)) {
throw new GradleException(
@@ -75,9 +85,10 @@ public abstract class StrictLaneStagesExtension {
String filter,
String job,
String options,
String condition) {
String condition,
String line) {
String command() {
return options.isEmpty() ? "./gradlew " + taskPath : "./gradlew " + taskPath + " " + options;
return options.isEmpty() ? "./gradlew " + line : "./gradlew " + line + " " + options;
}
}
}
@@ -33,8 +33,9 @@ import org.gradle.api.execution.TaskExecutionGraph;
* declared stage. The plan is Gradle's own: this task depends on the stages, so its {@code
* --dry-run} builds the real plan, and the check reads it when the graph is ready.
* <li><b>Form.</b> Each stage names the workflow job that runs it, and that job has one shape.
* Its steps' {@code run:} lines are single {@code ./gradlew} commands with no shell syntax, and
* one of them is {@code ./gradlew <stage> <options>}. It has no {@code if:} but the declared
* Its steps' {@code run:} lines are single {@code ./gradlew} commands or single {@code bash
* scripts/<name>.sh} commands with no shell syntax, and one of them is {@code ./gradlew
* <stage> <options>}. It has no {@code if:} but the declared
* condition, no {@code needs:} unless that condition runs it after a skipped or failed job, no
* {@code continue-on-error}, {@code shell:} or {@code defaults:}, no quoted keys or flow
* mappings, and every {@code working-directory} in it or in the workflow's {@code defaults}
@@ -59,6 +60,9 @@ public final class StrictLaneStagesPlugin implements Plugin<Project> {
private static final Pattern STEP_RUN = Pattern.compile("^(?: {6}- | {8})run: (.*?)\\s*$");
/** One Gradle invocation and nothing a shell would read as more than words. */
private static final Pattern GRADLE_LINE = Pattern.compile("^\\./gradlew(?: [\\w:.=-]+)+$");
/** One repository script and plain words: its own step, so its exit code fails the job. */
private static final Pattern REPOSITORY_SCRIPT =
Pattern.compile("^bash scripts/[\\w./-]+\\.sh(?: [\\w:.=/-]+)*$");
private static final Pattern IF = Pattern.compile("^(\\s*)(?:-\\s+)?if:\\s*(.*?)\\s*$");
private static final Pattern WORKING_DIRECTORY =
Pattern.compile("^\\s*(?:-\\s+)?working-directory:\\s*(.*?)\\s*$");
@@ -252,8 +256,13 @@ public final class StrictLaneStagesPlugin implements Plugin<Project> {
Matcher run = STEP_RUN.matcher(line);
if (!run.matches()) {
problems.add(where + " has `" + line.strip() + "`, which is not a step's command");
} else if (!GRADLE_LINE.matcher(run.group(1)).matches()) {
problems.add(where + " runs `" + run.group(1) + "`, which is not one ./gradlew line");
} else if (!GRADLE_LINE.matcher(run.group(1)).matches()
&& !REPOSITORY_SCRIPT.matcher(run.group(1)).matches()) {
problems.add(
where
+ " runs `"
+ run.group(1)
+ "`, which is not one ./gradlew line or one repository script");
} else {
runsStage |= run.group(1).equals(stage.command());
}
@@ -107,6 +107,24 @@ class StrictLaneStagesFunctionalTest {
assertThat(result.getOutput()).contains("every strict lane is in a stage its workflow job runs");
}
@Test
@DisplayName("단계 job에 저장소 스크립트 한 줄 step이 있어도 통과한다")
void passesWithARepositoryScriptStepBesideTheStageLine() throws Exception {
// given
workflow(
"pr.yml",
PR_WORKFLOW.replace(
" - run: ./gradlew :verifyStrictLaneStages --dry-run\n",
" - run: ./gradlew :verifyStrictLaneStages --dry-run\n"
+ " - run: bash scripts/ci/trivy-scan.sh filesystem\n"));
// when
BuildResult result = runner(":verifyStrictLaneStages", "--dry-run").build();
// then
assertThat(result.getOutput()).contains("every strict lane is in a stage its workflow job runs");
}
@Test
@DisplayName("① 어느 단계에도 들지 않는 strict lane을 더하면 그 lane 이름으로 실패한다")
void failsNamingALaneThatNoStageReaches() throws Exception {
@@ -189,6 +207,21 @@ class StrictLaneStagesFunctionalTest {
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n",
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n - run: exit 0\n",
"pr.yml job gradle runs `exit 0`, which is not one ./gradlew line"),
Arguments.of(
"셸로 이은 저장소 스크립트",
"pr.yml",
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n",
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n"
+ " - run: bash scripts/ci/scan.sh filesystem || true\n",
"pr.yml job gradle runs `bash scripts/ci/scan.sh filesystem || true`, which is not one"
+ " ./gradlew line or one repository script"),
Arguments.of(
"저장소 밖 스크립트",
"pr.yml",
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n",
"- run: ./gradlew :verifyStrictLaneStages --dry-run\n"
+ " - run: bash -c 'exit 0'\n",
"pr.yml job gradle runs `bash -c 'exit 0'`, which is not one ./gradlew line"),
Arguments.of(
"셸로 이은 명령",
"pr.yml",
@@ -325,6 +358,54 @@ class StrictLaneStagesFunctionalTest {
assertThat(result.getOutput()).contains("run it with --dry-run");
}
@Test
@DisplayName("같은 job을 쓰는 두 단계는 선언한 line대로 한 줄을 나눠 쓸 수 있다")
void twoStagesOfOneJobMayShareTheLineTheyDeclare() throws Exception {
// given
shareTheIntegrationLineWithAMainStage(":mainCheck :integrationCheck");
workflow(
"main.yml",
MAIN_WORKFLOW.replace(
"run: ./gradlew :integrationCheck --continue",
"run: ./gradlew :mainCheck :integrationCheck --continue"));
// when
BuildResult result = runner(":verifyStrictLaneStages", "--dry-run").build();
// then
assertThat(result.getOutput()).contains("every strict lane is in a stage its workflow job runs");
}
@Test
@DisplayName("선언한 한 줄 대신 단계마다 따로 된 줄이 있으면 두 단계 모두 실패한다")
void aSharedLineDeclaredButNotRunFailsBothStages() throws Exception {
// given
shareTheIntegrationLineWithAMainStage(":mainCheck :integrationCheck");
// when
BuildResult result = runner(":verifyStrictLaneStages", "--dry-run").buildAndFail();
// then
assertThat(result.getOutput())
.contains(
"main.yml job integration has no line `run: ./gradlew :mainCheck :integrationCheck"
+ " --continue`");
}
@Test
@DisplayName("단계 자신을 부르지 않는 line은 설정 단계에서 거절한다")
void refusesALineThatLeavesItsOwnStageOut() throws Exception {
// given
shareTheIntegrationLineWithAMainStage(":mainCheck");
// when
BuildResult result = runner(":verifyStrictLaneStages", "--dry-run").buildAndFail();
// then
assertThat(result.getOutput())
.contains("stage :integrationCheck: line ':mainCheck' must name task paths, this one too");
}
@Test
@DisplayName("단계 줄의 옵션이 정해진 것 밖이면 설정 단계에서 거절한다")
void refusesAStageOptionThatChangesWhatRuns() throws Exception {
@@ -402,6 +483,24 @@ class StrictLaneStagesFunctionalTest {
.formatted(lanes));
}
/** Declares a `:mainCheck` stage on the integration job, both stages naming {@code line}. */
private void shareTheIntegrationLineWithAMainStage(String line) throws Exception {
Files.writeString(
gradleRoot.resolve("build.gradle"),
Files.readString(gradleRoot.resolve("build.gradle"))
.replace(
"tasks.register('integrationCheck')",
"tasks.register('mainCheck')\ntasks.register('integrationCheck')")
.replace(
"job: 'integration', options: '--continue', condition: '${{ !cancelled() }}'",
"job: 'integration', options: '--continue', condition: '${{ !cancelled() }}',"
+ " line: ':mainCheck :integrationCheck'\n"
+ " stage ':mainCheck', workflow: 'main.yml', event: 'push',"
+ " filter: 'branches: [main]', job: 'integration', options: '--continue',"
+ " condition: '${{ !cancelled() }}', line: ':mainCheck :integrationCheck'")
.replace("line: ':mainCheck :integrationCheck'\n", "line: '" + line + "'\n"));
}
private void workflow(String name, String content) throws Exception {
Files.writeString(repository.resolve(".gitea/workflows").resolve(name), content);
}
+9 -5
View File
@@ -242,13 +242,17 @@ tasks.register('prCheck') {
// nightly, after the other heavy jobs, on a runner nothing else is using (owner decision 2026-11-07).
strictLaneStages {
workflowDirectory = layout.projectDirectory.dir('.gitea/workflows')
stage ':prCheck', workflow: 'pr.yml', event: 'pull_request', job: 'gradle'
stage ':prCheck', workflow: 'pr.yml', event: 'pull_request', job: 'done'
// One job and one Gradle run for both main-branch stages: it compiles once, and the
// main stage's analysis and the feature generator's nested build run while the integration
// lanes take turns on the one real-server slot. Two jobs spent about 34 runner minutes on a push
// (run 79), two of them compiling the same modules twice.
stage ':mainCheck', workflow: 'main.yml', event: 'push', filter: 'branches: [main]', job: 'main',
options: '--continue'
stage ':integrationCheck', workflow: 'main.yml', event: 'push', filter: 'branches: [main]', job: 'integration',
options: '--continue'
options: '--continue', line: ':mainCheck :integrationCheck'
stage ':integrationCheck', workflow: 'main.yml', event: 'push', filter: 'branches: [main]', job: 'main',
options: '--continue', line: ':mainCheck :integrationCheck'
stage ':performanceCheck', workflow: 'main.yml', event: 'schedule', job: 'performance', options: '--continue',
condition: '${{ !cancelled() && github.event_name != \'push\' }}'
condition: '${{ github.event_name != \'push\' }}'
stage ':releaseCheck', workflow: 'release.yml', event: 'push', filter: 'tags: ["v*"]', job: 'release'
}
+7
View File
@@ -56,6 +56,13 @@ Redis ACL 파일은 완전한 `user` 줄만 받는다. 주석도, 줄 이어 쓰
모두 이 폴더를 읽기 전용으로 마운트한다. 복사본을 두지 않는다. 이 줄들의 두 번째 사본은 비밀번호나 key
패턴이 따로 어긋날 두 번째 자리다.
예외 하나: Redis 8 이상의 구성 lane은 `scripts/ci/redis-topology.sh`가 이 파일에서 만든 사본을 마운트한다.
admin 줄 끝에 `+ft.info` 하나만 더한다. Redis 8에 들어 있는 search 모듈의 `FT.INFO`를 명령 정책 catalog가
8.0부터 admin 진단(`ADMIN_ONLY`)으로 두기 때문이다. Redis 7은 자기에게 없는 명령을 부르는 ACL 규칙이 있으면
시작하지 않으므로, 이 파일 자체에는 그 줄을 넣을 수 없다. 사본은 실행할 때마다 이 파일에서 다시 만들어 어긋날
수 없고, 커밋하지 않는다(`build/` 아래). Redis 8에 같은 admin 계정을 두는 배포는 자기 ACL 파일에
`+ft.info`를 더한다.
Compose lane은 애플리케이션을 `ca-skeleton-application`과 `ca-skeleton-application-advanced`로 연결한다.
연결은 `secret://<account>@environment/<variable>` 참조를 거치고, 그 변수가 위 fixture 비밀번호를 가진다.
여기의 모든 계정이 `~prod:*`로 묶여 있어서, lane은 Redis namespace 환경을 `prod`로 두고 돈다.
+2 -2
View File
@@ -197,8 +197,8 @@ drift하기 시작하면 그때 자동화한다. 진짜 항목을 상대로, 진
> `.github/scripts/verify-gate-matrix.sh`(568줄)는 삭제했다. 그 표는 이미 두 그래프에 있는 정보의
> 세 번째 사본이었고, 검사기는 세 사본을 서로 같게 유지하는 일을 했다. 결과적으로 체크 하나를
> 추가하려면 Gradle · workflow · 표 · 검사기 기대값 · Java 계약 테스트 다섯 곳을 같이 고쳐야 했다.
- **워크플로.** `.gitea/workflows/`의 세 파일이다. `pr.yml`의 `done` job이 PR 단계의 모든 job(`gradle`:
`./gradlew :prCheck`와 `verifyStrictLaneStages --dry-run`, `vulnerabilities`: Trivy)을 모으는 단일 필수 검사다.
- **워크플로.** `.gitea/workflows/`의 세 파일이다. `pr.yml`의 `done` job 하나가 PR 단계 전체(`./gradlew :prCheck`,
`verifyStrictLaneStages --dry-run`, Trivy)이고 단일 필수 검사다. job을 나누면 뒤 job이 runner 대기열 맨 뒤로 간다.
`main.yml`이 main 단계(`mainCheck`·`integrationCheck`·build-logic 시험·configuration cache·링크)와
nightly(행렬 job, compose smoke, 마지막에 `performanceCheck`)를, `release.yml`이 태그 단계를 돌린다.
무엇을 돌릴지는 Gradle 단계 태스크가 정하고, `verifyStrictLaneStages`가 단계 job의 모양을 지킨다.
+6 -6
View File
@@ -27,21 +27,21 @@ lanes and CI; it is not a deployment artifact.
| Capability | Enabled key (property / env, default) | IMPLEMENTED | WIRED | QUALIFIED | Evidence |
| --- | --- | --- | --- | --- | --- |
| Relational persistence (JPA/PostgreSQL) | `ca-skeleton.persistence-jpa.enabled` / `APP_PERSISTENCE_JPA_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:persistence-jpa')`) | yes | Not in the default composition. The one line brings everything — its own `AutoConfiguration.imports` (`PersistenceJpaAutoConfiguration`, `PersistenceJpaRuntimeConfig`, `JpaStartupAutoConfiguration`), its environment handling (`JpaActivationEnvironmentPostProcessor`, `spring.factories`: readiness `db` while on; with `false` it also excludes Boot's JDBC, Hibernate, Spring Data JPA and Flyway auto-configuration, so no DataSource is bound), the startup guards (Flyway strategy, datasource/OSIV/DDL/pool/TLS/vendor checks, exit codes unchanged) and its settings (`config/module-defaults/persistence-jpa.yml`). `persistence-jpa:PersistenceJpaCapabilityAssemblyTest` proves the module assembles on its own; the `postgresql*IntegrationTest` readiness lanes, run by `integration-main.yml` → `integration-check` (`:integrationCheck`), qualify it against PostgreSQL. `bootRunH2` adds the module to its own classpath only. |
| Document persistence (MongoDB) | `ca-skeleton.persistence-mongo.enabled` / `APP_PERSISTENCE_MONGO_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:persistence-mongo')`) | yes | On when present; `false` also excludes Boot's Mongo auto-configuration (`MongoCapabilityActivationTest`). The connection-source rule (`SPRING_MONGODB_URI` or the selected profile's `uri-secret`) is checked by the module's own `MongoDefaultsEnvironmentPostProcessor`. Six container lanes (`mongoReplicaSetTest`, `mongoFailoverTest`, …), run by `integration-main.yml` → `integration-check` (`:integrationCheck`) |
| Relational persistence (JPA/PostgreSQL) | `ca-skeleton.persistence-jpa.enabled` / `APP_PERSISTENCE_JPA_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:persistence-jpa')`) | yes | Not in the default composition. The one line brings everything — its own `AutoConfiguration.imports` (`PersistenceJpaAutoConfiguration`, `PersistenceJpaRuntimeConfig`, `JpaStartupAutoConfiguration`), its environment handling (`JpaActivationEnvironmentPostProcessor`, `spring.factories`: readiness `db` while on; with `false` it also excludes Boot's JDBC, Hibernate, Spring Data JPA and Flyway auto-configuration, so no DataSource is bound), the startup guards (Flyway strategy, datasource/OSIV/DDL/pool/TLS/vendor checks, exit codes unchanged) and its settings (`config/module-defaults/persistence-jpa.yml`). `persistence-jpa:PersistenceJpaCapabilityAssemblyTest` proves the module assembles on its own; the `postgresql*IntegrationTest` readiness lanes, run by `main.yml` → `main` (`:integrationCheck`), qualify it against PostgreSQL. `bootRunH2` adds the module to its own classpath only. |
| Document persistence (MongoDB) | `ca-skeleton.persistence-mongo.enabled` / `APP_PERSISTENCE_MONGO_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:persistence-mongo')`) | yes | On when present; `false` also excludes Boot's Mongo auto-configuration (`MongoCapabilityActivationTest`). The connection-source rule (`SPRING_MONGODB_URI` or the selected profile's `uri-secret`) is checked by the module's own `MongoDefaultsEnvironmentPostProcessor`. Six container lanes (`mongoReplicaSetTest`, `mongoFailoverTest`, …), run by `main.yml` → `main` (`:integrationCheck`) |
| Messaging (Kafka) | `app.messaging.enabled` / `APP_MESSAGING_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:messaging-kafka')`, which brings the application bridge and the messaging library `dev.cakit.messaging` (messaging-library repo, catalog `messagingLibrary`) with its Kafka transport) | Kafka only | On when present (`KafkaCapabilityActivationTest`). The application's own publish and consume paths run against a live Kafka in `messagingKafkaRelayIntegrationTest` and `messagingInboxRedeliveryIntegrationTest`. The library's broker certification (`verifyMessagingCertificationEvidence`) runs in the messaging-library repo's main stage since 2026-11-08. Kafka is the only registered broker; the RabbitMQ broker keys were removed (no transport). |
| Redis capabilities (cache / rate-limit / lease / idempotency) | `app.redis.enabled` / `APP_REDIS_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:cache-redis')`, which brings `redis-runtime`) | yes | `cache-redis:redisContainerContractTest` (Testcontainers Redis, `integrationCheck`); `cache-redis:redisTopologyTest`, run by `redis-sdk-topology.yml`. Not in the default composition. On when present; `false` contributes no Redis bean — no settings, client, connection, thread or health contributor. The module owns its readiness contribution (`RedisReadinessGroupPostProcessor`, `spring.factories`) and its settings (`config/module-defaults/cache-redis.yml`: `app.redis.enabled`, `app.rate-limit.*`, the Redis `ca-skeleton.capabilities.*`). No `app-bootstrap` main source names a Redis type. |
| Request idempotency | `APP_IDEMPOTENCY_PROVIDER` (`disabled` \| `redis` \| `postgresql`; a selector, not an on/off key) | yes | yes | Redis and PostgreSQL | One generation: the application `IdempotencyExecutor`, built once by `composition:idempotency` (`IdempotencyAutoConfiguration`) over the one store the selected provider contributes (`cache-redis` or `persistence-jpa`); startup is refused unless exactly one store exists. `app-bootstrap`이 그 모듈을 `runtimeOnly` 한 줄로 받고, 다른 조립은 없다. Redis is covered by the row above. PostgreSQL has `persistence-jpa:postgresqlIdempotencyIntegrationTest`, run by `integration-main.yml` → `integration-check` (`:integrationCheck`). The `postgresql` provider refuses a non-PostgreSQL data source, so `bootRunH2` uses `disabled` or `redis`. Each store comes with its module: `postgresql` needs the persistence-jpa line, `redis` the cache-redis one. |
| Request idempotency | `APP_IDEMPOTENCY_PROVIDER` (`disabled` \| `redis` \| `postgresql`; a selector, not an on/off key) | yes | yes | Redis and PostgreSQL | One generation: the application `IdempotencyExecutor`, built once by `composition:idempotency` (`IdempotencyAutoConfiguration`) over the one store the selected provider contributes (`cache-redis` or `persistence-jpa`); startup is refused unless exactly one store exists. `app-bootstrap`이 그 모듈을 `runtimeOnly` 한 줄로 받고, 다른 조립은 없다. Redis is covered by the row above. PostgreSQL has `persistence-jpa:postgresqlIdempotencyIntegrationTest`, run by `main.yml` → `main` (`:integrationCheck`). The `postgresql` provider refuses a non-PostgreSQL data source, so `bootRunH2` uses `disabled` or `redis`. Each store comes with its module: `postgresql` needs the persistence-jpa line, `redis` the cache-redis one. |
| Transactional outbox relay | `ca-skeleton.outbox.enabled` / `APP_OUTBOX_ENABLED`, `false` (+ `APP_OUTBOX_RELAY_ENABLED`, `false`; persistence-jpa settings) | yes | yes (with the persistence-jpa line; the scheduler also needs the messaging-kafka line) | yes | The store and its settings are persistence-jpa's; the relay (`OutboxConfig`) is application composition in `app-bootstrap` because a driven adapter must not build or call a use case. It turns on only when an `OutboxStorePort` bean exists, and the scheduler only when an `OutboxMessagePublishPort` does (the messaging bridge), each ordered after its contributor by `afterName` — so an environment with no publisher keeps its PENDING rows. The bridge registers no stand-in publisher: a present-and-enabled bridge with a blank broker and no canonical transport is refused at startup. `postgresqlLegacyOutboxConcurrentRelayIntegrationTest` qualifies claim/fencing against PostgreSQL. |
| Notification platform | `ca-skeleton.notification.platform.enabled` / `APP_NOTIFICATION_PLATFORM_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':composition:notification-platform')`, plus the persistence-jpa line) | claim-scoped | Not in the default composition. The one line brings the use-case assembly, `adapter:outbound:notification`, the HTTP surface `adapter:inbound:web-notification` and its own settings (`config/module-defaults/notification.yml`), each registered through the module's own `AutoConfiguration.imports`; `adapter:inbound:web` no longer depends on `application-notification`. `verifyNotificationEvidence` refuses a grade in `docs/notification/support-matrix.md` that no proven claim backs; run by `notification-platform.yml`. There is no real-SMTP lane, and the matrix says so rather than implying one. |
| File server platform | `app.fileserver-platform.enabled` / `APP_FILESERVER_PLATFORM_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':composition:fileserver-platform')`, plus the persistence-jpa line) | yes | On when present; module-owned `config/module-defaults/fileserver.yml` also carries the servlet multipart ceiling. `app-bootstrap:integrationTest` → `FileserverCompositionIntegrationTest` (required by the strict lane), run by `integration-main.yml` → `integration-check` (`:integrationCheck`) |
| Outbound HTTP client | `app.httpclient.enabled` / `APP_HTTPCLIENT_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:httpclient')`) | yes | On when present (`HttpClientPlatformActivationTest`). `httpclient:httpClientFailureInjectionTest` against a faulted upstream, run by `integration-main.yml` → `integration-check` (`:integrationCheck`) |
| File server platform | `app.fileserver-platform.enabled` / `APP_FILESERVER_PLATFORM_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':composition:fileserver-platform')`, plus the persistence-jpa line) | yes | On when present; module-owned `config/module-defaults/fileserver.yml` also carries the servlet multipart ceiling. `app-bootstrap:integrationTest` → `FileserverCompositionIntegrationTest` (required by the strict lane), run by `main.yml` → `main` (`:integrationCheck`) |
| Outbound HTTP client | `app.httpclient.enabled` / `APP_HTTPCLIENT_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:httpclient')`) | yes | On when present (`HttpClientPlatformActivationTest`). `httpclient:httpClientFailureInjectionTest` against a faulted upstream, run by `main.yml` → `main` (`:integrationCheck`) |
| GraphQL transport | `backend.graphql.enabled` / `APP_GRAPHQL_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:inbound:graphql')`) | leaf-level | On when present; `false` also excludes Spring GraphQL's own auto-configuration, so no `/graphql` (`GraphQlCapabilityActivationTest`). `graphqlTransportQualificationTest` runs the HTTP boundary. The deployment-mode/runtime-profile rule is the module's own `GraphQlPlatformStartupValidator`. The default jar does not ship GraphQL, so a compose lane that exercises it runs the qualification jar. |
| Object storage | `app.object-storage.enabled` / `APP_OBJECTSTORAGE_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:outbound:objectstorage')`) | MinIO only | Own `ObjectStorageAutoConfiguration` (was bound through bootstrap's properties scan); on when present, `false` leaves only the explicit legacy seam (`ObjectStorageAutoConfigurationTest`). `app-bootstrap:integrationTest` assembles it against digest-pinned MinIO. |
| gRPC platform | — (separate repository) | no | **no** | no | Moved out on 2026-11-08 to the `grpc-library` repository (Maven group `dev.cakit.grpc`); this repository builds and tests none of it. `adapter:inbound:grpc` uses `io.grpc` directly and is unaffected. See `docs/work/reference/related-repos.md`. |
| gRPC transport (`adapter:inbound:grpc`) | `app.grpc.server.enabled` / `APP_GRPC_SERVER_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:inbound:grpc')`) | leaf-level | Own `AutoConfiguration.imports` (`GrpcServerConfig`); on when present, and the loopback plaintext listener still needs `app.grpc.server.allow-insecure-local=true` (`GrpcSafeActivationTest`, `grpcTransportQualificationTest`). |
| WebSocket transport | `app.websocket.enabled` / `APP_WEBSOCKET_ENABLED`, `true` | yes | yes (one line: `runtimeOnly project(':adapter:inbound:websocket')`) | — | Own `AutoConfiguration.imports` (`WebSocketConfig`), on in a servlet app when present (`WebSocketAutoConfigurationTest`); `ConditionalTransportBuildContractTest` asserts it has no default production edge. |
| Web Advanced library (`adapter:inbound:web-advanced`) | — (build-level; three `backend.web.advanced.*.enabled` switches inside) | yes | **no** | — | No composition root depends on it; `app-bootstrap` takes it `testRuntimeOnly` for the ArchUnit import. No real-provider lane: `webAdvancedTest` (the `web-advanced` tag, run by `release.yml` → `web-stable-release-gate`) is unit and context-runner level. The Nginx lane went with the proxy library on 2026-09-25. |
| Web Advanced library (`adapter:inbound:web-advanced`) | — (build-level; three `backend.web.advanced.*.enabled` switches inside) | yes | **no** | — | No composition root depends on it; `app-bootstrap` takes it `testRuntimeOnly` for the ArchUnit import. No real-provider lane: `webAdvancedTest` (the `web-advanced` tag, run by `release.yml` → `stable-release-gates`) is unit and context-runner level. The Nginx lane went with the proxy library on 2026-09-25. |
## Reading the "no" rows
+2 -2
View File
@@ -29,9 +29,9 @@
| `configContractCheck` | 환경변수 계약 |
| `verifyDependencyLocks` | 재현 가능한 의존성 해석 |
| `pr.yml`(`./gradlew :prCheck`, 필수 검사 `pr / done`) | PR 단계. 무엇을 돌리는지는 Gradle 태스크 `prCheck`가 정한다 |
| `main.yml`의 `main`·`integration`·`build-logic`·`configuration-cache` job | main 단계(`mainCheck`, `integrationCheck`) |
| `main.yml`의 `main`(두 단계를 한 줄로)·`build-logic`·`configuration-cache` job | main 단계(`mainCheck`, `integrationCheck`) |
| `main.yml`의 `performance` job | nightly 성능 단계(`performanceCheck`) |
| `vulnerabilities` job(`scripts/ci/trivy-scan.sh`) | Trivy와 CISA KEV |
| `pr.yml` `done`의 Trivy step과 `main.yml`의 `vulnerabilities` job(`scripts/ci/trivy-scan.sh`) | Trivy와 CISA KEV |
| `release.yml` | `releaseCheck`, 이미지 · SBOM · 서명 |
| `scripts/verify.sh` | 사람·세션이 workflow와 같은 단계를 돌리는 진입점 |
| `prCheck`의 `documentCheck`·`testDocumentChecks` | 문서 규칙(`scripts/check-docs.py`: 언어·머리 블록·참조·숫자·지도·링크·문체)과 Gradle 밖 스크립트·편집 훅의 시험(`scripts/tests/`). 파생 서비스의 문서도 같은 규칙을 따른다(`docs/README.md`) |
+2
View File
@@ -11,3 +11,5 @@
{"schema": 1, "kind": "actual", "task": "t2a-backend-ci", "transcript": "9946b681-b5db-4c9f-898d-9e09bfdf14a2", "minutes": 849, "active_minutes": 132, "calls": 374, "output_tokens": 374573, "cache_read_tokens": 189885057, "max_context": 822088, "within": "p30", "result": "partial", "commits": ["de070e16", "61b1d575", "b9866407", "d46bab96", "a2dfefb6", "4d778c22", "d0c3f91a", "b0bca2a6"], "why": "작업 중 시간·호출·출력 모두 p30 아래였다(132분·374·37.5만). 지우는 코드(판독기 5,800줄)와 문서 이름 바꾸기를 스크립트로 했고, 결정 대부분을 설계(03-ci.md 7절)가 이미 정해 착수 뒤 판단이 적었다. 벽시계 849분의 대부분은 대기였다: desktop 공유 잠금(프론트 게이트 뒤), 네트워크 끊김, runner 대기열(옛 workflow 18개, X3 병합 push), Gitea 503(desktop 디스크 90%). 예측은 대기를 빼고 잡았으므로 맞는 쪽이지만, runner 첫 실행에서 dind 환경 문제(compose bind mount, NFS 권한, 포트 포워딩)가 대기 시간보다 큰 위험이었다. 다음 예측은 「새 실행 환경에서 처음 도는 job 수」를 근거에 넣는다. 결과 partial: desktop 네 단계와 runner PR 단계는 초록, runner release는 Nginx lane 하나(고침), main.yml은 runner 환경 탓 job 여럿이 빨강으로 남았다", "recorded_at": "2026-11-09T06:56+09:00"}
{"schema": 1, "kind": "estimate", "task": "t2b-relayout", "transcript": "901b5cff-e758-490c-8e8c-5e47af313c26", "started_at": "2026-11-11T11:26:48Z", "base": "66eaa982", "task_kind": "improve", "size": "large", "minutes": {"p30": 86, "p50": 115, "p80": 173}, "calls": {"p30": 265, "p50": 355, "p80": 530}, "output_tokens": {"p30": 240000, "p50": 320000, "p80": 490000}, "basis": "선례 t2a 132분·374호출·37.5만, x3 110분, x2 99분. 결정 약 20(t2a 약 50보다 적음)이지만 이동·치환 넓고 저장소 루트를 상대 경로로 찾는 시험이 깨져 desktop 실패-고침 3~5번. 보정 전 180/240/360분·450/600/900호출·45/60/90만에 장부 보정(시간 0.48·호출 0.59·출력 0.54)을 곱함", "recorded_at": "2026-11-11T20:31+09:00"}
{"schema": 1, "kind": "actual", "task": "t2b-relayout", "transcript": "901b5cff-e758-490c-8e8c-5e47af313c26", "minutes": 253, "active_minutes": 159, "calls": 369, "output_tokens": 272872, "cache_read_tokens": 126767487, "max_context": 627122, "within": "p80", "result": "done", "commits": ["1388c06a", "6a792b81", "123fc0bf"], "why": "p50 위, p80 안. desktop 공유 잠금 대기(프론트 측정·게이트 약 2시간)를 10분 단위 대기 호출로 기다려 그 일부가 작업 중 시간에 들어갔다. 결정 수와 실패-고침 반복(2번)은 예측보다 적었다", "recorded_at": "2026-11-12T00:39+09:00"}
{"schema": 1, "kind": "estimate", "task": "w2-be-ci-perf", "transcript": "a6b6b25f-a4f7-46c2-a746-5ab20a588c78", "started_at": "2026-11-11T12:30:40Z", "base": "66eaa982", "task_kind": "improve", "size": "large", "minutes": {"p30": 96, "p50": 144, "p80": 216}, "calls": {"p30": 295, "p50": 443, "p80": 649}, "output_tokens": {"p30": 270000, "p50": 405000, "p80": 594000}, "basis": "선례 large improve 4건(t2a 132분·374호출·37.5만, x3 110·346·27.2만, x2 99·330·30.4만, h3 68·270·34.6만). 이번은 결정 약 30(빨간 job 원인 8, 이미지 정책, 최적화 대책 10여, 목표치), runner 실행이 길어(main 수동 약 2시간, release 약 1시간) 실패-고침 반복 3~5번, 측정 스크립트를 새로 씀. 보정 전 200/300/450분·500/750/1100호출·50/75/110만에 장부 보정(시간 0.48·호출 0.59·출력 0.54)을 곱함. 2단계는 t2b 병합 대기라 대기 시간 제외", "recorded_at": "2026-11-11T21:36+09:00"}
{"schema": 1, "kind": "actual", "task": "w2-be-ci-perf", "transcript": "a6b6b25f-a4f7-46c2-a746-5ab20a588c78", "minutes": 663, "active_minutes": 417, "calls": 464, "output_tokens": 438927, "cache_read_tokens": 256417797, "max_context": 911512, "within": "over", "result": "partial", "commits": ["ecc14004", "6325b518", "86488256", "c7aff0f4", "7054d179", "575aa1f7", "deeb1126", "96caf997", "cfc80ae8", "000a59ed", "5a95db45", "d237bacc", "7284b581", "14053060", "7dbf11ca", "2c180b90", "24dde586", "aeb60339", "083c6910"], "why": "시간이 p80을 넘었다: desktop 공유 잠금 대기자 10여 개(flock이 순서 없이 깨움)로 측정·검증이 2시간 넘게 밀렸고, runner 1대 대기열에서 늦게 풀린 job이 맨 뒤로 가 수동 실행 결과가 몇 시간씩 늦었다. 예측에 없던 결정: Gitea needs+if Blocked 재현(일회용 workflow 셋), Trivy가 처음 읽은 lockfile 라이선스와 이미지가 jar 라이선스를 못 읽는 것에 맞춘 판정 재설계. 결과는 partial: runner 초록은 NFS(소유자 sudo)·compose(수정 뒤 runner 미확인) 빼고 달성, 속도 목표 넷은 미달(캐시 효과는 병합 뒤, PG 컨테이너 159개 공유는 후속).", "recorded_at": "2026-11-12T08:34+09:00"}
+8 -8
View File
@@ -16,14 +16,14 @@ Gradle 명령과 `scripts/verify.sh`는 모두 저장소 루트(Gradle 루트)
| --- | --- | --- |
| `docs` | `check-work-docs.py`, `check-docs.py`, `scripts/tests` 자기 시험, `check-repo-layout.py`(Gradle 없음, 노트북 가능) | `pr.yml`의 `prCheck` 안 |
| `leaf <gradle-path>` | 그 leaf의 `check` | — |
| `pr` | `./gradlew :prCheck`, `./gradlew :verifyStrictLaneStages --dry-run` | `pr.yml` `gradle` |
| `main` | `:mainCheck --continue`, `:integrationCheck --continue`, `-p build-logic test`, `scripts/ci/verify-configuration-cache.sh` | `main.yml`(push) |
| `pr` | `./gradlew :prCheck`, `./gradlew :verifyStrictLaneStages --dry-run` | `pr.yml` `done` |
| `main` | `:mainCheck :integrationCheck --continue`, `-p build-logic test`, `scripts/ci/verify-configuration-cache.sh` | `main.yml`(push) |
| `nightly` | compose smoke 전부, 마지막에 `:performanceCheck --continue` | `main.yml`(schedule·수동) |
| `release` | `:releaseCheck`(지금 커밋을 provenance로) | `release.yml` `release` |
| `app` | `scripts/bootstrap-local.sh`(앱을 띄워 health와 기본 endpoint 확인) | — |
| `round` | `pr` → `main` → `nightly` → `release`, 첫 실패에서 멈춘다 | — |
workflow에만 있는 job: `pr.yml`·`main.yml`의 `vulnerabilities`(trivy, `scripts/ci/trivy-scan.sh`), `main.yml`의 `links`(lychee), nightly 행렬(`jpa-postgresql`·`httpclient-transport`·`redis-topology`·`fileserver-nfs-ambiguity`·`notification-chaos`·`jpa-next`), `release.yml`의 release lane과 이미지 job. 도구를 내려받거나 runner 환경이 필요해 `verify.sh`에 넣지 않았다. 손으로 돌리는 법은 3절 (다)다.
workflow에만 있는 job: `pr.yml` `done`의 마지막 step과 `main.yml`의 `vulnerabilities`(trivy, `scripts/ci/trivy-scan.sh`), `main.yml`의 `links`(lychee), nightly 행렬(`jpa-postgresql`·`httpclient-transport`·`redis-topology`·`fileserver-nfs-ambiguity`·`notification-chaos`·`jpa-next`), `release.yml`의 release lane과 이미지 job. `main.yml`의 `done`은 게이트가 아니다: nightly에 main에서 `:prCheck`를 한 번 더 돌려 빌드 캐시를 채우고, 같은 이름의 PR job이 그 캐시를 읽는다(setup-gradle이 job 이름으로 캐시를 찾는다). 도구를 내려받거나 runner 환경이 필요해 `verify.sh`에 넣지 않았다. 손으로 돌리는 법은 3절 (다)다.
게이트 하나씩:
@@ -35,13 +35,13 @@ workflow에만 있는 job: `pr.yml`·`main.yml`의 `vulnerabilities`(trivy, `scr
| `qualityCheck` | SpotBugs, FindSecBugs(운영 코드) | PR(`ci` 안) | `build.gradle` |
| `testQualityCheck` | 같은 분석을 모든 테스트 source set에(`config/spotbugs/exclude-test.xml` 기준) | main(`mainCheck` 안) | `build.gradle` |
| `ci` | leaf `check`(API surface 포함) + `architectureCheck` + `qualityCheck` | PR(`prCheck` 안) | `build.gradle` |
| `prCheck` | `ci` + `verifyDependencyLocks` + `verifyComposeProfiles`(compose lane이 선언대로 렌더링되는가) + `verifyRepositoryLayout`(`check-repo-layout.py`) + `documentCheck`(`check-docs.py`, 앞에 `scripts/tests` 자기 시험) | PR | `pr.yml` `gradle`: `./gradlew :prCheck` |
| `verifyStrictLaneStages --dry-run` | `explicitOnly`가 아닌 strict lane이 단계 태스크 하나의 계획에 들어 있는가(그래프 검사), 단계마다 선언한 workflow job이 `./gradlew <단계>` 한 줄을 정해진 조건으로 돌리는가(형식 검사) | PR | `pr.yml` `gradle` 둘째 줄. 형식은 `build-logic/AGENTS.md` |
| `prCheck` | `ci` + `verifyDependencyLocks` + `verifyComposeProfiles`(compose lane이 선언대로 렌더링되는가) + `verifyRepositoryLayout`(`check-repo-layout.py`) + `documentCheck`(`check-docs.py`, 앞에 `scripts/tests` 자기 시험) | PR | `pr.yml` `done`: `./gradlew :prCheck` |
| `verifyStrictLaneStages --dry-run` | `explicitOnly`가 아닌 strict lane이 단계 태스크 하나의 계획에 들어 있는가(그래프 검사), 단계마다 선언한 workflow job이 `./gradlew <단계>` 한 줄을 정해진 조건으로 돌리는가(형식 검사) | PR | `pr.yml` `done` 둘째 줄. 형식은 `build-logic/AGENTS.md` |
| `python3 scripts/check-repo-layout.py` | 저장소 루트와 `src/` 최상위에 허용 목록 밖의 항목이 없는가, registry 경로가 허용 폴더 안인가. 아무도 가리키지 않는 compose·스크립트 파일은 경고 | PR(`prCheck` 안) | `verifyRepositoryLayout` |
| `python3 scripts/check-docs.py` | 살아 있는 문서의 언어, 기록·ADR 머리 블록, 문서의 인라인 코드 경로·Gradle 경로가 지금 있는가, 복사한 숫자, 상대 링크(`docs/README.md` 「문서 검사」) | PR(`prCheck` 안) | `documentCheck` |
| `mainCheck` | `configContractCheck` + `qualificationCheck`(`testQualityCheck` 포함) + 공개 경로 스냅숏 + 전송·메시징 qualification lane + 생성 명령 왕복(`verifyFeatureScaffold`) + 모든 leaf의 `mainCheck`(document-contract lane 등) | main | `main.yml` `main`: `./gradlew :mainCheck --continue` |
| `integrationCheck` | 선언된 strict integration lane 전체(실 컨테이너). 입력이 없는 lane은 빼고 이름을 댄다 | main·nightly | `main.yml` `integration` |
| `performanceCheck` | 선언된 performance lane 전체(부하·종료·풀·자원 한계, 실 서버와 컨테이너). 상한을 매번 단언한다. 손으로 돌리든 workflow든 같은 상한이다 | nightly(다른 무거운 job 뒤) | `main.yml` `performance`. 5절 |
| `mainCheck` | `configContractCheck` + `qualificationCheck`(`testQualityCheck` 포함) + 공개 경로 스냅숏 + 전송·메시징 qualification lane + 생성 명령 왕복(`verifyFeatureScaffold`) + 모든 leaf의 `mainCheck`(document-contract lane 등) | main | `main.yml` `main`: `./gradlew :mainCheck :integrationCheck --continue` |
| `integrationCheck` | 선언된 strict integration lane 전체(실 컨테이너). 입력이 없는 lane은 빼고 이름을 댄다 | main·nightly | `main.yml` `main`: `./gradlew :mainCheck :integrationCheck --continue`(두 단계를 Gradle 한 번에. 한 번 컴파일하고, 직렬 lane이 도는 동안 나머지가 겹친다) |
| `performanceCheck` | 선언된 performance lane 전체(부하·종료·풀·자원 한계, 실 서버와 컨테이너). 상한을 매번 단언한다. 손으로 돌리든 workflow든 같은 상한이다 | nightly(다른 무거운 job 뒤: 파일 맨 끝 job이고 runner 하나가 job을 만든 순서대로 돈다. `needs`는 쓰지 않는다 — Gitea 1.27이 `needs`와 `if`를 함께 가진 job을 Blocked에 둔다) | `main.yml` `performance`. 5절 |
| `releaseCheck` | 릴리스 provenance + 공개 경로 스냅숏. 커밋을 `GITHUB_SHA`·`GIT_SHA`·`-PgitRevision=<sha>`로 받고, 없으면 설계대로 실패한다 | 태그 | `release.yml` `release` |
| `:app-bootstrap:verifyEnvKeys` | env 키 레지스트리와 profile YAML·`.env.example` | `mainCheck` 안(`configContractCheck`) | build-logic `ca.config-contract` |
| `verifyPublicPathSnapshot` | 기본 공개 경로가 `docs/security/public-paths-snapshot.txt`와 같은가 | `mainCheck`·`releaseCheck` 안 | `build.gradle` |
+19
View File
@@ -35,6 +35,25 @@ case "${topology}" in
*) echo "redis-topology: unknown topology ${topology}" >&2; exit 2 ;;
esac
# Redis 8 ships the search module, and the command catalog makes its FT.INFO an admin diagnostic
# from 8.0 (ADMIN_ONLY). The committed fixture ACL cannot grant it: one file serves every version,
# and Redis 7 refuses to start on a rule that names a command it does not have. On 8 and later the
# lane mounts a copy whose admin line also grants +ft.info, made here from that one file so the two
# cannot drift (compose/redis/acl/README.md).
if [ "${version%%.*}" -ge 8 ]; then
acl_dir="${PWD}/src/adapter/outbound/redis-sdk/build/redis-topology-acl"
rm -rf "${acl_dir}"
mkdir -p "${acl_dir}"
sed '/^user ca-skeleton-admin-readonly /s/$/ +ft.info/' compose/redis/acl/lane-fixture-accounts.acl \
> "${acl_dir}/lane-fixture-accounts.acl"
grep -q '^user ca-skeleton-admin-readonly .* +ft\.info$' "${acl_dir}/lane-fixture-accounts.acl" \
|| { echo "redis-topology: the admin line of the fixture ACL was not found" >&2; exit 1; }
# Read by the image's redis user, which is not the user that made the copy.
chmod 0755 "${acl_dir}"
chmod 0644 "${acl_dir}/lane-fixture-accounts.acl"
export REDIS_ACL_DIR="${acl_dir}"
fi
REDIS_VERSION=${version} "${compose[@]}" up -d --wait
# Inside a CI job container the Docker daemon's ports are on the daemon host, not on localhost, and
+44 -7
View File
@@ -3,10 +3,13 @@
# (`filesystem`) and release.yml (`image <reference>`); not by Gradle and not on the desktop, because
# it downloads and installs its tools (docs/work/operate.md 4.1).
#
# bash scripts/ci/trivy-scan.sh filesystem dependency tree: block High/Critical, report
# Medium/Low, fail on any CISA KEV match
# bash scripts/ci/trivy-scan.sh filesystem dependency tree: block High/Critical
# vulnerabilities and a forbidden license on a
# shipped dependency (after a build), report the
# rest, fail on any CISA KEV match
# bash scripts/ci/trivy-scan.sh image <reference> release image: write image-sbom.cdx.json,
# block High/Critical, report Medium/Low
# block High/Critical vulnerabilities, report
# the rest and the licenses
#
# Tools are pinned release binaries with an asserted SHA-256, installed under RUNNER_TEMP (or a
# temporary directory): a checksum is a supply-chain claim that can be checked offline, an action
@@ -47,9 +50,36 @@ chmod 0755 "${tools}/trivy" "${tools}/jq"
export PATH="${tools}:${PATH}"
[ "$(jq --version)" = "jq-${JQ_VERSION}" ] || { echo "trivy-scan: unexpected $(jq --version)" >&2; exit 1; }
# A forbidden license on a dependency that ships fails (owner decision 2026-11-11). What ships is
# the default composition's jar, so the gate reads the bootstrap leaf's runtimeClasspath lockfile
# entries. Trivy finds a lockfile's licenses only in the Gradle cache of the same machine; the
# release image scan cannot read a jar's license at all (its Licenses column is empty for every
# jar), and the old separate scan job had no cache, so until the pull-request stage became one job
# that builds first no license gate here had ever seen a license. With no cache this says so and
# skips; with a cache and not one license read, the check would be empty, so it fails.
scan_shipped_licenses() {
local cache="${GRADLE_USER_HOME:-${HOME}/.gradle}/caches/modules-2"
if [ ! -d "${cache}" ]; then
echo "trivy-scan: no Gradle cache at ${cache}; the shipped-license gate runs after a build (pr.yml)"
return 0
fi
local shipped="${tools}/shipped"
mkdir -p "${shipped}"
grep -E '=([^=]*,)?runtimeClasspath(,|$)' src/bootstrap/app/gradle.lockfile > "${shipped}/gradle.lockfile" \
|| { echo "trivy-scan: src/bootstrap/app/gradle.lockfile has no runtimeClasspath entry" >&2; exit 1; }
trivy fs --scanners license --format json --output "${tools}/shipped-licenses.json" "${shipped}"
jq -e '[.Results[]?.Licenses[]?] | length > 0' "${tools}/shipped-licenses.json" > /dev/null \
|| { echo "trivy-scan: Trivy read no license for the shipped dependencies; the gate would be empty" >&2; exit 1; }
trivy fs --scanners license --severity CRITICAL --exit-code 1 --ignorefile .trivyignore.yaml "${shipped}"
}
scan_filesystem() {
trivy fs --scanners vuln,license --severity CRITICAL,HIGH --exit-code 1 --ignorefile .trivyignore.yaml .
trivy fs --scanners vuln,license --severity MEDIUM,LOW --exit-code 0 --ignorefile .trivyignore.yaml .
trivy fs --scanners vuln --severity CRITICAL,HIGH --exit-code 1 --ignorefile .trivyignore.yaml .
trivy fs --scanners vuln --severity MEDIUM,LOW --exit-code 0 --ignorefile .trivyignore.yaml .
scan_shipped_licenses
# Every other license finding is reported only: the lockfiles also list build tools (SpotBugs,
# Checkstyle, Error Prone) and test libraries that never ship.
trivy fs --scanners license --exit-code 0 --ignorefile .trivyignore.yaml .
trivy fs --scanners vuln --severity CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN --exit-code 0 \
--ignorefile .trivyignore.yaml --format json --output "${tools}/trivy-kev.json" .
@@ -97,8 +127,15 @@ scan_filesystem() {
scan_image() {
trivy image --format cyclonedx --scanners license --output image-sbom.cdx.json "$1"
test -s image-sbom.cdx.json
trivy image --scanners vuln,license --severity CRITICAL,HIGH --exit-code 1 --ignorefile .trivyignore.yaml "$1"
trivy image --scanners vuln,license --severity MEDIUM,LOW --exit-code 0 --ignorefile .trivyignore.yaml "$1"
# Vulnerabilities, OS and application packages alike: High or Critical fails the release. A
# finding with a fix is fixed (a newer base image digest or dependency); one with no fix yet is
# carried in .trivyignore.yaml with its expiry (owner decision 2026-11-11).
trivy image --scanners vuln --severity CRITICAL,HIGH --exit-code 1 --ignorefile .trivyignore.yaml "$1"
trivy image --scanners vuln --severity MEDIUM,LOW --exit-code 0 --ignorefile .trivyignore.yaml "$1"
# Licenses are reported only (same decision): the OS packages' are the distribution's terms, not
# this application's, and Trivy reads no license from a jar in an image. The shipped jars' gate is
# the filesystem scan's (scan_shipped_licenses), which pull requests run after building.
trivy image --scanners license --exit-code 0 --ignorefile .trivyignore.yaml "$1"
}
case "${1:-}" in
+21 -1
View File
@@ -83,6 +83,8 @@ done
# The lane-only TLS overlay's keypair directory (src/bootstrap/app/compose-lanes/tls.yaml).
LANE_POSTGRES_TLS="${REPO_ROOT}/src/bootstrap/app/compose-lanes/postgres/tls"
# The user quay.io/keycloak/keycloak runs as (the image's USER), which reads the realm's client secret.
KEYCLOAK_IMAGE_UID=1000
# ---- per-lane state, cleaned up by the trap ---------------------------------
PROJECT=""
@@ -178,6 +180,15 @@ run_lane() {
local client_secret; client_secret="$(random_secret)"
GENERATED_SECRETS+=("${client_secret}")
(umask 077 && printf '%s' "${client_secret}" >"${secret_file}")
# Compose mounts the file with its owner and mode, and Keycloak reads it as its image user, uid
# 1000. A developer with that uid owns the file already. A CI job runs as root, so the file is
# handed to uid 1000 and stays 0600. Anyone else gets 0644, as the Mailpit key below does: the
# value is random, lives for one run and sits in a Git-ignored directory removed on teardown.
if [[ "$(id -u)" == 0 ]]; then
chown "${KEYCLOAK_IMAGE_UID}:0" "${secret_file}"
elif [[ "$(id -u)" != "${KEYCLOAK_IMAGE_UID}" ]]; then
chmod 0644 "${secret_file}"
fi
# A CA and a server certificate for the host name `db`, when the lane brings the TLS overlay.
#
@@ -414,8 +425,17 @@ run_lane() {
done 4< <(jq -r '.preStartServices[]?' <<<"${lane_json}")
# 3. long-running services only. A one-shot is not a --wait target: it is meant to exit.
local long_running
local long_running backing
long_running="$(jq -r '.longRunningServices[]' <<<"${lane_json}")"
# The backing services first, until healthy, then the application. Started together, the
# application met a Kafka broker that did not accept connections yet, its producer logged the
# retries, and the silent-startup check below failed on a race rather than a defect (local-messaging,
# main run 59, 2026-11-11; the same lane passed in the run before and on the desktop).
backing="$(grep -vx app <<<"${long_running}" || true)"
if [[ -n "${backing}" ]]; then
# shellcheck disable=SC2086
( cd "${REPO_ROOT}" && docker compose -p "${PROJECT}" "${LANE_ARGS[@]}" up --wait --wait-timeout 300 ${backing} )
fi
# shellcheck disable=SC2086
( cd "${REPO_ROOT}" && docker compose -p "${PROJECT}" "${LANE_ARGS[@]}" up --wait --wait-timeout 300 ${long_running} )
+1 -2
View File
@@ -71,8 +71,7 @@ run_pr() {
}
run_main() {
gradle :mainCheck --continue
gradle :integrationCheck --continue
gradle :mainCheck :integrationCheck --continue
gradle -p build-logic test
bash scripts/ci/verify-configuration-cache.sh
}
@@ -41,6 +41,10 @@ public final class HttpResponseLossFixture implements ResponseLossFixture {
private void reset() {
try {
HttpURLConnection connection = open(FaultFixtureProtocol.SIDE_EFFECTS_PATH, "DELETE");
// The generous timeout, like the retry and the side-effect count. The armed one (750 ms) is
// for the call whose reply the container drops; on a loaded runner an ordinary reset reply
// took longer than that, and the scenario failed before it began (main run 24, 2026-11-08).
connection.setReadTimeout(HttpFixtureTimeouts.READ_MILLIS);
connection.getResponseCode();
connection.disconnect();
} catch (IOException e) {
@@ -8,6 +8,7 @@ import dev.caskeleton.adapter.outbound.httpclient.api.error.HttpConfigurationExc
import dev.caskeleton.adapter.outbound.httpclient.jdk.JdkClientFactory;
import dev.caskeleton.adapter.outbound.httpclient.profile.ClientProfile;
import dev.caskeleton.adapter.outbound.httpclient.profile.HttpProtocol;
import dev.caskeleton.adapter.outbound.httpclient.profile.TimeoutSettings;
import dev.caskeleton.adapter.outbound.httpclient.profile.TransportType;
import dev.caskeleton.adapter.outbound.httpclient.testkit.ClientProfiles;
import dev.caskeleton.adapter.outbound.httpclient.testkit.MockHttpServer;
@@ -17,6 +18,7 @@ import dev.caskeleton.adapter.outbound.httpclient.transport.TransportCapabilityV
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.util.Optional;
import java.util.Set;
import org.junit.jupiter.api.Tag;
@@ -36,6 +38,19 @@ import org.junit.jupiter.api.Test;
@Tag("httpclient-contract")
class NegotiatedProtocolContractTest {
// What these tests measure is the protocol, not a budget. The shared fixture profile allows
// 500 ms to connect and 1 s for the handshake, which a loaded CI runner missed (connect timeout,
// main push 2026-11-11; the desktop too under load 18-24 on 2026-11-08). The DNS budget stays
// the shipped default, the only value the platform accepts for it.
private static final TimeoutSettings OUT_OF_THE_WAY =
new TimeoutSettings(
TimeoutSettings.DEFAULT_DNS,
Duration.ofSeconds(10),
Duration.ofSeconds(10),
Duration.ofSeconds(10),
Duration.ofSeconds(10),
Duration.ofSeconds(30));
@Test
void theJdkTransportNegotiatesHttp2WhenTheProfileAsksForIt() throws Exception {
TlsFixture fixture = TlsFixture.trusted();
@@ -44,6 +59,7 @@ class NegotiatedProtocolContractTest {
ClientProfile profile =
ClientProfiles.builder("h2")
.baseUrl(server.uri("/"))
.timeout(OUT_OF_THE_WAY)
.transport(TransportType.JDK)
.protocols(Set.of(HttpProtocol.HTTP_2, HttpProtocol.HTTP_1_1))
.build();
@@ -70,6 +86,7 @@ class NegotiatedProtocolContractTest {
ClientProfile profile =
ClientProfiles.builder("h1")
.baseUrl(server.uri("/"))
.timeout(OUT_OF_THE_WAY)
.transport(TransportType.JDK)
.protocols(Set.of(HttpProtocol.HTTP_1_1))
.build();
@@ -15,6 +15,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.testcontainers.DockerClientFactory;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.utility.MountableFile;
import software.amazon.awssdk.services.s3.S3AsyncClient;
@@ -53,7 +54,11 @@ class MinioS3ManagedObjectProviderContractTest extends ObjectStorageProviderCont
String secretKey = UUID.randomUUID().toString().replace("-", "") + UUID.randomUUID();
byte[] keyBytes = new byte[32];
SECURE_RANDOM.nextBytes(keyBytes);
Path certificates = SelfSignedServerCertificate.writeTo(Files.createTempDirectory("minio-tls"));
// The host the mapped port is published on: localhost on a workstation, the Docker daemon's
// address inside a CI job container. The certificate has to name it.
String containerHost = DockerClientFactory.instance().dockerHostIpAddress();
Path certificates =
SelfSignedServerCertificate.writeTo(Files.createTempDirectory("minio-tls"), containerHost);
trustStoreBefore = SelfSignedServerCertificate.trustForThisJvm(certificates);
minio =
new GenericContainer<>(QualificationImages.minio())
@@ -90,7 +95,12 @@ class MinioS3ManagedObjectProviderContractTest extends ObjectStorageProviderCont
.retryBaseDelay(Duration.ofMillis(10))
.retryMaximumBackoff(Duration.ofMillis(20))
.shutdownGrace(Duration.ofSeconds(2))
.endpointOverride(URI.create("https://localhost:" + minio.getMappedPort(9000)))
.endpointOverride(
URI.create(
"https://"
+ endpointHost(containerHost)
+ ":"
+ minio.getMappedPort(9000)))
.pathStyleAccess(true)
.staticCredentials(accessKey, secretKey)
.build());
@@ -138,4 +148,9 @@ class MinioS3ManagedObjectProviderContractTest extends ObjectStorageProviderCont
protected ObjectStorageProvider provider() {
return provider;
}
// An IPv6 literal needs brackets in a URI authority.
private static String endpointHost(String containerHost) {
return containerHost.contains(":") ? "[" + containerHost + "]" : containerHost;
}
}
@@ -11,10 +11,14 @@ import java.util.UUID;
import java.util.concurrent.TimeUnit;
/**
* A throwaway localhost server certificate for one lane run, made with the running JDK's keytool so
* no key material is committed. MinIO reads {@code public.crt} and {@code private.key} (PKCS#8 PEM)
* from its certs directory; the JVM trusts the same certificate through its default trust store
* A throwaway server certificate for one lane run, made with the running JDK's keytool so no key
* material is committed. MinIO reads {@code public.crt} and {@code private.key} (PKCS#8 PEM) from
* its certs directory; the JVM trusts the same certificate through its default trust store
* properties, which the SDK's Netty client reads.
*
* <p>The certificate names localhost and the host the test reaches the container on. They differ
* when the tests run inside a CI job container: there the Docker daemon is another host, and {@code
* localhost} is the job container itself.
*/
final class SelfSignedServerCertificate {
@@ -23,7 +27,7 @@ final class SelfSignedServerCertificate {
private SelfSignedServerCertificate() {}
static Path writeTo(Path directory) throws Exception {
static Path writeTo(Path directory, String containerHost) throws Exception {
String password = password(directory);
Path keytool = Path.of(System.getProperty("java.home"), "bin", "keytool");
Process process =
@@ -44,7 +48,7 @@ final class SelfSignedServerCertificate {
"-dname",
"CN=localhost",
"-ext",
"SAN=dns:localhost,ip:127.0.0.1",
subjectAlternativeNames(containerHost),
"-storetype",
"PKCS12",
"-keystore",
@@ -74,6 +78,15 @@ final class SelfSignedServerCertificate {
return directory;
}
private static String subjectAlternativeNames(String containerHost) {
String names = "SAN=dns:localhost,ip:127.0.0.1";
if (containerHost.equals("localhost") || containerHost.equals("127.0.0.1")) {
return names;
}
boolean ipLiteral = containerHost.contains(":") || containerHost.matches("[0-9.]+");
return names + (ipLiteral ? ",ip:" : ",dns:") + containerHost;
}
/** Points the JVM default trust store at the certificate; the returned action restores it. */
static Runnable trustForThisJvm(Path directory) throws Exception {
String[] names = {
@@ -25,12 +25,16 @@ x-node: &node
image: "redis:${REDIS_VERSION:-7.4}"
network_mode: host
volumes:
- ../../../../../../compose/redis/acl:/etc/redis/acl:ro
- ${REDIS_ACL_DIR:-../../../../../../compose/redis/acl}:/etc/redis/acl:ro
# Through the image's own entrypoint, as the standalone lane is: on Redis 8 that is what loads
# the bundled modules (search, JSON, time series, probabilistic), and without them a topology lane
# would test a different server from the standalone one (FT.INFO absent, 2026-11-09 run 63). It
# also runs the server as the image's redis user instead of root.
entrypoint:
- /bin/sh
- -c
- |
exec redis-server \
exec docker-entrypoint.sh redis-server \
--port $$NODE_PORT \
--cluster-enabled yes \
--cluster-config-file /tmp/nodes.conf \
@@ -29,7 +29,11 @@ x-data-node: &data-node
image: "redis:${REDIS_VERSION:-7.4}"
network_mode: host
volumes:
- ../../../../../../compose/redis/acl:/etc/redis/acl:ro
- ${REDIS_ACL_DIR:-../../../../../../compose/redis/acl}:/etc/redis/acl:ro
# Through the image's own entrypoint, as the standalone lane is: on Redis 8 that is what loads
# the bundled modules (search, JSON, time series, probabilistic), and without them a topology lane
# would test a different server from the standalone one (FT.INFO absent, 2026-11-09 run 63). It
# also runs the server as the image's redis user instead of root.
entrypoint:
- /bin/sh
- -c
@@ -42,7 +46,7 @@ x-data-node: &data-node
# into an explicit NOREPLICAS refusal the caller can see and act on. Any deployment where an
# acknowledgement is supposed to mean something has to set these.
- |
exec redis-server \
exec docker-entrypoint.sh redis-server \
--port $$NODE_PORT \
$$REPLICA_OF \
--appendonly no \
@@ -16,7 +16,7 @@ services:
- --aclfile
- /etc/redis/acl/lane-fixture-accounts.acl
volumes:
- ../../../../../../compose/redis/acl:/etc/redis/acl:ro
- ${REDIS_ACL_DIR:-../../../../../../compose/redis/acl}:/etc/redis/acl:ro
ports:
- "${REDIS_PORT:-6379}:6379"
healthcheck:
@@ -38,7 +38,7 @@ services:
certs:
condition: service_completed_successfully
volumes:
- ../../../../../../compose/redis/acl:/etc/redis/acl:ro
- ${REDIS_ACL_DIR:-../../../../../../compose/redis/acl}:/etc/redis/acl:ro
- tls:/tls:ro
command:
- redis-server
@@ -170,7 +170,7 @@ class DeveloperExperienceContractTest {
.as("a conditional link check is one nobody sees run")
.isFalse();
assertThat(String.valueOf(lycheeStep.get("uses")))
.endsWith("lycheeverse/lychee-action@7cd0af4c74a61395d455af97419279d86aafaede");
.endsWith("lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8");
Map<?, ?> with = requireMap(lycheeStep, "with");
assertThat(with.get("fail")).isEqualTo(true);
assertThat(shellWords(requireString(with, "args")))
@@ -321,7 +321,15 @@ class DeveloperExperienceContractTest {
assertThat(jobsWithTheKey).containsExactly("app-image-signing");
Map<?, ?> signing = requireMap(jobs, "app-image-signing");
assertThat(requireStringList(signing, "needs")).containsExactly("app-image-release");
assertThat(requireString(signing, "if")).contains("github.ref_type == 'tag'");
assertThat(signing.containsKey("if"))
.as("a job with both needs and if never leaves Blocked on this Gitea")
.isFalse();
assertThat(requireList(signing, "steps"))
.as("every step runs only for a tag")
.allSatisfy(
step ->
assertThat(String.valueOf(((Map<?, ?>) step).get("if")))
.contains("github.ref_type == 'tag'"));
String script =
String.join(
"\n",