Files
clean-architecture-frontend…/config/scale/feature-shape-ceilings.json
T
DongHyeonka 0fee3fefb9 chore(scale): 합친 빌드로 초기 JS 기록을 다시 적는다
문제: PR B 브랜치를 모두 합친 빌드의 초기 JS가 기록
(`config/scale/feature-shape-ceilings.json`의 `initialJavascript`)과
1,184 B, 파일 하나 다르다(202,927 B·26개 → 204,111 B·27개). 그래서
`tests/unit/feature-shape-growth.test.ts`가 "initialJavascript is stale"로
실패한다. 브랜치마다는 기록과 맞았고(15-02 전 브랜치는 허용 오차 1%,
15-02 뒤는 256 B), 합친 뒤에만 넘는다. 합칠 때마다 잰 증가:
- HTTP 판정·폼 브랜치 +632 B, 초기 파일 하나(`navigation-policy`). 08-03에서
  홈 페이지도 `navigation-policy.ts`를 읽게 되어, boot와 홈 페이지가 나눠
  갖는 청크로 떨어졌다.
- 브라우저 파일·캐시·저장소 +308 B, 계약 +148 B, realtime +72 B,
  테스트 +23 B, 성능·구조 +1 B.

고른 방법: 합친 끝에서
`node scripts/scale/measure-feature-shape-growth.ts --initial-baseline --write`로
다시 적는다(1103 통합의 `f887817`과 같다). `perContextGzipBytes`도
233 → 218 B로 바뀐다.
버린 대안: `navigation-policy`를 기존 청크 그룹에 넣기. 청크 그룹 규칙
(15-01) 변경이라 여기서 정하지 않는다.

위험·한계: 초기 JS 예산 204,800 B(`config/performance/budgets.json`)까지
남은 여유가 689 B다. 기능 하나가 더하는 768 B보다 작다.

검증: desktop batch에서 확인.
node scripts/run-vitest.ts run tests/unit/feature-shape-growth.test.ts

Refs: 1105/15-02, 1105/08-03
2026-11-06 02:59:03 +09:00

48 lines
2.5 KiB
JSON

{
"schemaVersion": 1,
"baseline": "config/scale/feature-shape-growth.json",
"ceilings": {
"contextMaxFeatures": 200,
"appMaxContexts": 20
},
"summary": "The ceilings bound the count; they are not a verified capacity. The practical limit of one app is the initial JavaScript budget, then typecheck memory. 400 features were not measured (D-18 makes it optional).",
"axes": [
{
"axis": "Typecheck of one app",
"verified": "Linear, about 117k instantiations and 36 MB of tsc memory per feature, up to 100 features",
"condition": "Reference-shaped features, tsconfig.app.json, the host recorded in the baseline",
"notVerified": "200 features (one full context) and beyond; 4,000 (20 x 200) would need on the order of 150 GB by the same slope"
},
{
"axis": "Production build",
"verified": "Completes at 100 features in seconds",
"condition": "Same",
"notVerified": "Beyond 100"
},
{
"axis": "Initial JavaScript",
"verified": "15-01: only each feature's declaration (route table, messages, invalidation identities) loads at boot; its runtime half loads with its routes, and a copy adds no initial file. initialJavascript below is the current template build, what one more feature in an existing context adds (perFeatureGzipBytes) and what a new context adds (perContextGzipBytes); tests/unit/feature-shape-growth.test.ts measures them on every unit run, bounds a feature at 1 KiB and a context at 512 B, and fails when the record no longer matches the build. The 25- and 100-copy runs are in the baseline at its source commit (before 15-01: +3,922 B per copy)",
"condition": "Same; the feature-declarations and feature-platform chunk groups in vite.config.ts",
"notVerified": "How many more features fit: the initial budget (config/performance/budgets.json) minus initialJavascript.gzipBytes, divided by perFeatureGzipBytes (plus perContextGzipBytes per new context). The platform itself takes most of the budget"
},
{
"axis": "Lazy JavaScript",
"verified": "About 8.5 KB gzip and eight files per feature, every file far below the 120 KiB lazy-chunk budget",
"condition": "Same",
"notVerified": "Download cost of many lazy files"
},
{
"axis": "Routes",
"verified": "4 per feature, composed without conflict",
"condition": "Same",
"notVerified": "Router matching cost at runtime"
}
],
"initialJavascript": {
"gzipBytes": 204111,
"files": 27,
"perFeatureGzipBytes": 768,
"perContextGzipBytes": 218
}
}