Commit Graph
15 Commits
Author SHA1 Message Date
donghyeon.kang f6b2b96c53 ci(gates): 검사기 자기 시험과 gating 검사를 main 단계로 내리고 계약 기준선을 지운다
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절
2026-11-08 21:56:37 +09:00
DongHyeonka 4917222049 test(removal): 제거 사본에서도 남는 명령으로 CI 계약 정리를 시험한다
removal-fixture.test.ts는 선택 recipe 제거 사본 안에서도 돈다. 정리 대상으로 고른
test:recipes가 그 사본에는 이미 없어 FE-GATE-020이 실패했다. 어느 제거 사본에도
남는 test:integration과 그 산출물로 바꿨다.
2026-11-08 14:37:41 +09:00
DongHyeonka e3c8db48ae chore(features): 참조 기능과 예제 화면을 지우고 레지스트리를 다시 승인한다
소유자 결정(2026-11-07, design-docs repo-structure/README.md 3.4절)으로
템플릿 샘플을 지운다. 샘플이 맡던 시험 대상은 앞 커밋들이 옮겼다.

참조 기능과 예제 화면, 두 context, 그 시험, e2e 3개, 수동 접근성 기록
7개, 런타임 프로필 키, test:reference-feature(명령, 산출물, 게이트
참조), 커버리지 정책 행을 지웠다. removable-template-features 목록은
비우고 장치는 남겼다: test:sample-removal은 인자가 없으면 목록을
하나씩 지우고, 비면 SKIP을 출력하고 보고서에 건너뛴 사례를 남긴다.
기능 스위치 시험과 홈 시작 링크 스위치 시험은 시험 전용 fixture 기능으로
옮겼다. browser soak은 생성 기능을 넣은 빌드에서 돈다. 문서의 샘플
경로를 고쳤다. 날짜가 붙은 설계·리뷰 기록의 본문은 그대로 두었다.
레지스트리 기준선(update:registry-baseline, OWNER DongHyeonka), CI 계약
기준선과 workflow, 초기 JS 기록(194,354B, 17파일, 첫 기능 6,327B, 기능
539B, context 4B)을 다시 받았다.

위험: 레지스트리 행 삭제는 breaking이다. 샘플을 고쳐 쓰는 다운스트림은
수정/삭제 충돌을 만난다. 성능 lab의 기능 라우트 측정은 템플릿에
공개 기능 라우트가 없어 measured:false다. TEMPLATE_FIXTURE 출처는
플랫폼 코드에 남았다.

검증(desktop): check:types, lint, check:architecture, check:registries,
check:ci, verify:documentation, test:unit, test:component,
test:contract, test:integration, test:recipes, test:coverage(Risk
coverage PASS 378/378, 문턱 68개), test:e2e 183, test:a11y, test:visual,
test:storybook, test:browser-capabilities, test:feature-scaffold PASS(76
checks), test:sample-removal SKIP, build, check:bundle.
2026-11-08 14:07:58 +09:00
DongHyeonka b8535f8ce7 fix(test): 문서를 읽는 테스트만 제거 드릴의 문서 테스트 목록에 둔다
문제: 문서를 복사하지 않는 capability 드릴 셋은 `REMOVAL_FIXTURE_DOCUMENT_TESTS`
의 파일을 통째로 지운다. 문서를 읽는 테스트 하나 때문에
`backend-contract-pin.test.ts`가 목록에 들어가, config와 코드만 보는 나머지
14건(pin 커밋, 답 표 사본, 생성기 사실, Envelope 판정 대조)도 그 드릴에서
돌지 않는다. `feature-tracked-files.test.ts`의 생성기 목록 검사 1건도 같다.
목록을 지키는 검사는 파일 글자에 `README.md|CHANGELOG.md|docs/`가 있는지만
봐서, `backend-contract-pin.test.ts`는 주석 한 줄로 통과했다.

