Commit Graph
12 Commits
Author SHA1 Message Date
DongHyeonka 67082cc15e fix(ci): gate 모양 기준선이 FE-GATE-013의 러너 요구도 본다
1105/12-01 수정이 gate 정의에 `hostRequirements`(러너가 갖춰야 할 것)를
더했지만, 기준선의 gate 모양 해시(`canonicalGateShapeSha256`)에서는
뺐다. 그래서 누가 이 요구를 지우거나 바꿔도 `contract-baseline.json`이
알아차리지 못하고 `check:ci`가 통과한다. 요구가 사라지면 workflow
주석도 사라져, user namespace가 없는 러너에서 같은 원인 불명 실패가
다시 난다.

러너 요구를 gate 모양에 넣는다. 요구를 선언한 gate만 이 키를 갖게 해
다른 gate의 해시는 그대로다. 기준선을 한 번 다시 기록했다(owner
DongHyeonka, reason에 1105/12-01). 버린 대안: 그대로 빼 두기(지우기를
리뷰가 못 본다), 모든 gate에 빈 목록을 넣기(모든 해시가 바뀌고 효과는
같다).

위험·한계: 앞으로 `hostRequirements`를 바꾸려면 기준선 재기록
(`update:ci-contract-baseline`, owner·reason 필수)이 필요하다. 의도한
비용이다.

검증: desktop batch. `tests/unit/ci-workflow-generation.test.ts`의 새
"rejects runner requirement drift through the semantic-shape digest"가
수정 전 코드·기준선에서 실패하고 수정 뒤 통과한다. `check:ci` 통과.

Refs: 1105/12-01
2026-11-05 23:23:28 +09:00
DongHyeonka 26ca2fdb67 ci(security): release 단계가 의존성 advisory를 템플릿 정책으로 판정해 남긴다
문제: 의존성 취약점 판정은 운영 승격의 외부 provider에만 있었다. 로컬
supply chain은 스캔하지 않고 provider: UNCONFIGURED를 썼다. 그래서
lockfile이 템플릿 자신의 정책(high 이상 차단, 예외 0건)을 어겨도 merge·
release 단계에서는 아무 신호가 없었고, provider가 없는 복사본은 끝까지
몰랐다. 갱신 자동화도 없었다(짝 백엔드에는 renovate.json이 있다).

고른 방법:
- scan:dependency-advisories(scripts/scan-dependency-advisories.ts)가
  pnpm audit --json에 config/security/vulnerability-policy.json과
  예외 파일을 적용한다. 판정은 승격이 쓰는 validateVulnerabilityReport를
  그대로 쓴다. 결과는 PASS / POLICY_VIOLATION(승격에서 막힐 항목 목록) /
  UNVERIFIED(레지스트리에 닿지 못함)이고, 운영·개발 의존성별 개수와 함께
  gate 로그와 artifacts/security/dependency-advisories.json에 남는다.
- FE-GATE-027(release-admission, release 단계, 후보 빌드 직후)이 이 명령을
  두 번째로 돈다. 명령은 항상 exit 0이다.
- renovate.json을 둔다(보안 업데이트만, 사람이 리뷰·merge).
- 남은 운영 의존성 위반 2건과 올리지 않은 이유, 다시 볼 날짜
  (2026-12-04)를 ci-quality-gates.md에 적는다.
버린 대안: merge 차단 audit(코드가 안 바뀌어도 advisory DB 변경으로
merge가 깨진다), 로컬 스캐너를 provider로 내장(서명 주체 분리라는 원래
목적이 사라진다), 새 evidence 산출물·스키마 등록(계약 변경이 커진다.
gate 로그가 이미 release 단계 산출물이다).

위험·한계: 비차단이라 신호를 읽는 사람이 있어야 한다. 네트워크가 없는
runner에서는 UNVERIFIED로 남는다. Renovate runner는 붙어 있지 않아
renovate.json은 아직 동작하지 않는다. 남은 zod·react-router high 2건은
dependency-change-evidence의 reviewer(owner와 다른 사람)와 zod의 번들
예산 결정이 있어야 고칠 수 있다. 계약 기준선(contract-baseline.json)을
명령 100개·참조 104개로 다시 기록했다.

