merge 단계(=PR)가 변경이 아니라 검사기 자신을 시험하는 명령까지 돈다.
검사기가 나쁜 입력을 거부하는지 보는 `*:fixture` 명령 15개, 모든 시험
파일과 검증 script가 게이트에 걸렸는지 보는 ungated 검사, CI 계약의
개수·해시 기준선(`config/ci/contract-baseline.json`)이다. 기준선은 게이트
명령 하나를 더하거나 빼도 OWNER·REASON을 붙여 다시 받아야 했다.
소유자 결정(2026-09-16)은 개수·배선 검사를 main 단계에 두는 것이다.
고른 방법(design-docs repo-structure/03-ci.md 7.3절 F2, README.md 3.3절,
소유자 승인 2026-11-07):
- 새 게이트 FE-GATE-029 `checker-self-tests`, 새 단계 `main`
(`MAIN_READY`, 승격을 막지 않는다), 새 job `main_gate`. 브랜치 push와
`workflow_dispatch`(stage=main)에서만 돈다. PR과 태그에서는 돌지 않는다.
- FE-GATE-001·005·008·010·013의 `*:fixture` 명령 15개와 그 증거
산출물 10개를 FE-GATE-029로 옮긴다.
- `check:ci`의 ungated 검사를 `scripts/check-ci-gating.ts`
(`check:ci:gating`)로 떼어 FE-GATE-029에 둔다. `check:ci`는 계약·
workflow 검사만 PR에서 돈다.
- 기준선 파일, `update:ci-contract-baseline`, 그 검사를 지운다(소유자
결정). 계약 모양은 ci-gates.ts의 의미 검사가 지킨다. 개수를 고정하던
단위 시험의 개수 단언도 뺐다.
남긴 것: 음성 타입 fixture(`check:types:fixtures`, FE-GATE-003)는
이름이 `*:fixture`여도 merge에 둔다. 검사기가 아니라 src의 포트·계약
타입을 시험한다. `TelemetryPort.emit`을 넓히는 변경을 PR에서 막는다(정리
3단계 9.3절 변이로 확인). merge 단계 명령 참조 64 → 49.
위험: 검사기를 망가뜨린 PR은 merge를 통과하고 main에서 빨개진다. 그
대가로 PR이 검사기 자기 시험을 기다리지 않는다(설계 7.5절의 같은 교환).
FE-GATE-029의 명령이 앞 게이트 산출물 없이 새 checkout에서 도는지는
desktop에서 따로 확인했다(PR 본문).
검증(desktop): check:ci, check:ci:gating, check:types, CI 시험 통과.
merge 단계·FE-GATE-029 실행 결과는 PR 본문에 적는다.
Refs: design-docs repo-structure/03-ci.md 7.3·7.4절, README.md 3.3절
FE-GATE-027은 `check:release-admission`을 먼저, `scan:dependency-advisories`
를 뒤에 돈다. `ci:gate`는 처음 실패한 명령에서 멈춘다. 그래서 공개 대상
승인이 거절된 run에는 advisory 기록(`artifacts/security/
dependency-advisories.json`)이 생기지 않는다. 운영 문서는 release
산출물이 결과와 상관없이 이 기록을 싣는다고 적는다.
명령 순서를 scan → 승인으로 바꾼다. scan은 막지 않는 신호라 항상
exit 0이고, 승인 판정과 gate 결과는 그대로다. 문서 두 곳(한국어·영어)에
올라가는 것은 그 run에 생긴 파일이고, 승인이 거절돼도 기록이 있으며,
FE-GATE-015가 실패하면 FE-GATE-027이 돌지 않아 기록이 없다고 적는다.
gate 모양이 바뀌어 계약 기준선의 `gateShapeSha256`을 다시 적었다(owner
DongHyeonka, reason에 1106/13-01, 개수는 그대로). 생성 workflow는 명령
순서를 담지 않아 바뀌지 않는다.
버린 대안: (a) 문서만 고치기 — 거절된 run에서 신호가 한 run 늦는 것이
남는다. (c) scan을 always 단계로 따로 빼기 — 계약 단계와 workflow가
바뀌어 이 결함에 비해 크다.
위험·한계: 승인 전에 pnpm audit이 돌아 거절되는 run이 최대 120초(scan
timeout) 늦게 끝난다. scan이 정책 파일을 못 읽어 죽으면 이제 승인이
돌지 않는다(전에도 gate는 실패했다). FE-GATE-015가 실패한 run에는 여전히
기록이 없다. 실제 runner의 upload가 없는 파일을 건너뛰는지는 미확인이다.
제품이 `config/ci/contract-baseline.json`을 자기 값으로 다시 적어 두었다면
받은 뒤 다시 적어야 한다. 새 digest는 jq로 계산했다. 같은 계산이 바꾸기
전 기준선(7bebafe6…)을 그대로 재현했다.
검증: desktop batch에서 확인.
`node scripts/run-vitest.ts run tests/system/ci-runner/ci-evidence-freshness.test.ts tests/unit/dependency-advisories.test.ts`
— 새 "writes the advisory record when the release admission refuses the
candidate"와 바꾼 "runs before the release admission (FE-GATE-027) ..."가
수정 전 계약에서 실패하고 수정 뒤 통과한다. `check:ci`, 13-R1 C.
Refs: 1106/13-01
The freshness fixtures have a package.json but no node_modules. Started
outside pnpm, the gate's pnpm run began an install there and failed with
ERR_PNPM_IGNORED_BUILDS instead of testing the gate runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate/command/artifact counts and the gate-shape SHA-256 were code
constants, so any real removal or addition failed check:ci and removal
fixtures passed only in a relaxed mode. They now live in
config/ci/contract-baseline.json (owner, reason) with
update:ci-contract-baseline; update:registry-baseline wraps the existing
registry script. Removal fixtures re-baseline and run canonical check:ci
and check:registries; CI_CONTRACT_MODE, --reduced-removal-fixture and
check:registries:structure are gone. ci-quality-gates.md lists the
baselines a new project resets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>