ci(gates): release job이 FE-GATE-028에 릴리스 태그를 넘긴다
frontend-quality-gates / merge / static checks (pull_request) Successful in 2m9s
frontend-quality-gates / merge / tests (pull_request) Successful in 18m3s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 7m39s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped

문제: 서명된 수동 접근성 기록의 「Release ID」를 무엇과 대조할지 정해지지
않았다(round9 1112/05-01, R9-D7). 처음 정한 `--release-root` 안은 성립하지
않는다. FE-GATE-028은 후보를 만드는 `immutable_build`보다 앞의 `release_gate`
에서 돌고, 후보의 `releaseId`는 run마다 다른 env `RELEASE_ID`에서 온다.
r9-fe가 (가) 릴리스 태그로 정했다.

고친 것: `release_gate` job env에 `RELEASE_TAG`(tag run이면 `gitea.ref_name`,
아니면 빈 값)를 두고, FE-GATE-028이 그것을 `requiresEnvironment`로 요구한다.
`run-ci-gate.ts`는 빈 필수 변수를 거절하므로, 브랜치에서 수동으로 돌린
release 단계에서는 028이 `missing required environment: RELEASE_TAG`로
실패한다(fail-closed, 의도한 동작). 계약의 job env 고정과
ci-quality-gates.md를 같이 고친다.

버린 대안: 명령 인자로 후보 root 넘기기(028 시점에 후보가 없음),
releaseId를 tag 기준 결정값으로 바꾸기(빌드 식별 계약 변경), 028을 이전
run의 후보를 받는 흐름으로 옮기기(job 그래프 변경).

위험·한계: 기록의 「Release ID」를 이 태그와 대조하는 일은 검사
(`scripts/verify-a11y-manual.ts`)와 기록 양식 쪽(그룹 A5)이 한다. 이 커밋만
으로는 값을 받기만 한다. 다운스트림이 release 단계를 브랜치에서 수동으로
돌리던 흐름은 028에서 멈춘다.

검증(desktop): 새 시험이 바꾸기 전 gates.json에서 실패(RED), 고친 뒤
ci-workflow-generation 439개 통과. check:ci·check:types·eslint·
verify:documentation rc=0. `ci:gate FE-GATE-028`: `RELEASE_TAG`가 비면
`missing required environment: RELEASE_TAG`로 실패, `v0.0.0`이면 그 줄 없이
검사까지 간다(서명 없는 템플릿 기록이라 지금처럼 incomplete로 실패).

Refs: 1112/05-01
This commit is contained in:
DongHyeonka
2026-11-13 11:02:51 +09:00
parent 9068faf227
commit 000b5a35be
6 changed files with 45 additions and 2 deletions
+2
View File
@@ -237,6 +237,8 @@ jobs:
if: ${{ startsWith(gitea.ref, 'refs/tags/v') || (gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'release' || inputs.stage == 'production' || inputs.stage == 'field')) }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RELEASE_TAG: "${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}"
strategy:
fail-fast: false
matrix:
+9 -1
View File
@@ -1993,6 +1993,9 @@
"commandIds": [
"review-a11y-manual"
],
"requiresEnvironment": [
"RELEASE_TAG"
],
"logArtifactId": "artifact-artifacts-quality-gates-FE-GATE-028-txt",
"evidenceArtifactIds": [
"artifact-docs-accessibility-route-reviews-APP-HOME-md",
@@ -2291,7 +2294,12 @@
"browserGateIds": [
"FE-GATE-026"
],
"environment": [],
"environment": [
{
"name": "RELEASE_TAG",
"value": "${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}"
}
],
"steps": [
{
"kind": "checkout"
+4
View File
@@ -148,6 +148,10 @@ full commit ID와 commit timestamp를 한 번 읽어 `SOURCE_DATE_EPOCH`를 유
release manifest도 같은 build ID, commit SHA, release ID와 timestamp를 가져야
한다.
`release_gate` job은 tag run이면 그 tag 이름(예 `v1.4.0`)을 `RELEASE_TAG`로 준다.
FE-GATE-028이 이 값을 요구한다(`requiresEnvironment`). tag run이 아니면(브랜치에서 수동으로
돌린 release 단계) 값이 비어 게이트가 `missing required environment: RELEASE_TAG`로 실패한다.
Release tier의 `immutable_build`는 `dist`의 hidden `.vite` entries, raw
`pnpm-lock.yaml`, build/module inventory와 local release/security evidence를 한
번 생성해 run ID/attempt로 구분된 archive로 게시한다. Raw lock bytes의 SHA-256은
+7 -1
View File
@@ -991,7 +991,13 @@ function validateContractSemantics(
merge_static: [],
merge_test: [],
merge_browser: [],
release_gate: [],
release_gate: [
// 1112/05-01 (R9-D7, release tag). FE-GATE-028 compares each signed
// record's Release ID with the tag being released. A run that is not a
// tag run (a release stage dispatched on a branch) gets an empty value,
// and run-ci-gate.ts fails the gate on it.
{ name: "RELEASE_TAG", value: "${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}" },
],
immutable_build: [
// FE-GATE-027 admits the built artifact to a named environment, so both
// the profile it was built from and the destination it is claimed for are
@@ -240,6 +240,8 @@ jobs:
if: \${{ startsWith(gitea.ref, 'refs/tags/v') || (gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'release' || inputs.stage == 'production' || inputs.stage == 'field')) }}
runs-on: ubuntu-latest
timeout-minutes: 45
env:
RELEASE_TAG: "\${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}"
strategy:
fail-fast: false
matrix:
+21
View File
@@ -242,6 +242,27 @@ describe("CI gate contract", () => {
expect(stageOf("FE-GATE-028")).toBe("release");
});
// 1112/05-01 (R9-D7). The signed review names the release tag it covers;
// the release job hands FE-GATE-028 that tag, and nothing on a run that is
// not a tag run, so the gate fails closed there (run-ci-gate.ts refuses an
// empty required variable).
it("gives FE-GATE-028 the release tag of a tag run and nothing otherwise (1112/05-01)", async () => {
const contract = await loadCiGateContract(process.cwd());
const tag = "${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}";
expect(contract.gates.find(({ id }) => id === "FE-GATE-028")?.requiresEnvironment).toEqual(["RELEASE_TAG"]);
expect(contract.jobs.find(({ id }) => id === "release_gate")?.environment).toEqual([
{ name: "RELEASE_TAG", value: tag },
]);
const workflow = renderCiWorkflow(contract);
const release = workflow.slice(workflow.indexOf("\n release_gate:\n"), workflow.indexOf("\n immutable_build:\n"));
expect(release).toContain(` env:\n RELEASE_TAG: ${JSON.stringify(tag)}\n`);
expect(workflow.match(/RELEASE_TAG:/gu)).toHaveLength(1);
const unbound = JSON.parse(JSON.stringify(contract)) as Record<string, any>;
unbound.jobs.find((job: Record<string, any>) => job.id === "release_gate").environment = [];
expect(() => parseCiGateContract(unbound)).toThrow(/job release_gate lacks environment RELEASE_TAG for FE-GATE-028/u);
});
it("keeps every platform route's signed review record as FE-GATE-028 evidence (1112/05-18)", async () => {
// The evidence list is written by hand. EXAMPLES_PLATFORM's record was
// missing from it while the review covers every registered route. A