고른 방법(리뷰 문서 ⓐ+ⓑ):
- 6.1 표를 읽는 테스트를 `backend-contract-pin-document.test.ts`로 옮기고
  목록에는 그 파일을 둔다. pin 파일은 목록에서 빠져 모든 드릴에서 돈다.
  새 파일은 pin에서 문서 경로만 읽고, 그 경로가 `docs/` 아래인지 확인한다.
- `feature-tracked-files.test.ts`의 문서와 무관한 1건을
  `feature-tracked-file-rewrites.test.ts`로 옮긴다. 남은 두 건은 모두 문서를
  읽어 그 파일은 목록에 남는다(`create-feature.ts`의 참조도 그대로 맞다).
- 목록 검사는 Babel로 파일을 파싱해 코드의 문자열·템플릿 리터럴에 문서
  경로가 있는지 본다. 주석은 세지 않는다. 주석만 있는 소스를 거절하는지
  자체 테스트를 더했다.
- 6.1 대조를 가리키던 `external-contract-runtime.ts` 주석과 계약 문서 한
  줄을 새 파일 이름으로 고쳤다.
버린 대안: capability 드릴이 계약 문서 하나만 복사하기. 문서 테스트가
늘 때마다 복사 목록이 늘고, 그 드릴이 "문서 없이"를 증명한다는 전제가
흐려진다. 목록 검사만 고치기는 빠지는 범위가 그대로다.

위험·한계:
- 목록 검사는 파일 단위다. 파일 안의 모든 테스트가 문서를 읽는지는 기계로
  보지 않는다. 목록 주석에 규칙을 적었다.
- 검사는 코드에 문서 경로 문자열이 있는지 본다. 그 문자열로 실제로 읽는지는
  보지 않는다.
- 이 노트북에서는 실행하지 못했다.

검증: desktop batch에서 확인.
node scripts/run-vitest.ts run tests/unit/removal-fixture.test.ts tests/unit/backend-contract-pin.test.ts tests/unit/backend-contract-pin-document.test.ts tests/unit/feature-tracked-files.test.ts tests/unit/feature-tracked-file-rewrites.test.ts
check:types, lint, verify:documentation, ci:gate FE-GATE-020(capability
드릴 셋의 unit 실행에 pin 14건이 나오는지)

Refs: 1106/12-01
2026-11-06 05:31:57 +09:00
DongHyeonka e6b2a4f6bf fix(manual): 짝 백엔드 OIDC 설정 키 예시의 FE-REG-ENV 행에 defaultValue를 적는다
문제
매뉴얼 04 §3.2의 PRODUCT_ENV_REGISTRY 예시 두 행(OIDC_ISSUER,
OIDC_CLIENT_ID)에 defaultValue가 없다. 행 타입은 defaultValue를 필수 칸으로
가진다(src/contracts/env.ts). 그래서 제품이 그대로 붙이면 check:types:app이
env.ts에서 TS2322로, env-registry-coverage가 `row {"required":false}`로
실패한다(리뷰 14-R3). 매뉴얼 03 C절과 product-contracts.ts 주석은
defaultValue를 쓴다.

고른 방법
- 두 행에 `defaultValue: null`을 더하고(.optional() 키), 행 칸의 규칙을
  예시 아래 한 줄로 적었다.
- 테스트 tests/unit/manual-paired-backend-settings.test.ts: 매뉴얼 §3.2의 ts
  블록을 그대로 저장소 사본의 새 파일로 두고, 사본의 product-contracts.ts가
  제품 자신의 파일(옆에 보존)에 그 키를 더해 내보낸다. 그 사본에서
  tsconfig.app.json 타입 검사와, env-registry-coverage와 같은 행 대조(키가
  없을 때 스키마가 내는 required·defaultValue)를 node로 돌린다. 제품 파일을
  덮어쓰지 않으므로 다운스트림에서도 그대로 돈다(1105/09-01과 같은 방식).
