Commit Graph
22 Commits
Author SHA1 Message Date
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
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
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 710436bc2e fix(ci): pin each diagnostics fixture violation with its own ts-expect-error (07-05)
The gate only matched one diagnostic string, so widening the telemetry event
name or the diagnostic level still counted as the expected failure. Each
violation now has its own directive and the fixture must compile cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 00:22:08 +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 b8cc5d4995 ci: run the workflow on pushes to main and state the local merge check (12-01)
The push trigger listed only develop, while main is the integration
branch. README now says the host may not run Actions and gives the local
loop over the 13 merge gates. Enabling Actions and required checks on the
host stays with the repository owner (U-1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:38:22 +09:00
DongHyeonkaandClaude Opus 5.5 239b22ae1a fix(ci): run every gate a non-matrix job owns and refuse profile/target mismatch (12-02, 13-01)
The generator rendered only gateIds[0] for non-matrix jobs, so
immutable_build never ran FE-GATE-027 and the snapshot test pinned that.
Each owned gate now gets its own run step, check:ci rejects a workflow in
which any contract gate has no run step, and release admission refuses
APP_PROFILE != RELEASE_TARGET. Both variables are documented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:36:27 +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
donghyeon-ka ec7f20e2ee refactor: 프론트엔드 리펙토링 2026-09-18 22:05:42 +09:00
donghyeon-ka 5cc41467ae refactor: 프론트 템플릿 리펙토링 2026-09-18 15:16:58 +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
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