Commit Graph
81 Commits
Author SHA1 Message Date
DongHyeonka 95e7d1107c test(vitest): skip·todo·only가 남은 실행을 실패시킨다 (10-04)
문제: Vitest는 skip·todo 테스트를 통과로 센다. `it.skip`이나
`it.todo`가 든 파일은 CI=true에서도 종료 코드 0으로 끝난다.
`context.skip()`도 같다. `.only`는 Vitest 기본값 때문에 CI에서만 막히고,
로컬에서는 같은 파일의 나머지 테스트를 조용히 건너뛴다.
check:test-evidence의 소스 검사가 quarantine 주석 없는 `.skip(`·`.only(`
글자를 잡지만, `it.todo`, `context.skip()`, `skipIf`는 보지 못한다.

고른 방법:
- vitest.config.ts에 allowOnly: false를 둬 `.only`를 어디서나 막는다.
- scripts/lib/no-skipped-tests-reporter.ts reporter가 실행 끝에
  state가 skipped인 테스트를 찾으면 이름을 출력하고 exitCode를 1로 둔다.
  -t, 태그 필터, file:line처럼 호출자가 일부러 좁힌 실행은 예외다.
  게이트는 실행을 좁히지 않는다.
- reporter는 scripts/run-vitest.ts가 붙인다. CLI --reporter는 config의
  reporters를 대체하므로 config에 두면 package script에서 빠진다.
  run-vitest.ts는 package script와 scale tier가 모두 거치는 입구다.
  호출자가 reporter를 하나도 주지 않으면 default를 함께 붙인다.

버린 대안:
- 리뷰 최소 개선안의 junit `skipped > 0` 검사: Vitest junit은 mode가
  skip·todo인 테스트만 <skipped/>로 적고 `context.skip()`은 통과처럼
  적는다. junit을 쓰지 않는 실행(scale tier, http-scenario-catalog,
  로컬 단일 파일)은 아예 보지 못한다.
- tests/setup.ts의 afterAll 검사: 모든 테스트가 skip인 파일은 hook이
  돌지 않아 잡지 못한다.
- eslint-plugin-vitest no-disabled-tests: 새 의존성이 생기고
  `context.skip()`을 못 잡는다.

위험·한계:
- run-vitest.ts를 거치지 않는 직접 `vitest` 실행에는 reporter가 붙지
  않는다. allowOnly는 config라서 그때도 적용된다.
- 호출자가 reporter를 주지 않으면 default reporter를 고정해서 붙인다.
  Vitest가 AI 에이전트 환경에서 고르는 agent reporter 대신 default가
  나온다.
- 본문 없는 `describe.todo`처럼 테스트가 없는 묶음은 세지 않는다.
- check:test-evidence는 quarantine 주석이 있는 `.skip(`을 허용하지만
  이 reporter는 Vitest에서 그것도 실패시킨다. 지금 quarantine은
  Playwright spec에만 있어 충돌하는 테스트는 없다. 전략 문서 16.5절에
  "quarantine은 Vitest 테스트를 통과시키지 않는다"고 적었다. Vitest에도
  quarantine이 필요해지면 허용 목록을 따로 둬야 한다.
- 지금 저장소의 Vitest 테스트에는 skip·todo·only가 없다.

검증:
- RED(P-B 재현, run-vitest.ts로 skip+todo, only, context.skip() 파일을
  CI 없음/CI=true로): 수정 전 6경우 중 5경우 exit 0("1 passed | 1
  skipped | 1 todo"). only+CI=true만 exit 1.
- 새 tests/unit/no-skipped-tests-reporter.test.ts는 수정 전 "Cannot find
  module ../../scripts/lib/no-skipped-tests-reporter.ts"로 실패.
- GREEN: 같은 6경우 모두 exit 1. skip·todo·context.skip()은 "N test(s)
  did not run" 목록, only는 "Unexpected .only modifier". junit reporter를
  준 실행도 exit 1. -t로 좁힌 실행과 file:line 실행은 exit 0. 새 테스트
  11 passed.
- 빠른 계층 전체(unit·component·integration·contract·runtime-schema·
  platform·architecture·features·release·scripts·recipes, pnpm 설치를
  하는 fixture-node-modules.test.ts 제외, maxWorkers 4): 3,228 passed,
  1 failed. 실패는 provider-guardian-transaction의 fs.watch ENOSPC(호스트
  inotify 한도)이고 reporter 없이 vitest를 직접 돌려도 같다. skip 목록
  출력은 없었다.
- tsc -p tsconfig.node.json, tsconfig.test.json, eslint(바꾼 4파일),
  check-ci-contract, generate-ci-workflow --check,
  verify-documentation-readiness(PASS_SCOPED) 통과.

Refs: docs/reviews/2026-11-01-maturity-review/10-tests-fast-layers.md 10-04
2026-11-01 23:18:45 +09:00
DongHyeonka e0c2a91d47 test(setup): npx vitest가 npm scope 환경변수 없이 시작한다 (1101/15-05)
문제
`npx vitest run tests/unit/ci-workflow-generation.test.ts`는 79건이
"CI runner npm scope environment invalid"로 실패한다(415건 중). npx와
npm을 거친 IDE 실행기는 npm_config_prefix·_userconfig·_globalconfig를
넣는다. CI 게이트 preflight(withCiGatePreflight)는 실제 runner에서 이
변수들을 거절하는데(옳은 동작), 테스트가 그 preflight를 프로세스 안에서
부르거나 자식으로 띄우면서 실행기의 process.env를 그대로 물려받는다.
scripts/run-vitest.ts만 그중 일부를 지워서 pnpm 경로만 통과한다. 원인은
timeout이 아니라 이 환경변수다.

고른 방법
- vitest.config.ts가 NODE_ENV를 고정하는 자리에서 npm scope 변수를 지운다.
  config는 worker를 띄우기 전에 메인 프로세스에서 평가되므로 worker와 그
  자식 프로세스 모두 깨끗한 환경으로 시작한다. 어느 실행기로 돌리든,
  어느 테스트 파일이든 한 곳에서 막는다.
- 지울 이름은 preflight가 쓰는 것과 같은 판정
  (package-script-graph.ts의 isNpmScopeEnvironmentName, 기존 private 함수를
  export)으로 고른다. 목록이 둘로 갈라지지 않는다.
- ci-workflow-generation.test.ts에 "테스트 프로세스에 npm scope 변수가
  없다"는 테스트를 더했다.

버린 대안
- 해당 테스트 파일의 beforeEach/afterEach에서 지우고 되돌리기(리뷰의 최소
  방향 1): 같은 preflight를 띄우는 다른 파일이 생기면 다시 깨진다.
- 실행 함수가 환경을 인자로 받게 하기: 자식 프로세스는 여전히 process.env를
  물려받아 실패한다.
- run-vitest.ts의 하드코딩 목록 정리: 이번 수정으로 필요 없어지지만, product
  index 생성 자식에도 쓰이고 동작이 같아 건드리지 않았다.

위험·한계
- 실제 게이트 실행기의 npm scope 거절은 그대로다. 테스트 안에서 일부러 변수를
  넣는 기존 테스트 3건도 그대로 통과한다.
- tests/unit 밖(component, integration 등)은 npx로 돌려 보지 않았다.

검증
- RED: npx vitest run tests/unit/ci-workflow-generation.test.ts -t
  "npm-launched runner" 실패 "expected [ 'npm_config_userconfig', …(2) ] to
  deeply equal []". 수정 전 같은 파일 79 failed / 336 passed
- GREEN: npx vitest run tests/unit/ci-workflow-generation.test.ts
  416 passed
- npx vitest run tests/unit: 171파일 2,401 passed
- tsc(node, test), eslint 바뀐 파일 통과

Refs: docs/reviews/2026-11-01-maturity-review/15-performance.md 15-05
2026-11-01 22:49:13 +09:00
DongHyeonka 629c8f045e fix(hosting): 호스팅 검사가 SPA fallback과 SW 스크립트 헤더를 본다 (1101/13-04)
문제
라우터는 browser history를 쓴다. 호스트가 앱 경로에 index.html을 주지
않으면 `/`는 열리고 새로고침·북마크·공유 링크만 404가 된다. 호스팅 계약
(config/hosting/cache-policy.json)에 앱 경로 표면이 없고, live probe는
`/`, config, manifest, entry script만 요청해서 FE-GATE-019가 그대로
PASS한다. 운영 문서가 no-cache로 서빙하라는 service-worker.js도 선언과
검사에 없다. e2e는 fallback을 기본으로 하는 vite preview라 드러나지 않는다.

고른 방법
- cache-policy.json에 표면 두 개를 더한다.
  - appRoute: 빌드에 파일이 없는 경로 `/__probe/deep-link`. index와 같은
    Cache-Control, content-type, 보안 헤더를 요구한다.
  - serviceWorker: `/service-worker.js`, no-cache, JS MIME.
    `requiredWhen: "service-worker-shipped"`로 워커를 싣는 빌드
    (ACTIVE, REMOVE_REGISTRATION)에서만 요구한다. 이 판정은
    checkPublicServiceWorkers와 같은 함수(shipsServiceWorker)를 쓴다.
- live probe를 scripts/lib/hosting-probe.ts의 probeLiveRelease로 옮겨
  fetcher를 주입해 단위 테스트한다. 요청 경로는 정책의 path에서 읽는다.
  appRoute는 200이어야 하고, 응답이 index.html과 같은 entry script를
  가리켜야 한다. 그래서 404와, 200으로 답하는 다른 페이지(soft 404)를
  모두 FAIL로 잡는다.
- release-cache-rollback.md에 fallback 규칙과 desktop 서버용 nginx 예시를
  적는다. 예시는 손으로 썼고, 빠진 hashed asset은 index.html이 아니라
  404여야 한다는 점(구 탭 재적재, FE-RB-002)과 add_header 상속 함정을
  적었다.

버린 대안
- createHashRouter로 바꿔 fallback 자체를 없애기: URL과 기존 경로 계약·
  테스트가 모두 바뀐다(리뷰 대안 비교에서 기각).
- 정책 이름(serviceWorker)으로 스크립트가 조건을 아는 방식: 정책 파일만
  읽는 운영자가 항상 필요한 표면으로 오해한다. 조건을 JSON에 적었다.
- 리다이렉트 뒤 최종 경로까지 비교: 이번 완료 기준(404 FAIL) 밖이라 넣지
  않았다.

위험·한계
- nginx 예시는 이 머신에 nginx가 없어 실행하지 않았다. CI도 돌리지 않는다.
  호스트가 실제로 무엇을 주는지는 live probe가 확인한다.
- 이미 배포한 호스트에 fallback이나 SW 헤더가 없으면 FE-GATE-019가 새로
  실패한다(의도).
- 앱 base path가 `/`가 아닌 배포는 기존 probe와 같이 다루지 않는다.

검증
- RED: node scripts/run-vitest.ts run tests/unit/hosting-probe.test.ts
  5 failed. "expected undefined to match object { cacheControl:
  'no-cache', …}"(정책에 appRoute·serviceWorker 없음),
  "probeLiveRelease is not a function"
