Carries 359 template commits, tag v0.2.0 plus one documentation commit: the generator-built feature index with its app, bounded-context and feature declarations, the src/platform kernel and scale tooling, the 2026-09-24 src review fixes, and the 2026-09-25 maturity review round with its CHANGELOG [보안]/[계약] rows. 691 of the 824 template paths are applied, 85 of them merged with product changes; 127 are not carried. Product identity is unchanged: name, version 0.1.0, routes, design and the TechLog domain. Three decisions worth naming. TechLog stays composed directly, as the last two syncs recorded; its directory carries a NOT_INSTALLED marker that says so, and every installed-* composer takes the template's projection with TechLog added on top. The reference sample is no longer installed: the template now installs a feature only through feature-module.ts and context-routes.ts, which load the screens this product deleted, so its three operations, six schemas and one topic leave the registries, recorded as registry change evidence. And AppRouter mounts the platform and TechLog routes only; the template's bounded-context route gateway waits for a generator-installed feature. Required fixes: readSubject on the BFF session owner (without it every HTTP Studio session would close as integration-failed), zod through the facade in nine TechLog files, noUnusedLocals, and public/config.json written out to match the local profile. Derived baselines were recomputed after reproducing both sides' values: CI contract 101 commands / 106 references / 141 artifacts, gate shape c9adcf85; registry approval 2dc6c3a3; the runtime config schema baseline equals the schema at8210d48. Verified here: types, lint, architecture, adapter inventory, CI contract, i18n, design system, diagnostics, browser security, dev release manifest, TechLog contract and build pass; 220 component, 155 integration, 15 contract, 418 TechLog, 43 reference-feature, 18 recipe and 46 release-coherence tests pass, and 2381 of 2383 unit tests. Reproduced at8210d48first and unchanged: check:registries (byte-identical), test:runtime-schema, verify:documentation. Brought by the template and escalated rather than suppressed: check:request-fanout on TechLog's cursor pagination, check:remediation-ledger (fails upstream too), the shared-chunk hash test, and the registry-dependent sample removal and second-feature tests. Playwright suites were not run. Full record, the five open questions and the follow-ups in docs/operations/template-sync-2026-09-29.md. (cherry picked from commit b2170cf265dea45dc9cc05d3c61e627e97f31cdb)
77 lines
4.6 KiB
Markdown
77 lines
4.6 KiB
Markdown
# Performance evidence contract
|
|
|
|
Performance evidence is deliberately split by measurement context:
|
|
|
|
- `bundle.json` records production build output and enforces initial JavaScript
|
|
at 200 KiB gzip and every lazy chunk at 120 KiB gzip.
|
|
- `lab.json` records Chromium/runner/viewport/network/CPU/cache/build context and
|
|
enforces LCP 2.5 s, CLS 0.10, and the named route interaction at 200 ms.
|
|
- `field-web-vitals.json` records consent-filtered, route-ID aggregated,
|
|
release-specific production samples over 28 days and evaluates p75 LCP, CLS,
|
|
and INP against 2.5 s, 0.10, and 200 ms.
|
|
|
|
## 번들 예산의 기준선과 여유
|
|
|
|
리뷰 13-14. 예산은 `config/performance/budgets.json`에 있고
|
|
`scripts/check-bundle.ts`가 강제한다. 템플릿 기본 화면만으로 초기 JS 예산의
|
|
96%를 쓴다. 첫 기능을 추가하기 전에 아래 숫자를 보고 예산을 정한다.
|
|
|
|
| 항목 | 값 |
|
|
|---|---|
|
|
| 초기 JS 예산 | 204,800 gzip bytes(200 KiB) |
|
|
| 템플릿 기준선(2026-09-25 측정) | 196,573 gzip bytes. 빌드 ID가 번들에 들어가므로 빌드마다 수백 바이트 달라진다(196,386~196,623 관측) |
|
|
| 여유 | 약 8,200 bytes(4%) |
|
|
| lazy chunk 예산 | 파일마다 122,880 gzip bytes(120 KiB). 기준선의 가장 큰 lazy chunk는 약 8 KB |
|
|
|
|
초기 JS 9개 파일 중 세 개가 대부분이다. `index` 93.5 KB, `design-system`
|
|
65.6 KB, `preload-helper` 28.5 KB(zod 포함). 나머지 여섯은 합쳐 9 KB 정도다.
|
|
|
|
측정 조건:
|
|
|
|
- 초기 파일은 Vite manifest의 entry와 그 static import다
|
|
(`scripts/lib/classify-vite-bundle.ts`). dynamic import chunk는 lazy다.
|
|
- 합계는 JavaScript만 센다. CSS(`index-*.css`, 8.5 KB gzip)는 예산에 들어가지
|
|
않는다.
|
|
- gzip은 Node `zlib.gzipSync` 기본 수준(6)으로 잰다
|
|
(`scripts/lib/release-candidate.ts`). 호스팅이 brotli로 보내면 전송 크기는 더
|
|
작다. 예산은 gzip 기준 그대로 둔다.
|
|
- Node·pnpm·runner 이미지는 `artifacts/performance/bundle.json`의 `context`에
|
|
기록된다.
|
|
|
|
예산을 올릴 때는 이 표의 기준선과 새 측정값, 이유를 같은 변경에 적는다.
|
|
|
|
lab 측정(`scripts/test-performance.ts`, FE-GATE-026)은 local 프로필 build를
|
|
`vite preview --strictPort`로 띄워 잰다(리뷰 11-07).
|
|
|
|
- 포트는 `LAB_PERFORMANCE_PORT`(기본 4173)다. 서버를 띄우기 전에 그 포트가
|
|
이미 응답하면 실패하고, 응답하는 `/release-manifest.json`의 build·release가
|
|
로컬 `dist/release-manifest.json`과 다르면 실패한다
|
|
(`scripts/lib/lab-performance.ts`, `tests/unit/lab-performance.test.ts`).
|
|
- 새 브라우저 context에서 `--runs=N`(기본 5)번 재고, 예산은 중앙값으로
|
|
판정한다. 모든 측정값과 최소·최대는 `lab.json`의 `context.sampling`에 남는다.
|
|
- named interaction은 페이지 안의 시계로 잰다. 클릭 이벤트의 `timeStamp`부터
|
|
대상 heading이 DOM에 들어온 시각까지다. Playwright 왕복 시간은 들어가지 않고,
|
|
lazy chunk 다운로드(200 KB/s 제한)는 들어간다. 클릭의 Event Timing entry
|
|
길이(INP의 입력값)는 `context.sampling.clickEventDurationMs`에 따로 남는다.
|
|
- CPU 모델, 논리 CPU 수, 측정 전후 loadavg를 `context.runner`에 남긴다.
|
|
- preview 서버는 자기 프로세스 그룹으로 띄우고 끝날 때 그룹 전체를 멈춘다.
|
|
`corepack`에만 신호를 보내던 때는 vite가 포트를 계속 잡고 있었다.
|
|
|
|
2026-09-27 한 빌드를 10회 잰 결과(i5-10400F 12 CPU, loadavg 11~17): 중앙값
|
|
LCP 2,386ms, interaction 184.5ms로 통과했다. 한 번씩 판정했다면 interaction
|
|
10회 중 4회(최대 274ms), LCP 10회 중 2회(최대 2,644ms)가 실패였다. 같은
|
|
빌드를 loadavg 7~9에서 다시 10회 재면 interaction 120~148ms, LCP
|
|
1,968~2,072ms로 모두 통과했다. 한 번 측정한 판정은 호스트 부하에 따라
|
|
뒤집히고, 중앙값 판정은 두 번 모두 통과였다.
|
|
|
|
The field minimum eligible-sample threshold is intentionally unresolved until
|
|
a privacy-approved telemetry baseline exists. Therefore the field command
|
|
fails closed with `FAIL_UNVERIFIED` when run against the example input. Provide
|
|
`FIELD_WEB_VITALS_INPUT` and `MIN_ELIGIBLE_SAMPLES` only after that decision is
|
|
recorded. The external input must identify a production release and an exact
|
|
28-day export window, name the source/export, carry privacy-approval and
|
|
threshold-decision references, and contain only non-negative route-ID samples.
|
|
The environment threshold must be a positive integer equal to the approved
|
|
decision embedded in the input. Invalid metadata fails as `FAIL_UNVERIFIED`;
|
|
the example can never serve as production evidence.
|