From 2e4595e2ffafe8c3484ae27af0d017c0dadfc723 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Thu, 5 Nov 2026 02:22:27 +0900 Subject: [PATCH] =?UTF-8?q?fix(scaffold):=20=EA=B8=B0=EB=8A=A5=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=93=9C=EB=A6=B4=EC=9D=B4=20=EC=83=9D=EC=84=B1=20?= =?UTF-8?q?=EB=92=A4=20=EC=B4=88=EA=B8=B0=20JS=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?=EC=9D=84=20=EB=8B=A4=EC=8B=9C=20=EC=93=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제 test:feature-scaffold(12-02)는 기능 둘을 생성한 fixture에서 merge 단계 명령을 돈다. 15-02의 test:unit은 초기 JS 기록 (config/scale/feature-shape-ceilings.json)을 빌드와 대조한다. 두 브랜치를 합치자 드릴 안의 test:unit·test:coverage가 "initialJavascript is stale"로 실패해 FE-GATE-020이 떨어진다. 제품은 생성 명령 Next: 3번대로 기록을 다시 쓰지만 드릴은 그 단계를 하지 않았다. 고른 방법 - 생성이 성공하면 fixture를 봉인하기 전에 measure-feature-shape-growth.ts --initial-baseline --write를 돌린다. 측정 스크립트가 없으면(샘플이 없으면) 건너뛴다. 결과는 별도 검사(initial-javascript-record)로 보고한다. 위험·한계 - 드릴이 빌드 한 번만큼 길어진다. 검증 - check:types, eslint 통과. FE-GATE-020은 깨끗한 clone에서 다시 돈다. Refs: docs/reviews/2026-11-03-maturity-review/12-guardrails-ci.md 12-02, 15-performance.md 15-02 --- scripts/test-feature-scaffold.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/test-feature-scaffold.ts b/scripts/test-feature-scaffold.ts index 6a097718..3ed300d6 100644 --- a/scripts/test-feature-scaffold.ts +++ b/scripts/test-feature-scaffold.ts @@ -1,5 +1,7 @@ import { spawnSync } from "node:child_process"; +import { existsSync } from "node:fs"; import { mkdir, rm, writeFile } from "node:fs/promises"; +import path from "node:path"; import { loadCiGateContract } from "./contracts/ci-gates.ts"; import { @@ -67,6 +69,26 @@ try { ]); const checks: RemovalCheck[] = [created, createdWrite]; if (created.passed && createdWrite.passed) { + // The generator's Next: 3. A project re-records the initial JavaScript + // with its features (config/scale/feature-shape-ceilings.json, which + // test:unit compares with a build) and commits it with them. Without the + // sample there is no record to keep. + const measurement = "scripts/scale/measure-feature-shape-growth.ts"; + if (existsSync(path.join(fixtureRoot, measurement))) { + const recorded = spawnSync(process.execPath, [measurement, "--initial-baseline", "--write"], { + cwd: fixtureRoot, + stdio: "inherit", + }).status; + checks.push( + recorded === 0 + ? { name: "initial-javascript-record", passed: true } + : { + name: "initial-javascript-record", + passed: false, + failure: `node ${measurement} --initial-baseline --write exited ${recorded ?? "on a signal"}`, + }, + ); + } // Commits the copy with the feature, as a project would: git-based // checks (git grep, git ls-files) then see the feature's files. sealRemovalFixtureRepository(fixtureRoot);