- 문서를 읽는 테스트라 REMOVAL_FIXTURE_DOCUMENT_TESTS에 더했다. 그 목록의
  항목이 문서를 읽는지 보는 removal-fixture.test.ts 정규식에 `docs/`를
  더했다. 문서 대상(REMOVAL_FIXTURE_DOCUMENT_TARGETS)에 docs가 있어 README나
  CHANGELOG를 읽지 않는 문서 테스트도 있을 수 있다. 목록의 뜻은 그대로다.
- 버린 대안: 예시 행을 recipe에서 export하고 recipe 테스트가 그것으로
  조립하기(리뷰 ②). contracts가 recipe를 import할 수 없어 매뉴얼이 다시
  복사를 시킨다. 이번 테스트가 매뉴얼 블록 자체를 지킨다.

위험·한계
- 행 대조는 env-registry-coverage의 schemaDeclaration을 이 테스트 안에 다시
  적었다(사본에서 vitest를 띄우지 않으려고). 규칙이 바뀌면 둘을 함께 고친다.
- §3.3·§4.3의 코드 예시는 여전히 컴파일하지 않는다(recipe를 복사한 뒤의
  모양이라 사본 구성이 더 크다).
- 테스트가 저장소 사본을 만들고 tsc app 프로그램을 돈다. test:unit이 몇 초
  는다.

검증
- desktop batch에서 확인: node scripts/run-vitest.ts run
  tests/unit/manual-paired-backend-settings.test.ts
  tests/unit/removal-fixture.test.ts, corepack pnpm verify:documentation

Refs: 1105/14-02
2026-11-06 02:59:02 +09:00
DongHyeonka a28b8a4172 fix(removal): 새 드릴 가드 테스트가 제거 fixture 안에서도 성립한다
문제
capability 제거 드릴의 fixture도 test:unit을 돈다. 앞 커밋들이 더한 가드
테스트 두 개가 그 안에서 실패했다.
- removal-fixture.test.ts: 문서 테스트 파일과 드릴 스크립트를 이름으로 읽는데,
  fixture는 문서 테스트를 지우고(02-06) 드릴은 자기 스크립트를 지운다.
  browser-file-storage·realtime 드릴이 이 두 건으로 `test` 검사에서 실패했다.
- feature-scaffold-drill: 제거 드릴이 자기 capability 명령을 계약에서 빼면,
  scaffold 드릴 제외 목록의 그 스크립트가 "merge 단계에 없음"으로 실패한다.

고른 방법
- 문서 테스트는 "문서가 있는 곳에만 있다"를 단언한다(저장소: 둘 다 있음,
  capability fixture: 둘 다 없음).
- 드릴 목록은 scripts/test-*.ts 중 removal-fixture.ts를 import하는 파일로 찾고,
  sample·scaffold 드릴이 그 안에 있는지 확인한다.
- 제외 목록이 낡았다는 판정은 계약에 있으나 merge 단계 밖인 명령에만 한다.
  계약에서 아예 빠진 명령(제거 드릴이 정리한 capability)은 낡은 것이 아니다.

위험·한계
- 계약에서 지운 스크립트의 제외 항목이 저장소에 남아도 이 검사는 알리지
  않는다. 남아도 아무 명령을 숨기지 않는다.

검증
- 수정 전 snapshot(0edc3fc)에서 test:browser-file-storage-removal,
  test:realtime-removal 모두 이 두 테스트로 exit 1(ENOENT).
- 수정 뒤 removal-fixture·feature-scaffold-drill 18건 통과, eslint·tsc 통과.

Refs: docs/reviews/2026-11-03-maturity-review/02-adapters-browser-files-cache.md 02-06
Refs: docs/reviews/2026-11-03-maturity-review/12-guardrails-ci.md 12-02
2026-11-04 21:31:16 +09:00
DongHyeonka f08c93ab2e fix(removal): 문서를 읽는 테스트 제외 목록을 모든 제거 드릴이 같이 쓴다
문제
FE-GATE-020의 제거 드릴은 정해진 목록만 fixture에 복사하고, 그 목록에
README.md·CHANGELOG.md·docs/가 없다. 그런데 fixture에서 도는 test:all에는
그 문서를 읽는 테스트 두 개(documentation-readiness,
changelog-review-ids)가 들어 있다. sample-removal 드릴만 두 테스트를
지웠고, browser-file-storage·realtime·optional-recipe 드릴은 제거 대상과
무관하게 `test` 검사에서 ENOENT로 항상 실패했다. 세 드릴의 실패는 merge
게이트를 빨갛게 하고 release 단계도 막는다.