- GREEN: 같은 파일 22 passed. fallback 없는 호스트에서
  ["appRoute http-status", "appRoute entry-script"]가 실패로 나온다
- node scripts/run-vitest.ts run tests/unit/hosting-probe.test.ts
  tests/platform/release tests/release tests/unit/ci-workflow-generation.test.ts:
  483 passed
- build-frontend.ts 뒤 verify-hosting-headers.ts(fixture): UNVERIFIED rc=3,
  결과 36건(appRoute 8건 포함), SW null이라 serviceWorker 헤더 검사는 건너뜀
- tsc(node, test), eslint 바뀐 파일, verify-documentation-readiness
  PASS_SCOPED, check-ci-contract PASS

Refs: docs/reviews/2026-11-01-maturity-review/13-build-release-supply-chain.md 13-04
2026-11-01 22:49:13 +09:00
DongHyeonka 5e6be9a92f fix(registry): breaking 증거를 그 증거가 설명하는 값에 묶는다 (0929/07-01)
문제
breaking 증거 조회 키는 registryId:row:field:kind뿐이고, 증거 검사는
5필드가 비었는지만 본다. 값은 diff에 있지만 증거와 비교하지 않는다. 그래서
한 번 증거를 쓴 row·field는 다음 변경도 새 증거 없이 통과한다. 실험 X3:
REFERENCE_RESOURCE_DETAIL.path를 08-13 증거가 설명하는
/examples/reference-resources/items/:resourceId가 아닌
.../entries/:resourceId로 바꿔도 check-registries가 "11 registries
PASS"였다. 공개 URL·API 경로·저장 키 같은 breaking 변경이 이행·롤백
계획 없이 지나간다.

고른 방법 (리뷰 최소 개선 (1))
- 값이 있는 breaking 변경(change.after가 있음)은 증거 행에 after가 있어야
  하고, canonical JSON이 diff의 after와 같아야 한다. 없으면 "evidence
  needs after", 다르면 "evidence explains after=..., the change is
  after=..."로 실패한다. 키 순서·원시값 배열 순서는 기존 canonical 규칙
  그대로라 차이로 보지 않는다.
- 삭제(row·registry·field 삭제)는 설명할 값이 없어 after를 요구하지 않는다.
- 현재 diff와 맞는 템플릿 증거 1건(REFERENCE_RESOURCE_DETAIL.path)에
  after를 더했다. ci-quality-gates.md의 증거 안내에 after를 적었다.
- 완전한 증거를 만드는 테스트 두 곳(registry-compatibility,
  registry-governance tamper 사례)에 after를 넣었다.

버린 대안
- after를 선택 필드로 두기: 없는 행은 지금처럼 모든 다음 변경을 통과시켜
  X3이 그대로 남는다.
- 증거 키에 값 해시를 넣기(changeId 형식 변경): 기존 changeId 문법과
  출력이 바뀌고 사람이 읽을 수 없다.
- 리뷰 (2) 현재 diff와 맞지 않는 증거 행 실패 또는 목록 출력, (3)
  update:registry-baseline의 증거 정리: 실패로 할지 출력으로 할지, 오래된
  14건을 지울지 이력 파일로 옮길지가 감사 기록을 다루는 결정이라 이번에
  하지 않았다.

위험·한계
- 증거 파일 형식이 바뀐다. 다운스트림이 이 검사를 동기화하면 아직 diff에
  남은 breaking 변경의 증거 행마다 after를 넣어야 게이트가 통과한다.
  다음 릴리스 CHANGELOG [계약] 행이 필요하다(미출시 절이 없어 적지
  않았다).
- 오래된 증거 행(현재 diff와 무관한 14건, 0929/07-02 수정으로 쓰이지 않게
  된 VITE_BUILD_ID 포함)은 그대로 남는다. 위 (2)·(3)이 남은 일이다.
- 값이 큰 contract 필드(allowedValues 전체 등)의 증거는 그 값을 통째로
  적어야 한다.

