ci(gates): 선택 runtime 제거 드릴 셋을 main 단계의 FE-GATE-030으로 옮긴다
문제: runner PR 1회(merge job 셋, capacity 1이라 차례로)가 28.5분이다 (run 151). tests job의 FE-GATE-020이 13분 13초로 가장 크고, 그 안의 선택 runtime 제거 드릴 셋(optional recipe, browser file/storage, realtime)이 약 7분이다. worker를 늘리지 않는 대책을 다 넣어도 25분 목표에 닿지 않는다. 고른 방법(소유자 결정 p, 2026-11-12): 그 드릴 셋을 새 게이트 FE-GATE-030 `optional-removability`로 떼어 main 단계(`main_gate`, FE-GATE-029 다음)에서 돌린다. 샘플 제거와 scaffold 드릴은 merge의 FE-GATE-020에 남는다. 짝 백엔드가 무거운 lane을 nightly로 옮긴 것과 같은 모양이다. - 계약: 정규 게이트 ID를 001..030으로, MAIN_READY를 029·030으로, main_gate job의 게이트를 029·030으로 바꾼다. 계약 보고서의 gateCount는 29(016은 은퇴). - scaffold 드릴의 제외 목록에서 셋을 뺀다. 이제 merge 명령이 아니라서, 계약 검사가 「merge 밖 명령을 제외하면 숨긴다」고 거절했다. - main job 이름을 `main / self-tests and removal drills`로 바꾼다. - 시험: 020은 merge·merge_test에서 sample·scaffold만, 030은 main·main_gate에서 셋을 돈다고 단언한다. 승격 공식 시험에 030을 더한다. - 문서: 결정 색인(decisions.md 2.2), 구조·시험·리뷰 기준·CI 문서, fe-structure 스킬의 드릴 명령. 위험·한계: 선택 runtime을 바꾼 PR의 제거 회귀는 병합 뒤 main run에서 본다. main이 빨강이면 다음 PR이 고친다. 그런 PR은 `scripts/verify.sh gate FE-GATE-030`을 직접 돌려야 한다(structure.md 12절에 적음). 파생 프로젝트가 main job 이름을 필수 검사로 걸었으면 이름이 바뀐다. 검증(desktop): generate:ci-workflow, 생성 시험 스냅샷 갱신, ci-workflow-generation·promotion-readiness·feature-scaffold-drill· removal-drill-test-paths·example-feature-rules 등 483개 통과, check:ci(29 gates) rc=0, check:ci:gating rc=0, verify:documentation PASS_SCOPED, check:types·eslint rc=0. 로그 /tmp/claude-gates/w2fe2-o1b~g/.
This commit is contained in:
@@ -39,7 +39,7 @@ paths:
|
||||
7. 같은 사실(스키마 메타, 레지스트리 행, 허용 키, 빌드 입력 목록, 저장 키)을 원본과 따로 손으로 적는다. 원본에서 뽑거나 대조 시험을 같이 둔다. — `docs/work/reference/structure.md` 8절, 결함 패턴 S1
|
||||
8. 제품마다 다른 것을 템플릿 소유 파일에 넣는다. 동기화마다 같은 파일이 충돌한다. 제품 소유 자리(`src/bootstrap/product-composition.ts`, `src/contracts/product-contracts.ts`, `config/ci/product-gates.json`)에 둔다. — `docs/work/reference/structure.md` 10절, 결함 패턴 S4
|
||||
9. adapter 파일을 더하거나 옮기고 `docs/reviews/adapters/INVENTORY.md`를 같은 커밋에서 고치지 않는다(`check:adapter-inventory` 실패). 최상위 `src/` 폴더를 바꾸고 `docs/architecture/layers.md` 표와 세 문서의 같은 문장을 고치지 않는다(`verify:documentation` 실패). — `docs/work/reference/structure.md` 3절
|
||||
10. 지우거나 옮긴 코드가 지키던 시험·검사를 같이 잃는다. 지우기 전에 그 코드를 읽는 시험·검사를 `git grep`으로 찾는다. 지울 수 있다고 한 단위는 지워도 FE-GATE-020이 통과해야 한다. — `docs/work/reference/structure.md` 9·12절, 결함 패턴 T10·G11
|
||||
10. 지우거나 옮긴 코드가 지키던 시험·검사를 같이 잃는다. 지우기 전에 그 코드를 읽는 시험·검사를 `git grep`으로 찾는다. 지울 수 있다고 한 단위는 지워도 FE-GATE-020(기능)과 FE-GATE-030(선택 runtime, main 단계)이 통과해야 한다. — `docs/work/reference/structure.md` 9·12절, 결함 패턴 T10·G11
|
||||
11. 공개 포트·배럴 표면의 시그니처를 바꾼다. 추가만 하고, 깨야 하면 결정 표에 적고 BREAKING으로 커밋한다. 이름은 새 이름을 내고 옛 이름을 한 릴리스 동안 `@deprecated` 별칭으로 남긴다. — `docs/work/reference/structure.md` 9절
|
||||
12. `src/bootstrap`에 업무 규칙이나 페이지 흐름을 둔다. 판정·정책은 `src/application`·`src/platform`·기능 폴더다. — `src/bootstrap/AGENTS.md`
|
||||
|
||||
@@ -62,7 +62,7 @@ pnpm은 desktop에서만 돈다(`docs/work/operate.md` 4.1절). 노트북에서
|
||||
|
||||
- 경계 전체: `scripts/verify.sh gate FE-GATE-010`(`check:architecture`, `check:adapter-inventory`, `check:registries`, `check:request-fanout`, `check:app-build-input`, `check:browser-file-storage-boundaries`, `check:realtime-boundaries`)
|
||||
- 규칙을 고쳤으면 `check:architecture`가 함께 돌리는 그래프 fixture(`tests/fixtures/architecture/dependency-graph/barrel` 등)가 거절과 허용을 둘 다 고정하는지 본다. 규칙을 꺼 본 사본에서 그 fixture 검사가 실패해야 한다. ESLint 계층 패턴은 `tests/unit/architecture-lint-fixtures.test.ts`(FE-GATE-005)가 같은 일을 한다.
|
||||
- 지울 수 있는 단위·구조를 바꿨으면: `scripts/verify.sh gate FE-GATE-020`(14~21분, 드릴 복사 목록은 `scripts/lib/removal-fixture.ts`)
|
||||
- 지울 수 있는 단위·구조를 바꿨으면: `scripts/verify.sh gate FE-GATE-020 FE-GATE-030`(합쳐 약 11분, 드릴 복사 목록은 `scripts/lib/removal-fixture.ts`). FE-GATE-030은 PR에서 돌지 않는다
|
||||
- 최상위 폴더·문서 문장: `scripts/verify.sh script verify:documentation`
|
||||
- 편집 직후 훅(N3)은 의심 import를 알리기만 한다. 그래프 전체(사이클)는 `check:architecture`만 본다.
|
||||
|
||||
|
||||
@@ -582,7 +582,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
main_gate:
|
||||
name: "main / checker self-tests"
|
||||
name: "main / self-tests and removal drills"
|
||||
if: ${{ (gitea.event_name == 'push' && startsWith(gitea.ref, 'refs/heads/')) || (gitea.event_name == 'workflow_dispatch' && inputs.stage == 'main') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
@@ -600,6 +600,9 @@ jobs:
|
||||
- name: "FE-GATE-029 / checker-self-tests"
|
||||
if: ${{ !cancelled() }}
|
||||
run: corepack pnpm ci:gate -- FE-GATE-029
|
||||
- name: "FE-GATE-030 / optional-removability"
|
||||
if: ${{ !cancelled() }}
|
||||
run: corepack pnpm ci:gate -- FE-GATE-030
|
||||
- name: Upload main gate evidence
|
||||
if: always()
|
||||
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
||||
|
||||
+29
-11
@@ -1574,6 +1574,12 @@
|
||||
"path": "artifacts/quality/gates/FE-GATE-029.txt",
|
||||
"schemaId": "text",
|
||||
"production": "runner-generated"
|
||||
},
|
||||
{
|
||||
"id": "artifact-artifacts-quality-gates-FE-GATE-030-txt",
|
||||
"path": "artifacts/quality/gates/FE-GATE-030.txt",
|
||||
"schemaId": "text",
|
||||
"production": "runner-generated"
|
||||
}
|
||||
],
|
||||
"gates": [
|
||||
@@ -1880,18 +1886,12 @@
|
||||
"name": "removability",
|
||||
"commandIds": [
|
||||
"test-sample-removal",
|
||||
"test-feature-scaffold",
|
||||
"test-optional-recipe-removal",
|
||||
"test-browser-file-storage-removal",
|
||||
"test-realtime-removal"
|
||||
"test-feature-scaffold"
|
||||
],
|
||||
"logArtifactId": "artifact-artifacts-quality-gates-FE-GATE-020-txt",
|
||||
"evidenceArtifactIds": [
|
||||
"artifact-artifacts-tests-sample-removal-xml",
|
||||
"artifact-artifacts-tests-feature-scaffold-xml",
|
||||
"artifact-artifacts-tests-optional-recipe-removal-xml",
|
||||
"artifact-artifacts-tests-browser-file-storage-runtime-removal-xml",
|
||||
"artifact-artifacts-tests-realtime-runtime-removal-xml"
|
||||
"artifact-artifacts-tests-feature-scaffold-xml"
|
||||
],
|
||||
"retentionClassId": "merge-cycle"
|
||||
},
|
||||
@@ -2032,6 +2032,22 @@
|
||||
"artifact-artifacts-security-supply-chain-provider-fixtures-json"
|
||||
],
|
||||
"retentionClassId": "merge-cycle"
|
||||
},
|
||||
{
|
||||
"id": "FE-GATE-030",
|
||||
"name": "optional-removability",
|
||||
"commandIds": [
|
||||
"test-optional-recipe-removal",
|
||||
"test-browser-file-storage-removal",
|
||||
"test-realtime-removal"
|
||||
],
|
||||
"logArtifactId": "artifact-artifacts-quality-gates-FE-GATE-030-txt",
|
||||
"evidenceArtifactIds": [
|
||||
"artifact-artifacts-tests-optional-recipe-removal-xml",
|
||||
"artifact-artifacts-tests-browser-file-storage-runtime-removal-xml",
|
||||
"artifact-artifacts-tests-realtime-runtime-removal-xml"
|
||||
],
|
||||
"retentionClassId": "merge-cycle"
|
||||
}
|
||||
],
|
||||
"stages": [
|
||||
@@ -2108,7 +2124,8 @@
|
||||
"readiness": "MAIN_READY",
|
||||
"needs": [],
|
||||
"gateIds": [
|
||||
"FE-GATE-029"
|
||||
"FE-GATE-029",
|
||||
"FE-GATE-030"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -2860,13 +2877,14 @@
|
||||
},
|
||||
{
|
||||
"id": "main_gate",
|
||||
"displayName": "main / checker self-tests",
|
||||
"displayName": "main / self-tests and removal drills",
|
||||
"kind": "gate-sequence",
|
||||
"needs": [],
|
||||
"condition": "main",
|
||||
"timeoutMinutes": 45,
|
||||
"gateIds": [
|
||||
"FE-GATE-029"
|
||||
"FE-GATE-029",
|
||||
"FE-GATE-030"
|
||||
],
|
||||
"browserGateIds": [],
|
||||
"environment": [],
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
이 workflow drift 검사를 돈다. merge 단계는 job 셋(`merge_static`, `merge_test`,
|
||||
`merge_browser`)으로 돌고 job마다 설치를 한 번 한다. 게이트마다 ID 이름의 step이 하나씩
|
||||
있고, 실패한 게이트가 다음 게이트를 건너뛰게 하지 않는다. 검사기 자신의 음성 fixture와
|
||||
gating 검사는 branch에 push한 뒤 main 단계(`main_gate`, FE-GATE-029)에서 돈다. release와
|
||||
gating 검사는 branch에 push한 뒤 main 단계(`main_gate`, FE-GATE-029)에서 돈다. 선택 runtime
|
||||
제거 드릴 셋(FE-GATE-030)도 main 단계에서 돈다. PR runner 시간 약 30분 가운데 7분쯤이라
|
||||
merge에서 뺐고, 실패하면 main이 빨강이 되어 다음 PR이 고친다(소유자 결정 2026-11-12). release와
|
||||
production 게이트는 matrix check로 남는다. 실패를 무시하는(soft-fail) 연결은 없다.
|
||||
같은 PR이나 같은 브랜치에 새 push가 오면 workflow `concurrency`가 앞 run을 취소한다. Gitea는
|
||||
앞 run의 대기 중인 job은 언제나, 돌고 있는 job은 `cancel-in-progress`가 참일 때 취소한다.
|
||||
@@ -469,7 +471,7 @@ gate의 realtime source/fixture 검사는 native SSE/WebSocket/Web Push API가
|
||||
bootstrap/installed-feature 조합을 차단한다. optional recipe source gate는
|
||||
uncomposed runtime 전체를 tree-shaking 없이 합성해 catalog의 gzip 예산도
|
||||
blocking으로 검증한다.
|
||||
`FE-GATE-020`은 reference runtime source·전용 test·catalog metadata를 제거한
|
||||
`FE-GATE-030`(main 단계)은 reference runtime source·전용 test·catalog metadata를 제거한
|
||||
임시 repository에서도 base typecheck, architecture, test, build가 통과하는지
|
||||
검증해 skeleton의 선택성을 유지한다. browser file/storage와 realtime runtime은
|
||||
각각 독립 removal fixture와 JUnit evidence를 가지며, realtime fixture는 공통
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
| 1105 결정 D7 | 2026-11-05 | 초기 JS 예산을 204,800 B에서 206,848 B로 올린다 | 1105 README 16.2절 |
|
||||
| 1106 결정 D9·D10 | 2026-11-06 | 초기 JS 예산 206,848 B를 그대로 두고 근거·되돌림 규칙을 `docs/operations/performance-evidence.md`에 둔다(D9). 결과 불명 KEYED 재전송이 쓰기 전 거절로 끝나도 훅이 결과 불명과 키를 지킨다. 재전송의 거절이 결과 불명을 푸는 것은 짝 백엔드 표의 code뿐이다(D10과 보완 둘, 판정 `src/contracts/errors.ts` `isRefusedOnEveryAttempt`) | 1106 README 16.2절 |
|
||||
| 결정 D8 FE-GATE-013 판정 | 2026-11-12 | desktop에서 FE-GATE-013의 실패가 사전 점검의 user namespace 제한(bwrap) 하나뿐이고 `scripts/verify.sh parts FE-GATE-013`의 뒤 명령이 모두 rc=0이면, merge 판정에서 그 실패를 호스트 원인으로 빼고 센다. 게이트 「충족」은 조건을 갖춘 runner에서 FE-GATE-013이 통과한 것으로만 센다. 버린 안: runner에서 통과할 때까지 merge 판정을 미충족으로 두기(그 runner가 아직 없어 모든 PR의 merge 판정이 막힌다). 재검토: 조건을 갖춘 runner가 merge 단계를 돌게 되면 desktop 예외가 아직 필요한지 다시 본다. 판정 방법은 `gates.md` 3절 | 소유자 결정 e(2026-11-11, 「그 조건이 되는 실행 환경을 찾아 초록으로」)에 따라 총괄이 권하는 안으로 정함(2026-11-12, repo 밖). 관련 발견 1105/12-01 |
|
||||
| 결정 p 선택 runtime 제거 드릴을 main 단계로 | 2026-11-12 | FE-GATE-020의 선택 runtime 제거 드릴 셋(optional recipe, browser file/storage, realtime)을 새 게이트 FE-GATE-030으로 떼어 main 단계(`main_gate`)에서 돌린다. 기능 드릴(샘플 제거, scaffold)은 merge에 남는다. 이유: runner PR 1회 약 30분 가운데 7분쯤이고, worker를 늘리지 않고 merge 25분 목표에 닿는 길이 이것뿐이었다. 대가: 그 셋의 회귀를 병합 뒤 main run에서 본다. main이 빨강이면 다음 PR이 고친다. 짝 백엔드가 무거운 lane을 nightly로 옮긴 것과 같은 모양이다. 재검토: runner가 늘거나 드릴이 빨라져 merge에 다시 넣어도 25분 안이면 되돌린다 | 소유자 결정 p(2026-11-12, design-docs `template-program/README.md` 5절, W2-FE의 O1 권하는 안 채택) |
|
||||
| 구조·기술 결정 기록 | 2026-07-26~ | `VD-01`~(빈 번호 있음) | `docs/adr/` |
|
||||
|
||||
## 3. 결정 대기 쓰는 법
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
| 현재 계약 | `docs/README.md` 1절 지도의 「현재 계약」·「운영」 폴더 |
|
||||
| 게이트가 지키는 것 | `config/ci/gates.json`과 각 검사 스크립트 |
|
||||
| 생성 명령으로 기능을 더하면 템플릿 파일을 고치지 않고 merge를 통과한다 | `docs/manual/README.md`, `docs/manual/reference/create-feature.md` |
|
||||
| 지울 수 있다고 한 것은 지워도 게이트가 통과한다 | 루트 `README.md`의 지워도 되는 파일 표, FE-GATE-020 |
|
||||
| 지울 수 있다고 한 것은 지워도 게이트가 통과한다 | 루트 `README.md`의 지워도 되는 파일 표, FE-GATE-020, FE-GATE-030 |
|
||||
| 짝 백엔드와 맞춘 계약 | `docs/architecture/backend-api-and-server-state-contract.md` 4.1·6·6.1절, `config/contracts/backend-contract-pin.json` |
|
||||
|
||||
결함으로 보지 않는 것: 소비자 없는 코드와 빈 레지스트리, 지원 범위 밖이라고 적힌 기능이 없는 것(예: SSR, bulk `results`), 서버 메모리 상태·다중 인스턴스 경쟁(탭 사이 경쟁은 본다), 인터페이스가 많다·kernel이 크다는 사실만으로(가이드 35.2절 끝 문단).
|
||||
@@ -108,7 +108,7 @@
|
||||
| 24 | 네이밍 / 의미 성숙도 | 오류 code·상태 이름의 뜻 | |
|
||||
| 25 | 조직 확장성 | 기능 브랜치끼리 같은 줄 충돌, 다운스트림 동기화 비용 | |
|
||||
| 26 | Ownership 성숙도 | 규칙 `comment`의 담당·재검토 조건, 두 repo 사이 몫 | |
|
||||
| 27 | 삭제 가능성 | 기능·recipe·선택 runtime 제거([structure.md](structure.md) 12절) | FE-GATE-020 |
|
||||
| 27 | 삭제 가능성 | 기능·recipe·선택 runtime 제거([structure.md](structure.md) 12절) | FE-GATE-020, FE-GATE-030 |
|
||||
| 28 | 회복 가능성 | 회복 필요 응답 뒤 행동, SW 비상 경로, release rollback | FE-GATE-025 |
|
||||
|
||||
## 6. 다시 판정할 때
|
||||
|
||||
@@ -114,7 +114,7 @@ src/ 최상위 폴더 ── 역할: docs/architecture/layers.md 표
|
||||
|
||||
## 12. 제거 가능성
|
||||
|
||||
지울 수 있는 단위는 merge 게이트 FE-GATE-020의 드릴이 지킨다. 드릴 목록은 `config/ci/gates.json`의 FE-GATE-020 `commandIds`다.
|
||||
지울 수 있는 단위는 드릴이 지킨다. 기능 드릴(샘플 제거, 생성 기능의 scaffold·제거)은 merge 게이트 FE-GATE-020, 선택 runtime 제거 드릴 셋(optional recipe, browser file/storage, realtime)은 main 단계 FE-GATE-030이다(소유자 결정 2026-11-12). 드릴 목록은 `config/ci/gates.json`의 두 게이트 `commandIds`다. 선택 runtime을 바꾼 PR은 merge에서 FE-GATE-030이 돌지 않으니 `scripts/verify.sh gate FE-GATE-030`을 직접 돌린다.
|
||||
|
||||
- 구조를 바꾸면 드릴을 돌린다. 드릴 fixture가 복사하는 목록(`scripts/lib/removal-fixture.ts`, 이 목록 하나만 쓴다)이 바뀐 구조를 아는지 본다. 그 목록에 `README.md`·`CHANGELOG.md`가 없어 드릴 넷 중 셋이 항상 실패한 일이 있다(결함 패턴 G11).
|
||||
- 드릴은 오래 걸린다(FE-GATE-020은 14~21분). desktop에서 잠금 아래 돌린다.
|
||||
- 드릴은 오래 걸린다(desktop 2026-11-13 실측: FE-GATE-020과 FE-GATE-030 합쳐 약 10분 30초). desktop에서 잠금 아래 돌린다.
|
||||
|
||||
@@ -105,4 +105,4 @@
|
||||
|
||||
- 빠른 계층(`tests/unit`)에 프로세스를 띄우는 도구 테스트, 실제 시계로 기다리는 테스트가 섞이면 전체가 느려진다(결함 패턴 T8).
|
||||
- merge 단계가 같은 파일을 두 번 돌리지 않는지 본다.
|
||||
- 긴 드릴은 시간을 함께 적는다. FE-GATE-020은 14~21분(2026-11-06·08 desktop 실측 822~1,245초)이다. job 상한(45분)과의 여유를 본다.
|
||||
- 긴 드릴은 시간을 함께 적는다. FE-GATE-020은 선택 runtime 드릴 셋을 FE-GATE-030(main 단계)으로 넘기기 전 desktop 630초, runner 13분 13초였다(2026-11-13, PR #19). job 상한(45분)과의 여유를 본다.
|
||||
|
||||
@@ -486,7 +486,7 @@ export type CiGateContractIndex = Readonly<{
|
||||
export const RETIRED_GATE_IDS: readonly string[] = Object.freeze(["FE-GATE-016"]);
|
||||
|
||||
export const CANONICAL_GATE_IDS: readonly string[] = Object.freeze(
|
||||
Array.from({ length: 29 }, (_, index) => `FE-GATE-${String(index + 1).padStart(3, "0")}`)
|
||||
Array.from({ length: 30 }, (_, index) => `FE-GATE-${String(index + 1).padStart(3, "0")}`)
|
||||
.filter((gateId) => !RETIRED_GATE_IDS.includes(gateId)),
|
||||
);
|
||||
|
||||
@@ -764,7 +764,7 @@ function validateContractSemantics(
|
||||
|
||||
const expectedGateIds = CANONICAL_GATE_IDS;
|
||||
if (JSON.stringify(contract.gates.map(({ id }) => id)) !== JSON.stringify(expectedGateIds)) {
|
||||
issue(`gate registry must contain FE-GATE-001..029 without retired ${RETIRED_GATE_IDS.join(", ")} in canonical order`);
|
||||
issue(`gate registry must contain FE-GATE-001..030 without retired ${RETIRED_GATE_IDS.join(", ")} in canonical order`);
|
||||
}
|
||||
const expectedStages: ReadonlyArray<readonly [string, string, readonly string[], readonly string[]]> = [
|
||||
["merge", "MERGE_READY", [], PROMOTION_FORMULA.MERGE_READY],
|
||||
@@ -856,8 +856,11 @@ function validateContractSemantics(
|
||||
field_gate: ["FE-GATE-018"],
|
||||
documentation_gate: ["FE-GATE-017"],
|
||||
// F2. The checkers' own negative fixtures and the gating coverage check
|
||||
// run after a merge to main, not on every pull request.
|
||||
main_gate: ["FE-GATE-029"],
|
||||
// run after a merge to main, not on every pull request. So do the optional
|
||||
// runtime removal drills (FE-GATE-030, owner decision 2026-11-12 p): about
|
||||
// seven of a pull request's thirty runner minutes, the same shape as the
|
||||
// paired backend's nightly lanes.
|
||||
main_gate: ["FE-GATE-029", "FE-GATE-030"],
|
||||
};
|
||||
if (JSON.stringify(contract.jobs.map(({ id }) => id)) !== JSON.stringify(Object.keys(expectedJobOwnership))) {
|
||||
issue("job registry must contain the exact thirteen canonical jobs in semantic order");
|
||||
|
||||
@@ -4,7 +4,7 @@ export const ciContractReportSchema = z
|
||||
.object({
|
||||
schemaVersion: z.literal(2),
|
||||
nodeVersion: z.string().regex(/^\d+\.\d+\.\d+$/u),
|
||||
gateCount: z.literal(28),
|
||||
gateCount: z.literal(29),
|
||||
commandDefinitionCount: z.number().int().positive(),
|
||||
commandReferenceCount: z.number().int().positive(),
|
||||
artifactCount: z.number().int().positive(),
|
||||
|
||||
@@ -64,9 +64,6 @@ export const SCAFFOLD_DRILL_EXCLUDED_SCRIPTS: Readonly<Record<string, string>> =
|
||||
...Object.fromEntries(SCAFFOLD_DRILL_COVERED_SUITES.map((script) => [script, COVERED])),
|
||||
"test:sample-removal": DRILL,
|
||||
"test:feature-scaffold": "is this drill.",
|
||||
"test:optional-recipe-removal": DRILL,
|
||||
"test:browser-file-storage-removal": DRILL,
|
||||
"test:realtime-removal": DRILL,
|
||||
});
|
||||
|
||||
export type ScaffoldDrillCommand = Readonly<{
|
||||
|
||||
@@ -43,7 +43,10 @@ export const PROMOTION_FORMULA = Object.freeze({
|
||||
// F2 (design-docs repo-structure/03-ci.md 7.3). The checkers' negative
|
||||
// fixtures and the gating coverage check run after a merge to main. They
|
||||
// test the checkers, not the change, so they hold no promotion.
|
||||
MAIN_READY: Object.freeze(["FE-GATE-029"]),
|
||||
// FE-GATE-030 (owner decision 2026-11-12 p): the optional runtime removal
|
||||
// drills moved here from FE-GATE-020. A failure turns main red, and the next
|
||||
// pull request fixes it before it merges.
|
||||
MAIN_READY: Object.freeze(["FE-GATE-029", "FE-GATE-030"]),
|
||||
});
|
||||
|
||||
export type GateResult = "PASS" | "FAIL" | "UNVERIFIED";
|
||||
|
||||
@@ -585,7 +585,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
main_gate:
|
||||
name: "main / checker self-tests"
|
||||
name: "main / self-tests and removal drills"
|
||||
if: \${{ (gitea.event_name == 'push' && startsWith(gitea.ref, 'refs/heads/')) || (gitea.event_name == 'workflow_dispatch' && inputs.stage == 'main') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
@@ -603,6 +603,9 @@ jobs:
|
||||
- name: "FE-GATE-029 / checker-self-tests"
|
||||
if: \${{ !cancelled() }}
|
||||
run: corepack pnpm ci:gate -- FE-GATE-029
|
||||
- name: "FE-GATE-030 / optional-removability"
|
||||
if: \${{ !cancelled() }}
|
||||
run: corepack pnpm ci:gate -- FE-GATE-030
|
||||
- name: Upload main gate evidence
|
||||
if: always()
|
||||
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
||||
|
||||
@@ -191,7 +191,7 @@ describe("CI gate contract", () => {
|
||||
const index = indexCiGateContract(contract);
|
||||
expect(contract.schemaVersion).toBe(2);
|
||||
expect(contract.gates.map(({ id }) => id)).toEqual(
|
||||
Array.from({ length: 29 }, (_, index) =>
|
||||
Array.from({ length: 30 }, (_, index) =>
|
||||
`FE-GATE-${String(index + 1).padStart(3, "0")}`,
|
||||
).filter((gateId) => gateId !== "FE-GATE-016"),
|
||||
);
|
||||
@@ -202,6 +202,28 @@ describe("CI gate contract", () => {
|
||||
expect(index.gates.get("FE-GATE-020")?.name).toBe("removability");
|
||||
});
|
||||
|
||||
it("runs the optional runtime removal drills in the main stage, the feature drills in merge", async () => {
|
||||
// Owner decision 2026-11-12 p: the three optional runtime removal drills
|
||||
// left the pull request's merge stage; the sample and scaffold drills stay.
|
||||
const contract = await loadCiGateContract(process.cwd());
|
||||
const index = indexCiGateContract(contract);
|
||||
const scriptsOf = (gateId: string) =>
|
||||
(index.gates.get(gateId)?.commandIds ?? []).map((id) => index.commands.get(id)?.script);
|
||||
const stageOf = (gateId: string) =>
|
||||
contract.stages.find(({ gateIds }) => gateIds.includes(gateId))?.id;
|
||||
const jobOf = (gateId: string) =>
|
||||
contract.jobs.find(({ gateIds }) => gateIds.includes(gateId))?.id;
|
||||
|
||||
expect(scriptsOf("FE-GATE-020")).toEqual(["test:sample-removal", "test:feature-scaffold"]);
|
||||
expect([stageOf("FE-GATE-020"), jobOf("FE-GATE-020")]).toEqual(["merge", "merge_test"]);
|
||||
expect(scriptsOf("FE-GATE-030")).toEqual([
|
||||
"test:optional-recipe-removal",
|
||||
"test:browser-file-storage-removal",
|
||||
"test:realtime-removal",
|
||||
]);
|
||||
expect([stageOf("FE-GATE-030"), jobOf("FE-GATE-030")]).toEqual(["main", "main_gate"]);
|
||||
});
|
||||
|
||||
it("runs the signed manual accessibility review at release, not merge (08-06)", async () => {
|
||||
const contract = await loadCiGateContract(process.cwd());
|
||||
const index = indexCiGateContract(contract);
|
||||
|
||||
@@ -32,6 +32,7 @@ describe("promotion readiness formula", () => {
|
||||
["FE-GATE-018", "FIELD_SLO_READY"],
|
||||
["FE-GATE-017", "DOCUMENTATION_READY"],
|
||||
["FE-GATE-029", "MAIN_READY"],
|
||||
["FE-GATE-030", "MAIN_READY"],
|
||||
] as const)("fails closed when %s fails", (failedGate, readiness) => {
|
||||
const result = evaluatePromotionReadiness({
|
||||
...passing,
|
||||
|
||||
Reference in New Issue
Block a user