고른 방법
- scripts/lib/removal-fixture.ts에 문서 목록
  (REMOVAL_FIXTURE_DOCUMENT_TARGETS)과 그 문서를 읽는 테스트 목록
  (REMOVAL_FIXTURE_DOCUMENT_TESTS)을 한 번만 둔다. prepareRemovalFixture는
  문서를 복사하지 않은 fixture에서 그 테스트를 지운다. 문서를 복사하는
  드릴(test:feature-scaffold)에서는 그대로 돈다.
- sample-removal 드릴의 자체 제외 두 줄을 지운다.
- 버린 대안: 모든 드릴이 문서까지 복사. capability 드릴은 문서가
  설명하는 runtime을 지우므로, 문서 테스트가 지운 경로를 실패로 본다.
  드릴마다 문서 예외가 필요해진다. 드릴마다 제외를 복사. 지금 고장의
  원인(갈라진 목록)을 되풀이한다.
- 단위 테스트가 목록을 고정한다: 문서 없이 복사하면 제외, 문서를
  복사하면 제외 없음, 제외 대상이 실제로 문서를 읽음, 다섯 드릴이 모두
  prepareRemovalFixture를 쓰고 자체 제외 목록을 두지 않음.

위험·한계
- 저장소 루트 문서를 읽는 테스트가 더 생기면 이 목록에 더해야 한다.
  더하지 않으면 capability 드릴이 다시 ENOENT로 실패한다(조용히 통과하지는
  않는다).
- 세 드릴의 실제 실행 결과는 이 커밋 메시지에 적지 않았다(공유 잠금 대기).

검증
- RED: 새 테스트 "is the only exclusion list"가 수정 전 sample 드릴의 자체
  목록 때문에 실패.
- tests/unit/removal-fixture.test.ts 12건 통과, 바꾼 파일 eslint 통과.

Refs: docs/reviews/2026-11-03-maturity-review/02-adapters-browser-files-cache.md 02-06
2026-11-04 21:01:33 +09:00
DongHyeonka 4e37b07ff9 fix(removal): CI 스크립트가 없는 기능 제거도 CI 기준선 사유를 만든다
문제
test:sample-removal -- --feature=<id>는 참조 기능이 아닌 기능에
ciScripts: []를 쓴다. pruneRemovalFixtureCiContract가 그 빈 집합으로
기준선 사유를 "removal fixture pruned "(끝 공백)로 만들고, 바로 뒤
기준선 검사가 "leading/trailing whitespace is forbidden"으로 거부한다.
그래서 create:feature로 만든 모든 기능의 제거 드릴이 3초 만에 무관한
오류로 끝나고 게이트 검사는 하나도 돌지 않는다.

고른 방법
- 지운 스크립트가 없으면 사유를 "removal fixture pruned no CI scripts"로
  쓴다.
- 이 길을 merge 게이트가 돌게 하는 것(test:feature-scaffold가 생성
  기능에 --feature 드릴을 한 번 돌림)은 같은 발견의 둘째 절반이라
  드릴 범위를 고치는 다음 커밋에서 한다.

위험·한계
- 이 커밋만으로는 제품 기능 제거 드릴 전체를 실행해 보지 않았다.

검증
- RED: 새 테스트 "re-baselines a removal that prunes no CI script" 실패
  (reason 'removal fixture pruned ').
- 수정 뒤 tests/unit/removal-fixture.test.ts 9건 통과.

