test(scale): 규모 측정을 참조 기능 대신 생성 기능 사본으로 잰다
규모 측정(S4 3.1절 S-6)은 참조 기능을 복사해 이름을 바꿔 잰다. create:feature의 planFeature로 사본마다 --with-create --keyed 기능 파일을 만든다(자기 계약 패키지와 topic, context당 200개). 초기 JS 기록에 firstFeatureGzipBytes를 더하고, context 비용은 둘째 기능을 새 context에 둘 때와 같은 context에 둘 때의 차이로 잰다. 옛 정의는 기능이 없는 템플릿에서 첫 기능의 공용 코드까지 context 비용으로 세어 5,788B로 상한 512B를 넘었다. 몇 바이트짜리 비용에는 기록 허용치 하한 16B를 둔다(빌드 ID에 따라 gzip이 1~2B 흔들린다). 이 트리(샘플이 아직 있는 상태)의 기록: 204,266B, 27파일, 첫 기능 797B, 기능 521B, context 12B. 위험: 성장 기준선(0·25·100개)은 샘플을 지운 트리에서 뒤 커밋이 다시 잰다. 이 커밋의 기준선 파일은 아직 참조 사본으로 잰 값이다. 검증(desktop): feature-shape-growth 등 4파일 57 passed, test:unit 통과.
This commit is contained in:
@@ -1709,7 +1709,7 @@ export const FEATURE_TRACKED_FILE_REWRITES = Object.freeze([
|
||||
Object.freeze({
|
||||
path: "config/scale/feature-shape-ceilings.json",
|
||||
command: "node scripts/scale/measure-feature-shape-growth.ts --initial-baseline --write",
|
||||
when: "by hand while the sample is installed (the file goes with it): test:unit compares it with a build",
|
||||
when: "by hand with the feature: test:unit compares it with a build",
|
||||
}),
|
||||
]);
|
||||
|
||||
@@ -1772,7 +1772,7 @@ function report(plan: FeaturePlan): string {
|
||||
" 2. Run the merge gates: corepack pnpm ci:gate -- FE-GATE-<NNN> for each gate of the merge stage in config/ci/gates.json (README lists the loop). test:feature-scaffold runs them on a generated feature except the browser gates FE-GATE-008/009 and test:system.",
|
||||
` The feature's own tests: node scripts/run-vitest.ts run tests/features/${plan.id} (test:coverage runs them in CI)`,
|
||||
" A failing gate's log is artifacts/quality/gates/FE-GATE-<NNN>.txt. Locally FE-GATE-013 needs VITE_COMMIT_SHA=$(git rev-parse HEAD); to run them as CI does, set CI=true and the CI build identity (README).",
|
||||
" 3. The initial JavaScript changes. While config/scale/feature-shape-ceilings.json exists (the sample is installed), rewrite it with node scripts/scale/measure-feature-shape-growth.ts --initial-baseline --write and commit it with the feature; test:unit compares it with a build. corepack pnpm check:bundle checks the budget.",
|
||||
" 3. The initial JavaScript changes. Rewrite config/scale/feature-shape-ceilings.json with node scripts/scale/measure-feature-shape-growth.ts --initial-baseline --write and commit it with the feature; test:unit compares it with a build. corepack pnpm check:bundle checks the budget.",
|
||||
" public/release-manifest.json (the dev server's manifest) now names the feature's contract package; commit it with the feature.",
|
||||
" Two feature branches change the same lines of these files. On a merge conflict, take either side and run the command again:",
|
||||
...FEATURE_TRACKED_FILE_REWRITES.map((file) => ` ${file.path}: ${file.command}`),
|
||||
|
||||
Reference in New Issue
Block a user