검증: dependency-advisories.test.ts 5건(정책 위반 판정, PASS, 유효한
예외, 보고서 없음 → UNVERIFIED, FE-GATE-027 배선과 exit 0). 상태 판정을
PASS로 고정하는 변이를 넣으면 실패한다. 실제 실행: POLICY_VIOLATION
(운영 high 2, 개발 moderate 2), exit 0. 죽은 프록시로 돌리면 UNVERIFIED,
exit 0. check:ci PASS, CI workflow bytes PASS, ci-workflow-generation·
product-ci-overlay·ungated-scripts·removal-fixture·supply-chain 489건 통과,
verify:documentation PASS_SCOPED.

Refs: docs/reviews/2026-11-03-maturity-review/13-build-release-supply-chain.md 13-03
2026-11-04 22:50:22 +09:00
DongHyeonka d166aa39a7 feat(features): 기능 뼈대를 만드는 create:feature 명령과 드릴을 더한다 (U7)
문제
- 새 기능은 참조 기능을 복사해 이름을 바꾸는 방법뿐이다. 리뷰 16 실험 E
  에서 이 방법은 12번 막혔다. 접두어 없는 전역 ID(NoRequest, qinv topic,
  navigationOrder)는 치환으로 바뀌지 않고, 토큰 경계 없는 치환은
  preference·supportReference를 깨뜨린다. 제품이 참조 기능을 지우면 복사할
  원본도 없다.

고른 방법 (결정 D1·D2, 오케스트레이터 결정 2·4)
- scripts/create-feature.ts: pnpm create:feature <id> [--context <ctx>]
  [--package @scope/name@x.y.z --digest sha256:… --revision <hex>].
  템플릿을 이 파일 안에 두고 참조 기능을 import하지 않는다(D1).
  - 뼈대: 파라미터 없는 목록 라우트 1, GET 1(SAFE, EXTERNAL_BEARER),
    쿼리 1, topic 1, CollectionPage 1, ko-KR·en-US 문구. domain/ 없음.
    검증은 공유 zodValidator, 링크는 route ID와 buildRouteUrl
    (<base>-routes.ts). 빈 배열 응답은 공유 빈 상태로 그린다.
  - 전역 ID는 모두 기능 접두어를 단다(D2): 스키마·mapper·operation·
    contribution·policy·diagnostics·chunk·route·namespace·definitionId·
    문구 키·telemetry kind·owner. topic은 qinv. + 무작위 26자(Crockford
    base32)이고 설치된 topic과 겹치면 거부한다. navigationOrder는 설치된
    최댓값 + 10.
  - 패키지 인자가 없으면 결정 2의 자리표시자 상수를 import해 쓰고 경고를
    출력한다. 인자가 있으면 external-contract-runtime의 신원 검사
    (composeContractContributions)로 형식을 확인한다.
  - 거부: kebab이 아닌 id, 기존 기능·context id(디렉터리 이름 포함),
    같은 접두어를 쓰는 기존 기능, 이미 있는 <base>-context(--context 안내),
    같은 라우트 루트·route ID·경로·chunk·문구 키.
  - 폴더 밖은 새 context 선언과 pending a11y 기록만 쓴다. 기존 파일은
    덮어쓰지 않고(wx), 쓰기나 직후 생성기 실행이 실패하면 만든 것을 지운다.
  - 출력: 만든 파일, a11y 서명(FE-GATE-028), 돌릴 게이트 목록, 기준선
    재승인이 필요 없다는 안내, 자리표시자 교체 방법.
- 테스트: tests/unit/create-feature.test.ts(렌더 결과만: 접두어, 샘플
  토큰 없음, topic 형식·중복, 순서, 거부, 덮어쓰기·되돌리기).
  생성된 기능의 테스트는 input 단위 테스트와 런타임 조립·라우터를 거치는
  페이지 테스트다. MSW는 createHttpScenarioHandler(설치 계약)를 쓴다.
- 느린 드릴 test:feature-scaffold: removal-fixture로 만든 복사본(README·
  CHANGELOG·docs 포함)에 기능을 만들고 커밋한 뒤 types, lint,
  architecture, registries, i18n, design-system, diagnostics,
  documentation, unit, component, integration, features, coverage,
  check:ci, build를 돌린다. FE-GATE-020에 넣고 gates.json, 계약 기준선,
  ci-workflow-generation 테스트의 개수를 맞췄다(workflow는 그대로).
- 결정 4: test:sample-removal이 기능 0개 검사 뒤 같은 복사본에서
  create:feature로 기능을 만들고 같은 게이트를 scaffold- 이름으로 다시
  돌린다.
- tests/release 고정 manifest가 계약 집합을 빈 배열로 고정해, EXTERNAL_
  PACKAGE를 쓰는 첫 기능에서 7건이 release-mismatch로 깨졌다. 16-02가
  tests/runtime-schema에 한 것처럼 설치된 집합에서 만든다.