Refs: docs/reviews/2026-11-03-maturity-review/16-structure-patterns.md 16-02
2026-11-04 20:24:02 +09:00
DongHyeonkaandClaude Opus 5.5 96391dc69a fix(scripts): report each removal check's own failure and isolate fixtures (14-08)
The JUnit report said failures="1" and put the residue list into every failed
testcase, and three scripts reused a fixed .tmp path without cleanup on error.
A shared renderer counts failures and records each check's cause (command and
exit code, or its own findings); every script uses mkdtemp and finally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:19:09 +09:00
DongHyeonkaandClaude Opus 5.5 0114b1e58b fix(ci): move CI contract counts and gate hash to an owned baseline file (14-02)
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>
2026-09-25 21:34:12 +09:00
DongHyeonkaandClaude Opus 5.5 23336f2300 test(removal-fixture): check the evidence copy against a temporary tree (10-01)
The test counted git-ignored artifacts/release/* files in the working
directory, so a fresh clone or CI runner had none and failed. It now
writes fake evidence and regenerated-tree files into a temp source root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:08:31 +09:00
DongHyeonkaandClaude Opus 5 5434760ddf fix: keep the fixture evidence test about preservation, and stop scanning worktrees
The release-evidence test asserted that every artifact a candidate is assembled
from survives the copy, which quietly assumed the checkout had already run the
release chain. It holds in this repository and fails in a product repository
that has not, where `artifacts/performance/bundle.json` simply does not exist
yet — a fact about the checkout, not about the copier. It now asserts that
whatever release evidence is present is preserved, and that at least one thing
was, so it cannot pass by finding nothing to check.

Vitest also walked `.worktrees/`. A git worktree inside the repository is a
different checkout of a different branch; running its tests against this
checkout's config produces failures that belong to neither and cost real time
to attribute.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 21:30:54 +09:00
DongHyeonkaandClaude Opus 5 10a04d3695 fix: let a removal fixture actually build the thing it claims still builds
FE-GATE-020 proves a capability can be removed by rebuilding the whole project
without it. The fixture it built could not get that far, and the failures all
came from the fixture rather than from anything about removability.

It was not a repository. The supply-chain inventory is defined as the tracked
file set, so it asks `git ls-files` what the project contains; with no
repository to ask, generation failed and took every provider suite down with
it. It is now initialised on preparation and committed after the removal — not
before, or the index would still list the files the removal deleted.

It had no `.gitignore`, so once it did have a repository, every generated
artifact and every linked module landed in the index and the inventory refused
the fixture for tracked and generated paths colliding. It carries the ignore
rules now, and therefore records the same tracked set as the repository it was
copied from.

Each removal script kept its own copy-target list and they had drifted: the
reference-feature fixture omitted `playwright.capabilities.config.ts`, which the
inventory requires. There is one list now. It also gained the install and
workspace identity — `.npmrc`, the lockfile, the workspace file — without which
the fixture is a different project, and the release evidence a candidate is
assembled from, without which no candidate can be built at all.

A tracked root the removal deletes is no longer required of the result: the
optional-recipe fixture deletes `recipes/`, and the inventory policy demanded
it back. Roots that are gone are pruned from the fixture's policy.

Two smaller causes. A platform integration file asserted the reference feature's
own route ids, so removing the feature left it importing a deleted module —
typecheck, the test run, coverage and the residue scan all failed on that one
misplaced assertion, which now lives in the feature's test tree. And the
canonical exact-count authority was re-imposed on a contract the fixture
deliberately reduces, failing the fixture for the reduction it exists to prove;
`CI_CONTRACT_MODE` already marked those runs and is now honoured by default.

The reference-feature fixture goes from failing before its first assertion to
1,612 passing with one failure, and that one is the live process-tree
observation test already red on the main tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 19:34:28 +09:00
DongHyeonka 42ffb79997 fix: reject empty removal fixture scans 2026-08-02 15:02:57 +09:00
DongHyeonka f49d147b01 fix: harden CI evidence and removal contracts 2026-08-02 14:48:04 +09:00