review-followup Wave 3 라운드 3(P27): 빌드 잔여 — INTERNAL_ERROR 비재시도, messaging 카드 검증 leaf 테스트, cosign 서명

- 결정 28: `INTERNAL_ERROR` retryable=false(레지스트리·코드·문서·기대값)
- 결정 29: messaging 카드 검증을 `adapter:outbound:messaging` 테스트로, snakeyaml은 test configuration에서만
- 결정 31: release.yml에 cosign keyless 이미지 서명·검증 job(공식 체크섬 고정 설치, id-token은 그 job만)
- persistence-fileserver `ca.api-surface`(P16-new-6), `ca.release-provenance` 제거(BUILD-O3-5 일부)
- 에이전트가 세션 재시작으로 중단 — 결과 파일은 오케스트레이터가 작성, 미커밋 `jvm-test-suite` 전환은 패치로 보관
- 통합: messaging CLAUDE.md 충돌(encoder 위치 + test 전용 snakeyaml 문장 병합)

검증: ./gradlew mainCheck, -p build-logic test, -p optional-platforms ci, releaseCheck -PgitRevision 통과.
ci verifyDependencyLocks --warning-mode=fail은 web-advanced `WebStreamingSoakIT` 1건(1001 > 1000) 외 통과 —
단독 3회 통과, 경합 가능성으로 ORCH-new-3 행에 기록

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
donghyeon-ka
2026-09-29 12:57:24 +09:00
co-authored by Claude Opus 5.5
parent 642b7e0d18
commit 36ba0810c8
33 changed files with 453 additions and 294 deletions
+113 -1
View File
@@ -375,10 +375,15 @@ jobs:
- fileserver-pvc-certification
- fileserver-sensitive-telemetry-scan
# Job-level, because a job that declares `permissions:` replaces the workflow set entirely: this
# is the only job that writes anything anywhere, and `packages: write` stops at its boundary.
# job and app-image-signing are the only ones that write anything anywhere, and
# `packages: write` stops at their boundary. No OIDC token here: this job runs the repository's
# Gradle build inside the Dockerfile, and the signing identity stays out of that.
permissions:
contents: read
packages: write
# The signing job below reads the digest from here. It is the digest, not a tag, that is signed.
outputs:
pinned_reference: ${{ steps.push.outputs.pinned_reference }}
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
@@ -575,6 +580,7 @@ jobs:
# digest recorded below is immutable by construction, and it is the field the GitOps repository
# pins — the tags exist so a person can find the digest, not so a cluster can resolve one.
- name: Push the release and revision tags
id: push
run: |
set -euo pipefail
docker push "${IMAGE_REPOSITORY}:${IMAGE_VERSION_TAG}"
@@ -595,6 +601,7 @@ jobs:
exit 1
fi
printf 'PINNED_REFERENCE=%s\n' "${pinned_reference}" >> "${GITHUB_ENV}"
printf 'pinned_reference=%s\n' "${pinned_reference}" >> "${GITHUB_OUTPUT}"
printf 'container-release: pushed %s\n' "${pinned_reference}"
# The handoff to the GitOps repository, in a form a person and a script can both read. It is
# written to the job summary as well as to an artifact because the summary is where somebody
@@ -628,3 +635,108 @@ jobs:
path: image-release.txt
if-no-files-found: error
retention-days: 90
# Keyless signature of the pushed digest (owner decision 31). A job of its own so that
# `id-token: write` — the GitHub OIDC token Fulcio turns into a short-lived signing certificate
# naming this workflow and tag — exists only here, in a job that checks nothing out and builds
# nothing. The signature goes to the registry beside the image (hence `packages: write`) and the
# transparency-log entry to Rekor; there is no key to store or rotate.
#
# The digest is signed, never a tag: a tag can be moved to other content, a digest cannot.
# Verification runs right after signing with the identity a deployment should require, so a
# release whose signature a cluster would reject fails here instead of at admission.
#
# Local limit: signing needs the tag run's OIDC token and a pushed GHCR image, so it is exercised
# only by a real release. DeveloperExperienceContractTest pins the structure of this job.
app-image-signing:
needs:
- app-image-release
permissions:
contents: read
packages: write
id-token: write
runs-on: ubuntu-latest
timeout-minutes: 30
env:
PINNED_REFERENCE: ${{ needs.app-image-release.outputs.pinned_reference }}
steps:
# Same policy as Trivy above: a pinned release binary with an asserted SHA-256, no action.
# The two hashes are the cosign-linux-{amd64,arm64} lines of the official v3.1.3
# cosign_checksums.txt, which was itself verified against its Sigstore bundle
# (identity keyless@projectsigstore.iam.gserviceaccount.com, issuer https://accounts.google.com)
# when they were pinned. The checksum file is fetched again here and must still carry the
# pinned line, so a re-published release asset fails the job instead of passing silently.
- name: Install pinned cosign under RUNNER_TEMP
run: |
set -euo pipefail
readonly COSIGN_VERSION='3.1.3'
readonly COSIGN_SHA256_AMD64='4629c757b7618056f8ddd7e2625ae9fdd94c0372a65049520bc7d9df9efc7f71'
readonly COSIGN_SHA256_ARM64='c5d324e091826b0d7a78eb16fef316450b4eb9aaec045611c08ba06f5e73220a'
readonly DOWNLOAD_BASE_URL="https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}"
case "${RUNNER_ARCH:-X64}" in
X64)
asset='cosign-linux-amd64'
expected_sha256="${COSIGN_SHA256_AMD64}"
;;
ARM64)
asset='cosign-linux-arm64'
expected_sha256="${COSIGN_SHA256_ARM64}"
;;
*)
echo "::error::unsupported runner architecture: ${RUNNER_ARCH:-unknown}"
exit 1
;;
esac
install_dir="${RUNNER_TEMP}/cosign-${COSIGN_VERSION}"
mkdir -p "${install_dir}"
curl --fail --show-error --silent --location --retry 3 \
--proto '=https' --tlsv1.2 \
"${DOWNLOAD_BASE_URL}/cosign_checksums.txt" \
--output "${RUNNER_TEMP}/cosign_checksums.txt"
if ! grep -qxF "${expected_sha256} ${asset}" "${RUNNER_TEMP}/cosign_checksums.txt"; then
echo "::error::cosign_checksums.txt no longer lists the pinned ${asset} hash"
exit 1
fi
curl --fail --show-error --silent --location --retry 3 \
--proto '=https' --tlsv1.2 \
"${DOWNLOAD_BASE_URL}/${asset}" \
--output "${install_dir}/cosign"
printf '%s %s\n' "${expected_sha256}" "${install_dir}/cosign" | sha256sum -c -
chmod 0755 "${install_dir}/cosign"
printf '%s\n' "${install_dir}" >> "${GITHUB_PATH}"
- name: Check the reference to sign
run: |
set -euo pipefail
if [[ ! "${PINNED_REFERENCE}" =~ ^ghcr\.io/[a-z0-9._/-]+@sha256:[0-9a-f]{64}$ ]]; then
echo "::error::app-image-release handed over no digest reference; got '${PINNED_REFERENCE}'"
exit 1
fi
printf 'CERTIFICATE_IDENTITY=%s/%s\n' "${GITHUB_SERVER_URL}" "${GITHUB_WORKFLOW_REF}" \
>> "${GITHUB_ENV}"
- name: Sign in to the container registry
env:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
printf '%s' "${REGISTRY_TOKEN}" \
| docker login ghcr.io --username "${GITHUB_ACTOR}" --password-stdin
- name: Sign the image digest (keyless)
run: |
set -euo pipefail
cosign sign --yes "${PINNED_REFERENCE}"
# The identity a deployment admission policy should require: this workflow file at this tag,
# issued by GitHub's OIDC provider. Anything else — another workflow, another repository, a
# branch run — does not verify.
- name: Verify the signature with the release identity
run: |
set -euo pipefail
cosign verify \
--certificate-identity "${CERTIFICATE_IDENTITY}" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
"${PINNED_REFERENCE}" > cosign-verify.json
{
printf '### container-release signature\n\n'
printf -- '- signed: `%s`\n' "${PINNED_REFERENCE}"
printf -- '- certificate identity: `%s`\n' "${CERTIFICATE_IDENTITY}"
printf -- '- issuer: `https://token.actions.githubusercontent.com`\n'
} >> "${GITHUB_STEP_SUMMARY}"