- 버린 대안: 참조 기능 복사+토큰 치환(D1에 어긋나고 전역 ID를 놓친다),
  topic을 뼈대에서 빼기(실제 기능이 같은 문제를 다시 만난다), 생성
  테스트가 tests/mocks의 bootstrap·server를 쓰기(부팅 문서는 테스트 안의
  fetcher가 주고, MSW는 setupServer와 http-scenarios만 쓴다).

위험·한계
- 생성기 파일이 1,408줄이다. 대부분 템플릿 문자열이다.
- context-module.ts는 생성기가 글로 읽는 선언이라 실행되지 않는다(참조
  context와 같다). 나머지 생성 모듈은 생성된 테스트가 모두 실행한다
  (함수 100%, 문장 100%, 페이지 분기 1개 미실행).
- --context reference-context로 참조 context에 넣으면 참조 기능의
  installed-context-routing 테스트(라우트 4개 정확히 일치)가 깨진다.
  드릴은 새 context를 쓴다.
- test:feature-scaffold, test:sample-removal, check:architecture는
  pnpm이 필요해 worktree에서 돌리지 않았다.
- tests/unit/feature-shape-growth.test.ts는 기준 커밋에서도 1 KiB를 넘어
  실패한다(이번 측정 1035·1068). 기능이 하나 더 있으면 통과한다.