검증
- RED(수정 전): registry-compatibility.test.ts 새 사례 2건 실패
  ("rejects evidence written for another value", "requires the explained
  value": expected [] to deeply equal [...]). X3 변이로 check-registries
  "11 registries PASS".
- GREEN: 같은 X3 변이에서 check-registries 실패("evidence explains
  after=\"/examples/reference-resources/items/:resourceId\", the change is
  after=\"/examples/reference-resources/entries/:resourceId\""), 변이 없이
  "11 registries PASS". registry-compatibility·registry-governance·
  release-artifacts·second-api-feature-registries 53/53 통과.
  compatibility fixtures 11 PASS. verify-documentation-readiness
  PASS_SCOPED.
- 회귀: tsc node/test rc=0, 바꾼 파일 eslint rc=0.
- 미실행: check:architecture(pnpm), test:sample-removal(pnpm).

Refs: docs/reviews/2026-09-29-maturity-review/07-contracts.md
2026-11-01 22:35:54 +09:00
DongHyeonka 82c9e594ff fix(registry): 선언된 null 전환과 허용값 추가를 breaking으로 막지 않는다 (0929/07-02)
문제
레지스트리 호환성 분류기(scripts/lib/registry-compatibility.ts)는 값의 JS
타입이 다르면 breakingFields를 보기 전에 field-type-changed(breaking)로
판정한다. null과 문자열은 타입이 달라서, governance가 string|null로
선언하고 breaking 필드에서 뺀 필드(navigationLabel, navigationOrder, API
timeoutMs, 저장 ttl, ENV defaultValue)를 null <-> 값으로 바꾸기만 해도
breaking 증거를 요구한다. contract의 allowedValues에 값을 더하는 것도
어떤 변경이든 breaking이다. 그래서 증거 5필드에 쓸 내용이 없는 변경에
"마이그레이션·롤백"을 지어 쓰게 된다. 템플릿 자신도 VITE_BUILD_ID
defaultValue null -> "local-build"에 "the value itself did not change"라고
적은 breaking 증거를 남겼다.

고른 방법 (리뷰 최소 개선 B)
- 행 필드: 한쪽이 null이고 두 값이 모두 그 필드의 선언 타입
  (contract.fieldTypes, 예 string|null)에 맞으면 타입 변경이 아니라
  field-changed로 보고 breakingFields로 등급을 정한다. 선언이 없거나
  선언 밖 값이면 지금처럼 field-type-changed(breaking)다.
- contract allowedValues: 필드 집합이 같고 필드마다 이전 허용값을 모두
  포함하면 allowed-values-extended(additive)다. 값 하나라도 빠지거나,
  새 필드를 제한하거나, 제한을 없애면 지금처럼 breaking이다. 나머지
  contract 변경도 그대로 breaking이다.
- 선언 타입 판정은 check-registries.ts에 있던 runtimeType·
  matchesDeclaredType을 lib로 옮겨 검사기와 분류기가 같은 함수를 쓴다.
- semantic-diff.json fixture에 nullable-field-cleared(behavior-change),
  registry-contract-extension(additive)을 더하고 artifact id 목록에도
  넣었다.

버린 대안
- 현 상태 + "이런 변경은 재승인하라"는 문서: 재승인이 증거를 대신하는
  길을 더 넓힌다(0929/07-04).
- nullable 필드 판단 전체를 breakingFields로 옮기기(리뷰 C): 다른
  레지스트리 영향을 다시 봐야 하는 넓은 변경이다.
- 제한 해제(allowedValues에서 필드 키 삭제)를 additive로 보기: 리뷰
  기준("이전 값을 모두 포함")에 맞지 않고 판단이 하나 더 필요해 보수적으로
  breaking에 남겼다.

위험·한계
- fail-closed 범위가 줄어든다. 선언 타입 안의 null 전환이 의미("기능
  꺼짐")를 갖는 필드는 breakingFields에 넣어야 breaking으로 남는다.
  paramsSchema·searchSchema는 이미 breakingFields라 그대로 breaking이다.
- 현재 기준선 diff에서 VITE_BUILD_ID defaultValue가 breaking에서
  behavior-change로 바뀐다. registry-change-evidence.json의 해당 증거 행
  (field-type-changed)은 이제 어떤 변경과도 맞지 않는다. 오래된 증거 정리는
  0929/07-01 범위라 이번에는 지우지 않았다.
- 다운스트림의 같은 종류 증거 행도 쓰이지 않게 된다. 게이트 판정이
  바뀌는 변경이라 다음 릴리스 CHANGELOG에 [계약] 행이 필요하다(이번
  라운드는 CHANGELOG 미출시 절이 없어 적지 않았다).
- fieldTypes 키가 점 경로(a.b)인 필드는 행의 최상위 필드 이름과 맞지 않아
  계속 breaking으로 남는다.

검증
- RED(분류기 수정 전): registry-compatibility.test.ts 새 사례 5건 실패
  (null 전환 3건이 breaking/field-type-changed, nullable breaking 필드의
  kind, allowlist 확장 breaking). check-registry-compatibility-fixtures:
  nullable-field-cleared actual breaking, registry-contract-extension
  actual breaking.
- GREEN: registry-compatibility·registry-governance·release-artifacts·
  second-api-feature-registries 49/49 통과. compatibility fixtures 11 PASS.
  check-registries "11 registries PASS"(남은 breaking은
  REFERENCE_RESOURCE_DETAIL.path 하나, 증거 있음).
  ci-artifact-contract "semantic validator" 사례 통과.
- 회귀: tsc node/test rc=0, 바꾼 파일 eslint rc=0.
- 미실행: check:architecture(pnpm). tests/system 나머지(provider guardian
  exit=126 환경 문제로 이 변경과 무관하게 실패).

Refs: docs/reviews/2026-09-29-maturity-review/07-contracts.md
2026-11-01 22:35:54 +09:00
DongHyeonka 98b9682241 chore(scripts): 쓰지 않는 npm script 4개를 지우고 scan:도 게이트 검사한다 (12-05)
문제
package.json에 어디서도 부르지 않는 script 4개가 있다.
- scan:security:fixture: FE-GATE-013은 이것 대신 check:security:fixtures를
  돈다. supply-chain.test.ts는 "게이트에 없어야 한다"고 단언하는데 script는
  남아 있다. 게이트 밖 script 검사는 check|verify|test|drill|review만 봐서
  scan:을 놓쳤다.
- build:profile: 이름과 달리 generate-runtime-config.ts만 돈다.
- generate:contract-set: 참조 0건.
- build:app-only: vite build와 매니페스트만 만든다. build-frontend.ts의
  계약 세트·런타임 설정·Service Worker 단계가 빠진 dist가 나온다. 참조는
  product-index-entrypoints 테스트의 진입점 목록 하나다.
참조 확인(새 기준 298201f, docs/reviews 제외): package.json 정의와 위 두
테스트 말고는 config/ci/gates.json, 생성 workflow, scripts, docs 어디에도
없다. 아래 세 script가 부르던 파일(generate-runtime-config.ts,
generate-contract-set.ts, generate-build-manifest.ts)은 build-frontend.ts가
그대로 부른다.

고른 방법
- 네 script를 지우고 진입점 목록에서 build:app-only를 뺀다.
- VERIFICATION_SCRIPT에 scan을 더한다. 게이트가 닿지 않는 scan:* script는
  ungated-scripts.json 항목 없이는 check:ci에서 실패한다. 지금 남은
  scan:security는 build:release-candidate를 거쳐 게이트가 닿는다.
- docs/operations/ci-quality-gates.md의 접두어 목록에 scan:*을 더한다.
버린 대안
- build:app-only를 build:vite-only로 이름만 바꾸기: 남길 사용처를 찾지
  못했다.
- 접두어 대신 "게이트 밖 모든 script는 예외 목록에": dev·storybook·
  update:*까지 목록에 올라가 목록이 커진다(리뷰 대안 비교와 같다).
- check:feature-index 정리(리뷰 개선 (4)): 지우기와 이유 문구 고치기 중
  하나를 고르는 일이라 이번에 하지 않았다.

위험·한계
- 개인 습관으로 이 script를 쓰던 사람은 build-frontend.ts나 node
  scripts/...를 직접 불러야 한다.
- 게이트 명령은 바뀌지 않아 CI 계약 기준선은 그대로다.

검증
- RED: 새 테스트 "rejects a scan script that no gate reaches"가 실패
  (expected [ …(2) ] to deep equally contain '…: scan:orphan'). 정규식만
  넓히면 저장소 검사 "reaches every verification script …"가
  scan:security:fixture 한 건으로 실패.
- GREEN: ungated-scripts·product-index-entrypoints·supply-chain·
  ci-workflow-generation 4파일 457/457 통과. check:ci의 세 단계를 pnpm
  없이 직접 실행: generate-artifact-schemas --check PASS,
  check-ci-contract.ts PASS(27 gates), generate-ci-workflow --check PASS.
  tsc(tsconfig.node, tsconfig.test), 바꾼 파일 eslint 통과.

Refs: docs/reviews/2026-11-01-maturity-review/12-guardrails-ci.md 12-05
2026-11-01 22:16:26 +09:00
DongHyeonka e714c0d770 fix(design-system): 디자인 검사가 deg 색상각과 시스템 글꼴 이름을 받는다 (12-04)
문제
디자인 규칙이 올바른 CSS를 거부한다. 포커스 대비 규칙의 parseOklch는
색상각 단위 deg와 음수 색상각을 읽지 못해 oklch(52% 0.15 230deg)를 실패로
센다(B13). 첫 글꼴 규칙은 -apple-system, BlinkMacSystemFont로 시작하는
시스템 글꼴 스택을 실패로 센다(B6). color-mix()·알파 표면(B10, B11)은
"--color-focus or X is not a plain oklch() value"로 실패해서 어느 토큰이
무슨 값인지, 무엇이면 되는지 알 수 없다. 네 규칙의 설명은 코드 주석에만
있다.

고른 방법
- parseOklch가 색상각에 deg와 음수를 받는다. 알파는 계속 받지 않는다.
- oklch-contrast.ts에 resolveValue(var() 사슬 끝 값)를 두고 resolveColor가
  그것을 쓴다. 포커스 규칙은 계산할 수 없는 토큰마다 "<테마> <토큰> is
  <값>; contrast needs an opaque oklch(L C H), hue in degrees with or
  without deg"를 낸다. 포커스 색 자체를 못 읽으면 표면 8개 대신 한 줄이다.
- 첫 글꼴 허용 목록에 -apple-system, BlinkMacSystemFont를 더한다.
- docs/styling/design-system-platform.md 4.1절에 규칙 4개, 지원 형식,
  검사 위치를 표 하나로 적는다.
버린 대안
- color-mix()·알파 표면을 배경 위에 섞어 계산: 무엇이 아래에 그려지는지
  규칙이 모른다. 추측하지 않고 실패하는 기존 원칙을 유지하고 메시지로
  해결 형식을 알린다(리뷰 대안 비교와 같다).
- 리뷰 개선 (4) token-contract.ts에 "제품이 싣는 글꼴" 목록: 공개 계약에
  새 이름을 넣는 설계 선택이고 완료 기준에 없다. 문서 표에 "아직 선언할
  곳이 없어 실패한다"로 적었다.
- rad·grad·turn 단위: 쓰는 곳이 없다. 넣지 않은 단위는 메시지가 알려 준다.

위험·한계
- 실패 메시지 문구가 바뀐다. 문구를 단언하는 곳은 이 테스트 파일뿐이다.
- 패키지·<link>로 싣는 글꼴, 12-03의 검사 위치 밖 CSS는 그대로다.
- 화면 변화 없음. CSS를 바꾸지 않았다.

검증
- RED(수정 전): design-system-rules·oklch-contrast 테스트 19개 중 4개
  실패. "reads a hue written with deg" expected [ …(8) ] to deeply equal [],
  "names the value it cannot compute …" 메시지 불일치, "-apple-system"
  expected [ Array(1) ] to deeply equal [], parseOklch("…230deg") expected
  null.
- GREEN: 같은 두 파일과 design-system-contract 21/21 통과. 실제 스크립트
  probe: 포커스를 oklch(52% 0.15 230deg)로 → PASS(B13). surface-muted를
  oklch(0.97 0 0 / 0.9)로 → "light --color-surface-muted is oklch(0.97 0 0
  / 0.9); contrast needs …"로 실패(B11). 저장소 CSS는 PASS.
- tsc(tsconfig.node, tsconfig.test), 바꾼 파일 eslint, verify-
  documentation-readiness PASS_SCOPED.

Refs: docs/reviews/2026-11-01-maturity-review/12-guardrails-ci.md 12-04
2026-11-01 22:16:26 +09:00
DongHyeonka 3c175a5429 fix(provider): guardian이 실패하면 stdin을 기다리지 않고 끝난다 (G-1)
문제
guardian은 fd 0을 fs.createReadStream으로 읽는다. 이 스트림은 libuv
스레드 풀의 스레드 하나를 read(2)에 세워 둔다. process.exit()는 종료
전에 스레드 풀을 join하므로, 그 read가 돌아올 때까지(부모가 stdin을
닫을 때까지) 끝나지 않는다. 그래서 가드를 거부하거나 link가 실패하면
failClosed가 진단을 바로 쓰고도 프로세스는 남는다. 클라이언트는 stdin을
연 채 READY를 기다리므로 거부가 즉시 오지 않고 고정 5초 뒤 "READY timed
out"으로 끝난다. 같은 종류 guardian 두 개 테스트의 패자가 이 경로다.
탐침: 같은 종료 코드를 fs 스트림은 stdin을 닫은 2,008ms에, net 소켓은
228ms에 냈다(200ms 뒤 exit 호출).

고른 방법
- liveness 입력을 process.stdin으로 바꾼다. pipe면 Node가 이벤트 루프로
  읽는 net.Socket을 만든다. 스레드 풀 read가 없어 exit가 바로 끝난다.
  data/end/error 처리, removeAllListeners·destroy, closeSync(0)는 그대로다
  (libuv는 fd 0~2를 destroy에서 닫지 않는다).
- 동시 guardian 테스트에 붙였던 PROCESS_HEAVY_TIMEOUT_MS와 그 주석을
  뺀다. 패자가 link 실패 즉시 끝나 테스트가 5.14초에서 0.16~0.54초가 됐다.
버린 대안
- provider-scope-wrapper.ts처럼 new Socket({ fd: 0 }): fd 0이 pipe가
  아니면 생성자가 throw한다. guardian은 그 시점에 이미 private alias를
  묶었고 failClosed는 liveness가 있어야 돈다. process.stdin은 pipe에서는
  같은 Socket이고, 그 밖의 fd에서는 throw 대신 end/error로 기존 실패
  경로(125)를 탄다.
- 실패 때 SIGKILL로 자신을 죽이기: 종료 코드 124~126 계약이 사라진다.

위험·한계
- pipe인 fd 0에 O_NONBLOCK이 걸린다. 읽기 끝은 guardian만 가진다
  (클라이언트는 stdio "pipe"로 띄운다).
- lease 마감 경로는 원래 SIGKILL을 쓰므로 바뀌지 않는다.

검증
- RED(수정 전): 새 테스트 "exits on a rejected guard while the parent
  still holds its input open"이 "rejected-guard guardian exit timed out"
  (5,122ms)으로 실패. 다른 nonce의 가드를 보내 시계와 무관하게 거부시킨다.
- GREEN: tests/integration/provider-guardian-transaction.test.ts 22/22
  통과, 3회 반복 통과(새 테스트 65~333ms). tests/unit/task3-selective-
  integration 7/7. tsc(tsconfig.node, tsconfig.test) 통과, 바꾼 파일
  eslint 통과.
- 미실행: tests/system/ci-runner/ci-artifact-contract.test.ts의 provider
  체인 테스트. fixture가 corepack pnpm으로 빌드해서 이 worktree에서는
  돌리지 않았다.

Refs: commit c862004 위험·한계의 "따로 남는 결함"
2026-11-01 22:16:26 +09:00
DongHyeonka f41e3d5e32 ci(gates): 번들 예산 검사를 merge 단계에서 돌린다 (15-01)
FE-GATE-012(build, check-bundle, check-app-build-input-bundle,
check-optional-recipes)는 release 단계에만 있어 tag push나 수동 release
실행에서만 돈다. 초기 JS를 예산보다 크게 만드는 PR도 merge 게이트를
통과하고, 몇 PR 뒤 release가 실패한다. 어느 PR이 얼마나 늘렸는지는 그때
이력을 거꾸로 따라가 찾아야 한다.

FE-GATE-012를 merge stage와 merge_gate job으로 옮긴다. release_gate는
merge_gate를 needs로 두므로 tag 실행에서도 그대로 돈다. promotion 공식
(MERGE_READY)과 CI 계약 검사의 job 소유 표를 같이 바꾸고, workflow는
생성기(node scripts/generate-ci-workflow.ts)로 다시 만든다.

버린 대안:
- check-bundle만 FE-GATE-011(build)에 붙인다(리뷰의 최소안). 같은 검사가
  두 게이트에 갈라지고, release에 남은 FE-GATE-012와 중복해서 돈다.
- FE-GATE-012를 merge와 release 둘 다에 둔다. 계약이 게이트당 job 하나를
  강제한다(multiply owned gate).
- lab 게이트(FE-GATE-026)도 merge로 옮긴다. PR마다 브라우저 설치와 5회
  측정이 붙고, 부하에 따라 판정이 뒤집힌 기록(0929/11-04)이 있다. release에
  남긴다.

위험·한계:
- merge 실행이 build 1회와 공급망 생성, 번들 계산만큼 길어진다.
- 실제 CI 러너에서는 돌려 보지 않았다(Actions 꺼짐).

검증:
- node scripts/check-ci-contract.ts: 27 gates PASS
- node scripts/generate-ci-workflow.ts --check: PASS
- node scripts/generate-artifact-schemas.ts --check: PASS
- node scripts/run-vitest.ts run tests/unit/ci-workflow-generation.test.ts
  tests/unit/promotion-readiness.test.ts: 423 통과(workflow 스냅샷 1건 갱신)

Refs: docs/reviews/2026-11-01-maturity-review/15-performance.md 15-01
2026-11-01 21:57:53 +09:00
DongHyeonka 0536891c05 feat(provider): 실행 단계가 자기 PID와 argv를 실행 기록에 남긴다 (11-01)
문제: tests/system의 cgroup 테스트는 provider 실행 중 /proc을 5 ms마다
표본으로 읽어 어떤 프로세스가 어떤 argv로 돌았는지 판정한다.
systemd-run --scope는 scope로 옮긴 뒤 같은 PID에서 sh 게이트와 scope
wrapper로 exec하고, 갓 fork된 자식은 exec 전까지 부모 argv를 보인다.
표본은 PID마다 처음 본 argv만 남겨 이 짧은 단계를 자주 놓친다. 운영
코드에는 테스트가 결정적으로 읽을 실행 증거가 없다.

고른 방법: scripts/lib/provider-process-trace.ts를 추가한다.
PROVIDER_PROCESS_TRACE_PATH가 있을 때만 각 단계가 JSON 한 줄을
덧붙인다.
- 자기 기록: supervisor와 scope wrapper가 /proc/self/cmdline과
  /proc/self/cgroup을 남긴다(커널이 본 값).
- 자식 기록: supervisor가 systemd-run, guardian client가 guardian,
  wrapper가 bwrap을 spawn에 넘긴 argv 배열 그대로 남긴다. spawn과 기록이
  같은 배열을 쓴다.
- 필드는 role, pid, ppid, argv, (자기 기록만) cgroup. 환경변수는 담지
  않는다. credential과 provider 명령이 지나가는 곳이기 때문이다.
- systemd-run 환경은 허용 목록으로 다시 만들어지므로
  providerProcessTraceEnvironment()로 기록 경로만 넘긴다. bwrap은
  --clearenv라 sandbox 안의 provider는 경로를 받지 않는다. guardian은
  빈 환경을 그대로 두고 client가 spawn 지점에서 기록한다.

테스트용 opt-in으로 두고 운영 감사 증거로 쓰지 않는다. 운영에서 켜면
argv가 두 번째로 남는 곳이 생긴다. 나중에 credential이나 provider
명령이 argv에 들어가는 회귀가 생기면, 지금은 /proc에 잠깐 보이는 값이
파일로 남아 CI 산출물이 될 수 있다. 감사 증거로 쓰려면 봉인 보고서와
같은 경로 안전·크기 상한·스키마·보존 정책이 필요하고 이번 범위가
아니다. CI 워크플로는 이 변수를 설정하지 않는다.

버린 대안:
- /proc 표본 보강(부모와 같은 argv 무시, PID별 argv 이력 보존): 리뷰
  README 13.1에서 시도하고 되돌렸다. 이력 보존은 prlimit -> sh로 바뀌는
  PID 이력에 provider 명령이 섞여 "인프라 argv에 명령 없음" 단언의
  뜻이 바뀐다.
- spawn 직후 /proc/<pid>/cmdline 읽기: libuv는 exec 뒤에 반환하지만
  systemd-run은 곧 wrapper로 다시 exec하므로 경쟁이 남는다.
- guardian 자기 기록: guardian이 빈 환경으로 뜨는 것이 보장이라 기록
  경로를 넘기지 않는다.

위험·한계:
- 기록은 각 단계가 스스로 남긴다. 새 spawn 지점이 기록을 빠뜨리면
  테스트에서 보이지 않는다. 모듈 주석에 적었다.
- 기록 실패는 run 결과를 바꾸지 않고 stderr에 한 줄 남긴다. wrapper의
  stderr는 provider 출력으로 버려지므로 빠진 줄은 기록을 읽는 쪽에서
  드러난다.
- 변수가 없으면 spawn 인자와 환경은 이전과 같다.

검증:
- node scripts/run-vitest.ts run tests/unit/provider-process-trace.test.ts
  2건 통과. 자식 기록에 env 필드를 넣는 변이를 넣으면 실패한다.
- 관련 테스트 6파일 44건 통과(provider-process-trace, task3-selective-
  integration, provider-output-limiter, security-provider-evidence,
  provider-guardian-transaction, provider-process-group).
- pnpm 없는 하네스(운영 encoder로 systemd-run -> sh -> wrapper -> bwrap
  -> prlimit -> provider 실행)에서 실행 기록 20회 중 20회 완전.
- tsc(tsconfig.node.json, tsconfig.test.json), eslint 통과.
2026-11-01 20:50:00 +09:00
DongHyeonka 49d8675f97 fix(design-system): 컴포넌트 토큰 사용 검사가 이름 전체를 맞춰 본다 (12-01, 12-02)
문제: UI-03 규칙은 source.includes(`var(${token}`)로 독자를 찾는다.
"var(--field-border"가 var(--field-border-invalid) 안에도 있어서, 독자가
0곳이던 --field-border를 통과시켰다. 주석 안의 var(--x)도 독자로 셌다.
그리고 이번 브랜치의 디자인 규칙 4개(포커스 대비, oklab 혼합, 토큰
사용, 첫 글꼴)는 스크립트 본문에 바로 있어서, 규칙을 꺼도 잡는 테스트가
없었다(12-02).

고른 방법:
- 규칙 4개를 scripts/lib/design-system-rules.ts의 순수 함수로 옮긴다.
  입력은 CSS 글자와 토큰 맵이고 출력은 실패 메시지다. 메시지 문구와
  순서는 그대로다.
- 토큰 독자는 var(--name) 또는 var(--name, ...)처럼 이름 전체가 맞아야
  한다. "var"는 대소문자를 무시하고, 사용자 정의 속성 이름은 CSS 규칙
  대로 대소문자를 구분한다.
- 토큰 사용 규칙과 oklab 혼합 규칙은 CSS 주석을 지우고 본다(리뷰 probe
  B5 우회, B12 오탐).
- oklab 혼합 규칙은 대소문자를 무시한다(B1 `in OKLCH` 우회). CSS
  키워드는 대소문자를 구분하지 않는다.
- ui-design-audit.md의 UI-03 행에 다섯 번째 토큰을 적는다.
버린 대안: 12-02가 제안한 --root 인자와 CSS 음성 fixture 폴더. 규칙별
검출을 증명하려면 어차피 실패 메시지를 단언하는 테스트가 필요하고,
순수 함수 단위 테스트가 fixture 파일 없이 같은 것을 증명한다. 게이트의
--fixture 모드와 산출물 스키마는 바꾸지 않았다.

위험·한계:
- 주석 제거는 정규식이라 따옴표 문자열 안의 "/*"를 주석 시작으로
  본다. 지금 CSS에는 없다.
- 12-03의 나머지 우회(그라디언트, TSX 인라인, base.css 재정의,
  outline-offset 0, feature CSS)와 12-04의 오탐(-apple-system, deg,
  알파, color-mix 표면)은 그대로다. 포커스·글꼴 규칙은 주석을 지우지
  않는다.
- 게이트의 check:design-system:fixture는 여전히 TSX fixture 두 개만으로
  "기대 실패"를 채운다. CSS 규칙 회귀는 test:unit이 잡는다.

검증:
- RED(규칙을 동작 그대로 옮긴 상태): tests/unit/design-system-rules.test.ts
  11개 중 5개 실패. "does not count a longer token that starts with the
  same name"이 "expected [] to deeply equal [ Array(1) ]"로 실패했다.
  나머지 4개는 대문자 OKLCH, 주석 안 혼합, VAR( --x , ...) 형태, 주석
  안 독자.
- 고친 검사를 앞 커밋 전 CSS(402e1db)에 돌리면 "component token
  --field-border is defined but no style reads it"으로 실패했다.
- GREEN: 같은 파일 11/11 통과. tests/unit 166파일 2364개 통과.
- 변이: 대비 기준 < 0, 혼합 정규식 무력화, 토큰·글꼴 판정 무조건
  통과로 바꾸면 규칙마다 실패 테스트가 하나 이상 깨졌다(7/11 실패).
- check:design-system PASS, --fixture는 기대대로 실패. tsc(app, node,
  test) 통과, 바꾼 파일 eslint 통과, verify-documentation PASS_SCOPED.

Refs: docs/reviews/2026-11-01-maturity-review/12-guardrails-ci.md 12-01, 12-02
2026-11-01 19:07:05 +09:00
DongHyeonka 35b183b64f fix(design-system): 라이트 포커스 링이 모든 표면에서 3:1을 넘게 한다 (UI-01)
라이트 --color-focus가 흰 패널에서 2.33:1, surface-muted에서 1.95:1로
WCAG 1.4.11 기준(3:1)에 못 미쳤다. 포커스 링은 컨트롤에서 3px 떨어져
그려지므로, 대비를 따질 인접색은 컨트롤 뒤의 표면이다.

라이트 포커스를 oklch(0.52 0.15 230)으로 바꿨다. 가장 낮은 대비가
4.24:1이다. 다크는 그대로다. check:design-system이 두 테마에서 포커스
토큰과 표면 토큰 8종의 대비를 계산하고, 3:1 미만이면 실패한다.
안팎 이중 링은 버렸다. 한 색으로 충분하고 링 모양이 바뀌지 않는다.

위험: 포커스 링 색이 진해져 시각 골든이 바뀐다(별도 커밋에서 갱신).
검증: 토큰을 바꾸기 전 검사가 라이트 표면 8종 모두에서 실패했고,
바꾼 뒤 통과했다. 계산식은 브라우저 실측값 2.33:1과 일치한다
(tests/unit/oklch-contrast.test.ts).
2026-11-01 18:34:28 +09:00
donghyeon-kaandClaude Opus 5.5 15a946fc46 ci(gates): require every verification package script to run in a gate or name why not (12-04)
check-ci-contract only caught test files outside the gates; check:* scripts
such as check:request-fanout and check:remediation-ledger ran nowhere. The
new check reads config/ci/ungated-scripts.json; three checks are now wired
into FE-GATE-010 and FE-GATE-012 and the rest carry a reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:14:42 +09:00
donghyeon-kaandClaude Opus 5.5 49413af045 fix(types): turn on noUnusedLocals and drop the unused declarations (12-12)
VD-01 decision 3 hands unused diagnostics to tsc and turns off ESLint's
no-unused-vars for TS files, but tsconfig.base.json never enabled the
tsc check (D-19). The flag found 46 unused imports, types and helpers
across 22 files; none of them were read, so removing them changes no
behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:32:33 +09:00
donghyeon-kaandClaude Opus 5.5 4805e56ab1 Merge lane/J: test system (10-02, 10-04~10-07, 11-04~11-08, F-2, F-4, F-12, 00-03)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:28:55 +09:00
donghyeon-kaandClaude Opus 5.5 a8520f6dfb fix(fixtures): keep pnpm in a linked fixture from installing (F-4)
pnpm verifies the install before a script, and a fixture running it with
CI=true against an install made without CI saw other settings and installed
through the linked .pnpm and .bin, rewriting the shared lock.yaml and shims.
Every fixture pnpm run now turns that check off; a test pins it for all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:20:12 +09:00
donghyeon-kaandClaude Opus 5.5 8e5c51e813 perf(lab): repeat lab runs, judge the median and pin the measured server (11-07)
One run decided the release gate, the interaction included Playwright round
trips, and a server already on 4173 was measured instead of the build. Runs
now repeat with every sample kept, time the interaction in the page, use
--strictPort and check the served build, and stop the whole preview group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:14:03 +09:00
donghyeon-kaandClaude Opus 5.5 cefb0b2975 fix(service-worker): build the worker from the profile config (06-10)
The worker build read public/config.json, the local profile, even in a
production build (F-8). It now reads dist/config.json and fails when that
document's APP_ENV is not the build's APP_PROFILE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 12:57:41 +09:00
DongHyeonkaandClaude Opus 5.5 9f2305a562 fix(service-worker): ship a self-unregistering worker for REMOVE_REGISTRATION (06-03)
A worker that stops the page from booting had no exit: every off switch was
page code. A REMOVE_REGISTRATION release now writes a service-worker.js that
skips waiting and unregisters itself (D-5), checked end to end in the browser.
The runbook and rollback doc now name only paths that exist in code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 00:21:02 +09:00
DongHyeonkaandClaude Opus 5.5 ed112e56ab Merge lane K: CI, guardrails and release fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:42:40 +09:00
DongHyeonkaandClaude Opus 5.5 331ec84037 feat(supply-chain): list the packages the bundle ships and state what each proof covers (13-12)
The module inventory named dependency modules external:<file>, so no artifact
said which package versions reach the public bundle. It now records
npm:<name>@<version> ids and a packages list. supply-chain.md states what the
SBOM, bundle list and provenance prove, and one SBOM scope mismatch (scheduler).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:19:41 +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 a263d8cc4a fix(release): run the hosting header gate on the deployed release, fixture is UNVERIFIED (13-05)
FE-GATE-019 ran before the release existed and passed by comparing the declared
headers with a copy of themselves. The fixture result is now UNVERIFIED, the
gate runs in the production stage after deployment, and the live probe
requests the entry script the served index.html names (D-14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:03:23 +09:00
DongHyeonkaandClaude Opus 5.5 839205c134 feat(release): re-verify a promoted release in archived mode (13-04)
Provider evidence expires two hours after issue, so no repo tool could
re-verify a release before deploying it later or rolling back to it.
verify:promotion --archived keeps every signature, digest and member check and
judges freshness at the recorded promotion time; the FE-RB-005 drill takes the
extracted release with --release-root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:58:37 +09:00
DongHyeonkaandClaude Opus 5.5 9c8a5f417a fix(bootstrap): show the boot error shell when the app graph fails to evaluate (09-03)
A module that threw while evaluating stopped main.tsx before boot() ran, so the
static loading shell stayed up. The entry now imports the app (boot.tsx)
dynamically and renders the shell on rejection; the shell reads boot messages
without the feature catalog. The preload helper gets its own chunk so lazy
chunks do not import the per-build entry, and the bundle budget counts the
entry's dynamic imports as initial JS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:54:40 +09:00
DongHyeonkaandClaude Opus 5.5 1a1cfe6605 fix(build): make every dist file readable by other users (13-02)
The validated JSON writer creates files 0600, so dist/config.json,
release-manifest.json and runtime-config.schema.json shipped unreadable to a
web server running as another user. The build now adds read bits to dist files;
evidence under artifacts/ stays private.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:52:33 +09:00
DongHyeonkaandClaude Opus 5.5 b0f7944b41 fix(architecture): print why an import is forbidden and where to go (12-11)
Graph violations printed only the rule name and file pair, and ESLint only the
pattern. The graph now prints the import specifier and the rule's comment,
every rule has one, and ESLint pattern groups carry a message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:49:32 +09:00
DongHyeonkaandClaude Opus 5.5 7f2a1607f3 refactor(architecture): move regex import rules into the import graph (12-10, 12-08)
Icon vendor, design-system deep import and realtime composition were regular
expressions beside graph rules, and the regex missed relative deep imports
inside presentation. They are graph rules with fixtures now, with the
components/ui facades and page-templates named. package-script-graph.ts stays;
the reason is recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:33:14 +09:00
DongHyeonkaandClaude Opus 5.5 45ee231bb0 ci: run the CPU-independent scale PR tier in FE-GATE-005 (11-03)
No CI job ran any scale tier, and every tier past pr compares timings only on
the baseline CPU. The pr tier checks counts, bounds and growth shape; it now
includes S2 composition, since S0/S1 stay under the noise floor and let a
quadratic accumulation through. The ungated-test check reads tier paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:23:01 +09:00
DongHyeonkaandClaude Opus 5.5 7f889a6d83 fix(release): record unobserved runbook drill verdicts as UNVERIFIED (11-01, 13-03)
Drills held constant true verdicts and read public/ placeholders, so they
passed with no build or with JS assets deleted. They now check the local dist,
mark boot, live traffic and provider steps UNVERIFIED (exit 3), and FE-GATE-016
is retired because it repeated FE-GATE-025's FE-RB-005 drill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:15:59 +09:00
DongHyeonkaandClaude Opus 5.5 7298275271 ci: move the signed manual a11y review to release gate FE-GATE-028 (08-06)
The signed review is per release candidate, so the merge gate could never pass.
FE-GATE-009 now checks only the record format; the checked-in records are
source-controlled evidence, not command output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:07:53 +09:00
DongHyeonkaandClaude Opus 5.5 926f448fce fix(scripts): point the fixture's pnpm state at the fixture root (00-01)
A copied state file still named the repository as the validated project,
so pnpm inside a fixture re-verified and started an install through the
linked package directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:56:45 +09:00
DongHyeonkaandClaude Opus 5.5 840de45ee7 ci: run every test file in a gate or name why not (12-04, 09-11)
tests/architecture, tests/release, tests/scripts, the top-level
tests/features files and the browser-soak contract now run in
test:coverage (FE-GATE-005); check:adapter-inventory joins FE-GATE-010
and the image resolve-signal type fixture joins FE-GATE-003 (baseline
updated). check:ci fails on a test file no gate command reaches unless
config/ci/ungated-tests.json gives a reason; only the tests/scale suite
is listed, pending 11-03. defineFeatureModule's id mismatch is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:47:10 +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 e771e5e032 fix(scripts): copy pnpm state files into fixture node_modules (00-01)
Linking every top-level entry also linked .pnpm-workspace-state-v1.json,
so pnpm running inside a fixture rewrote the repository's own install
state. Top-level files are now copied; directories stay symlinks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:10:58 +09:00
DongHyeonkaandClaude Opus 5.5 d1a57ae949 fix(build): let the hosting gate accept the selected ACTIVE worker (R3-6)
verify-hosting-headers.ts passed the serviceWorker probe only when
cache-policy.json said `enabled: false` AND dist had no worker script, so no
configuration let a supported ACTIVE build through the hosting gate. The
probe now follows the static selection: ACTIVE requires exactly the selected
`service-worker.js` at the dist root; null / REMOVE_REGISTRATION /
PURGE_OWNED_RESOURCES still reject any worker script. The now-unused
`serviceWorker.enabled` policy flag is removed; the artifact keeps the same
`serviceWorker`/`enabled` probe key.

RED (ACTIVE build from the previous commit, `node scripts/verify-hosting-headers.ts`):
  Hosting cache/content-type/security header verification failed. exit=1
  { surface: serviceWorker, header: enabled, expected: false, observed: true, passed: false }
GREEN: same ACTIVE build -> PASS exit=0 (expected: true, observed: true);
  default build -> PASS; default build + stray dist/service-worker.js -> exit=1
  (reason "dist worker scripts: service-worker.js");
  tests/unit/hosting-probe.test.ts 13 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:42:09 +09:00
DongHyeonkaandClaude Opus 5.5 1e93d30d1f refactor(platform): drop the .tsx re-export, move CI-only policies, derive message locales (Q-6.9-12)
- Delete src/features/reference-feature/presentation/reference-feature-runtime.tsx:
  it only re-exported the same-named .ts and nothing imported it by the
  .tsx path.
- Move promotion-readiness.ts and performance-budgets.ts from
  src/application/policies to scripts/lib: only scripts and their unit
  tests import them. Imports updated in 5 scripts and 2 tests.
  config/testing/risk-coverage.json lists only src modules, so their two
  criticalModules/highRiskPaths entries are removed; the synthetic
  14-file summary fixture now names two other existing src modules.
- installed-feature-messages.ts composes one catalog per locale the
  installed features declare (composeInstalledMessageCatalogs) instead
  of a fixed ko-KR/en-US list that silently dropped other catalogs. The
  exported type still maps each declared locale to its exact key set.

Verified: tests/unit/installed-feature-messages.test.ts (ko-KR/en-US
content pinned first; derived-locale and duplicate-key cases RED before);
app typecheck also passes with a zero-feature generated index; all gates
PASS; check:ci PASS; check-bundle resolves the moved module (stops later
on the absent artifacts/performance/bundle.json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:58:35 +09:00
DongHyeonkaandClaude Opus 5 ebea300e4f refactor: derive the release identity from the package name
The supply-chain builder id and the two verifier ids each hardcoded the
repository name, in three source files plus a copy in the test fixture.
A project derived from this template had to edit all four, and all four
then became permanent conflict points for every merge back from here.

They now read the `name` this repository already declares in
package.json, so deriving a project is one line. The name is read once
at module load from a URL relative to the module itself, not from the
working directory, because these ids end up in signed provenance and
must not depend on where a script was invoked from. A missing or empty
name throws rather than falling back, for the same reason.

The value is hosted in scripts/lib/supply-chain.ts because all three
consumers already import it and it is already registered in
LOCAL_EVIDENCE_VERIFIER_SOURCE_PATHS. A new module would have needed to
join that list, which is itself part of the evidence surface.

This repository's own name is unchanged, so every emitted id is
byte-identical to before.

Also registers the three adapter files that 5cc4146 added without
updating the inventory ledger, which had left check:adapter-inventory
failing on develop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-20 13:47:27 +09:00
donghyeon-ka 5cc41467ae refactor: 프론트 템플릿 리펙토링 2026-09-18 15:16:58 +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
DongHyeonkaandClaude Opus 5 3ea3397691 fix: make the architecture and documentation rules say what is actually true
Three boundaries the layer contract declares had no executable rule behind
them, so the code drifted across all three while every gate stayed green.

`src/contracts` reached back up into `src/application` for the shared `Result`
carrier and the compatibility predicate. Neither package owned the shared
vocabulary and the dependency pointed both ways. Both now live in contracts —
the lower package — and application re-exports them, so no caller moves.

A concrete adapter was not supposed to depend on another concrete adapter, but
only adapter-to-presentation was enforced, and `diagnostics` imported a guard
out of `telemetry`. The guard belongs to neither, so it moved to the adapter
kernel. Stating the rule needed the checker to resolve `$1` in a `to` pattern
against the importing module's own directory; the alternative is one rule per
adapter group, which silently stops covering a group the moment one is added.

Product assembly leaks out of bootstrap: generic presentation reads the
installed-feature registries. That is a real refactor, so the rule freezes the
exact set of modules doing it today rather than pretending it is fixed — a new
edge fails. The two remaining open edges are named in the config, not silent.

Each rule was verified by introducing the violation it forbids and confirming
the gate rejects it.

The documentation drifted the same way. README and the manual accessibility
checklist both said six routes while ten were registered, which left the
platform overview and three reference-resource screens outside the declared
manual review scope without anyone deciding they should be. The scope is now
derived from the route registry by `verify:documentation`, so the sentence
cannot outlive the registry again. The review ledger also named a canonical
path that does not exist in this tree; it is upstream provenance, and it now
says so instead of looking like a broken repository reference.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 17:23:10 +09:00
DongHyeonkaandClaude Opus 5 dfb7734674 fix: run the provider sandbox and admit a release to a named environment
The provider sandbox never ran. bubblewrap 0.9.0 stops parsing an `--args`
file at the first non-option and never hands the remainder back, so the
command written into that file was silently dropped: bwrap printed its usage
text, exited 1, and the provider produced no evidence at all. The options
still travel in the args file — that is what keeps host paths and credentials
out of `/proc/<pid>/cmdline` — but the command now rides on real argv, and
`encodeProviderBwrapInput` refuses a `--` so the drop cannot come back.

The scope wrapper then could not exit. It read the supervisor's liveness pipe
through `fs`, which runs a blocking `read(2)` on a threadpool thread; the
supervisor holds that pipe open for the scope's whole life, so the read never
returned and closing the descriptor did not interrupt it. Once bubblewrap
finished the wrapper deadlocked in `process.exit`, the scope outlived the
provider, and a completed run was reported as a timeout kill. The channel is
now read through the event loop, so teardown is observable and terminal.

Creation modes were left to the ambient umask. `mkdir(mode)` and `open(mode)`
are requests the kernel subtracts the umask from, so a runner exporting a
restrictive umask produced directories it could not enter and handed `tar` a
file it could not re-open. Private modes are pinned instead of inherited.

Promotion cleanup deleted before it checked. Removals run through a pinned
descriptor, so a leaf substituted after validation had this promotion's exact
five destroyed first and the substitution reported afterwards, leaving a
half-emptied directory a retry could not tell from a completed one. The name
is re-bound to the inode before anything is removed, so the failure is total.

Separately, release coherence proved the artifacts agreed with each other but
never that they belonged where they were going: a build whose runtime document
said `APP_ENV: local`, `AUTH_MODE: demo` and a loopback API is coherent with
itself and passed every gate. `public/` is copied verbatim into `dist/`, so
that local document shipped with every build regardless of what the build was
for. Runtime configuration now comes from a declared profile, and FE-GATE-027
refuses to admit an artifact to an environment it does not match — including
refusing an undeclared destination, so nothing is admitted by omission.

`REQUEST_TIMEOUT_MS` and `VITE_ROUTER_BASE_PATH` were validated and then
dropped: the V3 executor ran every operation on its contract's own deadline,
and Vite emitted root-absolute assets for a sub-path deployment. The timeout is
now a ceiling that may tighten a contract but never loosen one, and one base
path feeds the router, the Service Worker scope and the asset base together.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 16:38:19 +09:00
DongHyeonkaandClaude Opus 5 250531aa43 fix: stop test fixtures from deleting the repository's dependencies
Four fixtures linked the installed dependencies into a throwaway root with a
single directory symlink at <fixture>/node_modules, then ran pnpm inside that
root. pnpm does not recognise the modules directory it finds there and purges
it; with CI=true it does so without a prompt. The purge followed the symlink and
deleted the repository's own node_modules mid-run, so a test suite uninstalled
the workspace it was running in. That is what produced the cascading,
file-unrelated failures a full test:unit run reported, and it happened twice
while running the suites for the adapter re-review.

scripts/lib/fixture-node-modules.ts replaces all four sites: node_modules is a
real directory whose entries are individual symlinks, so a recursive delete
unlinks the fixture's own links instead of walking through one link into the
shared tree. Resolution is unchanged.

tests/unit/fixture-node-modules.test.ts performs the exact recursive delete pnpm
performs and asserts the source tree survives, and check:adapter-inventory now
fails on any reintroduction of the directory-symlink form — verified by putting
the old line back and watching the gate reject it.

A full tests/unit + tests/integration run now leaves the dependencies intact.
removal-fixture, supply-chain and security-followup-archive, the three suites
that had to be excluded before, pass in that run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 16:08:32 +09:00
DongHyeonkaandClaude Opus 5 58efe6ddbd fix: make Service Worker cache and removal outcomes truthful
SW-URL-01: canonicalize each generated root-relative manifest URL against the
registration scope once, re-check same-origin, and share that absolute identity
across install cache keys, fetch classification and cache lookup or delete.
Previously every verified asset fell through to the network.

SW-01: serve verified static requests only from the current release cache. A
CacheStorage-wide match could return a previous release's response for the same
URL while the delete targeted a cache that was never read. The worker scope
facade no longer exposes a wide match at all.

SW-02: cache reset deletes only names that parse as owned, so a foreign cache
sharing the ca-static-v1- prefix survives.

SW-03: unregister() resolving to false is a FAILED unregister, not UNREGISTERED.

SW-04: staged removal reports what happened - ABSENT, UNREGISTERED and PURGED
map to DISABLED, OWNERSHIP_MISMATCH to INCOMPATIBLE and FAILED to FAILED - so a
later release cannot delete the worker while a registration or owned cache is
still present.

SW-05: add the runtime-neutral service-worker-static-manifest codec that owns
exact row keys, the extension and content-type allowlist, the root-relative URL
rule and the length-prefixed canonical bytes. The generator and the build gate
hash those same bytes, and the build gate now decodes and recomputes the set
digest instead of type-casting the manifest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 00:25:11 +09:00
DongHyeonka 4dc033cf33 refactor: adapter 구현중.. 2026-08-13 16:02:21 +09:00
DongHyeonka 30ceac23c1 fix: harden provider and promotion evidence 2026-08-02 16:28:24 +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
DongHyeonka 1bb2cc4a20 refactor: generate CI workflow from gate contracts 2026-08-02 13:53:25 +09:00
DongHyeonka d2eb320936 test: harden HTTP scenario execution evidence 2026-08-02 11:36:27 +09:00