검증
- RED: 생성한 기능을 넣고 돌리면 tests/release 7건 실패("expected
  { state: 'release-mismatch' } to match { state: 'booted' }"),
  ci-workflow-generation 1건 실패(98 vs 99). 접두어 테스트는 템플릿의
  스키마 ID를 "NoRequest"로 바꾼 변이에서 실패한다.
- GREEN(worktree에 order-feature 생성): tsc app·test·node rc=0, 전체
  eslint rc=0, check-registries "11 registries PASS; compatibility=
  additive"(기준선 재승인 없음), verify-documentation-readiness
  PASS_SCOPED, check-i18n PASS, check-design-system·check-diagnostics·
  check-adapter-inventory PASS, check-ci-contract·workflow·artifact
  schema PASS, 생성 테스트 7/7, run-vitest tests/unit·component·features
  238파일 통과, integration·contract·runtime-schema·platform·architecture·
  release·scripts 59파일 통과(pnpm을 띄우는 2파일 제외).
- --context reference-context와 --package 변형도 tsc·registries·생성
  테스트 통과. 참조 기능을 지운 복사본에서 생성 → tsc app·test, i18n,
  생성 테스트·release·router 테스트 통과(결정 4 모의).
- 생성물을 지운 뒤 같은 검사 통과(feature-shape-growth 기존 실패 1건
  제외), git status 깨끗.
2026-11-03 06:52:43 +09:00
DongHyeonka de379ea78d ci(release): FE-GATE-019가 승격 후보를 배포된 release와 대조한다 (1101/13-01)
문제
production_gate는 promotion 직후 같은 run에서 시작하고 그 사이에 배포 job이
없다. CI 계약이 job 9개·그래프·env를 정확히 고정해 배포 job을 넣을 자리도
없다. live probe는 헤더만 보고 배포된 release가 승격 후보인지 확인하지
않는다. FE-GATE-019의 명령은 [build, verify-hosting-headers]라서 local
프로필로 다시 빌드한 dist를 검사한다. 그래서 FE-GATE-019 PASS는 "지금 떠
있는 release(대개 이전 것)의 헤더가 맞다"는 거짓 PASS다.

고른 방법 (리뷰 대안 (c), (1)~(3))
(1) live probe가 배포된 release-manifest.json의 buildId·releaseId를 후보와
    비교한다. 다르거나 읽을 수 없으면 FAIL(releaseManifest build-id·
    release-id). 후보는 검사하는 dist의 release-manifest.json이다.
(2) FE-GATE-019에서 build를 뺀다. verify-hosting-headers가
    `--release-root .release/promoted-release`를 받아 후보 dist를 본다.
    계약의 13-03 규칙(drill만 --release-root 필수)을 production_gate의 모든
    게이트 명령으로 넓혔다. 플래그 없이 돌리면 local dist를 본다.
(3) promotion과 production_gate 사이에 `deployment` job(kind deployment)을
    선언한다. 기본은 빈 슬롯이다: deploy 단계 하나가 deployed=false를 job
    output으로 낸다. production_gate는 RELEASE_DEPLOYED로 받고, 비어 있으면
    FE-GATE-019가 호스트를 probe하지 않고 UNVERIFIED(exit 3)로 끝난다.
    프로젝트는 gates.json의 deployment job을 채운다. 계약이 허용하는 것:
    checkout·setup-node·frozen-install·download·extract와 마지막 deploy 하나
    (`script`는 package 스크립트, 존재·스크립트 그래프 검사를 gate 명령과
    같이 받는다). env는 immutable_build의 CANDIDATE_ARCHIVE_SHA256과
    vars.*·secrets.*만. 게이트를 소유하지 않아 채워도 계약 기준선이 안
    바뀐다.
- ci-contract 보고서 jobCount 9→10, 계약 기준선 commandReferences
  103→102(update-ci-contract-baseline, owner frontend-platform).
- verify-hosting-headers가 live가 아닌 모드에서 baseUrl을 null로 적는다.
  스키마가 live에만 baseUrl을 허용해서, 비어 있는 슬롯과 기존 invalid-live
  (예: http:// URL)는 산출물 쓰기에서 ZodError로 죽었다. 이제 기록을 남기고
  각각 UNVERIFIED·FAIL로 끝난다.

버린 대안
- (b) (1)(2)만: 거짓 PASS는 사라지지만 배포 자리가 없어 운영 단계가 항상
  FAIL이 된다.
- (d) production_gate를 별도 workflow로 분리: Gitea에서 run 사이 artifact
  전달이 검증되지 않았다.
- 슬롯이 비었는지를 HOSTING_BASE_URL 유무로 판단: 변수만 있고 배포가 없으면
  이전 release를 probe해 FAIL이 된다. 슬롯이 직접 보고하게 했다.

위험·한계
- Gitea runner가 꺼져 있어 workflow를 실제로 돌리지 않았다. job outputs와
  `$GITHUB_OUTPUT`는 immutable_build가 이미 쓰는 방식과 같다.
- 실제 HTTPS 호스트에 이전 release를 띄워 probe하지 않았다. 불일치 판정은
  fetcher를 주입한 단위 테스트로만 확인했다.
- 채운 슬롯의 secrets는 그 job의 모든 단계(checkout, download action 포함)
  env에 보인다. 프로젝트가 고르는 값이다.
- FE-GATE-019를 수동으로 돌리는 운영자(provider 없는 최소 구성)는 후보
  archive를 .release/promoted-release에 풀어야 한다. drill과 같은 전제다.

검증
- RED: node scripts/run-vitest.ts run tests/unit/hosting-probe.test.ts
  7 failed / 19 passed(후보 인자 없음, verify가 dist ENOENT로 산출물 없음).
  tests/unit/ci-workflow-generation.test.ts 8 failed / 415 passed
  ("expected [ 'build', 'verify:hosting-headers' ] to deeply equal ...",
  "expected -1 to be 6", deployment job 없음)
- GREEN: hosting-probe 26 passed, ci-workflow-generation 423 passed
  (스냅샷 1개 갱신)
- check:ci 하위 명령 직접 실행: generate-artifact-schemas --check PASS,
  check-ci-contract.ts PASS, generate-ci-workflow --check PASS
- 슬롯을 채운 실험(체크아웃→다운로드→extract→deploy:release, vars·secrets
  env, package 스크립트 추가) 뒤 같은 세 명령 PASS. package 스크립트를 빼면
  "CI gate contract missing package scripts: deploy:release"로 실패. 실험
  뒤 원복
- 관련 테스트 16파일 596 passed(ci-workflow-generation, hosting-probe,
  service-worker-build-output, deployment-admission, ungated-*,
  supply-chain, removal-fixture, task3-selective-integration,
  documentation-readiness, tests/release, tests/platform/release)
- tsc(node, test, app) 0, eslint 바뀐 파일 0,
  verify-documentation-readiness PASS_SCOPED
- 미실행: tests/system/ci-runner(pnpm 실행), check:architecture(pnpm)

Refs: docs/reviews/2026-11-01-maturity-review/13-build-release-supply-chain.md 13-01
2026-11-03 00:56:00 +09:00
donghyeon-kaandClaude Opus 5.5 fa3de53106 ci(release): drill the downloaded promoted archive in the production stage (13-03)
FE-GATE-021..025 rebuilt from source and drilled that build, so the drilled
bytes were not the promoted release. production_gate now downloads the
promoted-release artifact, extracts it against immutable_build's digest and
runs each drill with --release-root; the CI contract rejects a rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:25:53 +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
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 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 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