diff --git a/README.md b/README.md index f3571916..be85eada 100644 --- a/README.md +++ b/README.md @@ -337,6 +337,18 @@ for gate in 001 002 003 004 005 006 007 008 009 010 011 012 013 020; do corepack pnpm ci:gate -- "FE-GATE-$gate" || break done ``` + +To run them as the workflow does, give the workflow's environment first. +`CI=true` makes the runner and the release build require the CI build +identity; builds a test makes of a copy (fixture builds, the visual goldens' +build, the dev servers of the browser tests) run as local builds whatever this +says (`localBuildEnvironment` in `scripts/lib/build-environment.ts`). Run it in +a clean clone: `ci:gate` stops a gate at its first failing command. + +```bash +export CI=true VITE_COMMIT_SHA="$(git rev-parse HEAD)" VITE_BUILD_ID=local-ci-1 \ + RELEASE_ID=local-ci-1 CI_RUNNER_IMAGE="local/runner@sha256:$(printf 'a%.0s' $(seq 64))" +``` Machine-readable evidence is written below `artifacts/`; generated evidence is ignored by Git while `.gitkeep` files preserve the taxonomy. diff --git a/docs/manual/01-add-a-feature.md b/docs/manual/01-add-a-feature.md index 7d1d89a6..6128b020 100644 --- a/docs/manual/01-add-a-feature.md +++ b/docs/manual/01-add-a-feature.md @@ -667,3 +667,4 @@ corepack pnpm test:sample-removal -- --feature=invoice-feature - 생성 명령의 드릴(`test:feature-scaffold`)도 merge 단계 명령으로 이 검사를 돈다. - 참조 기능이 설치돼 있으면 초기 JS 기록(config/scale/feature-shape-ceilings.json)도 기능과 함께 바뀐다. test:unit이 빌드와 대조한다. 생성 명령 출력 `Next:` 3번의 명령으로 다시 쓰고 같은 커밋에 넣는다. 기능 제거 드릴(`test:sample-removal -- --feature=`)은 지운 뒤 기록을 다시 쓰고 검사한다. - 로컬에서 FE-GATE-013을 돌리려면 `VITE_COMMIT_SHA=$(git rev-parse HEAD)`를 준다. 없으면 release candidate가 `source.revision`을 거절한다. 실패한 게이트의 로그는 `artifacts/quality/gates/FE-GATE-.txt`에 있다. +- workflow와 같은 조건으로 돌리려면 README 로컬 merge 게이트 반복문 아래의 env 블록대로 `CI=true`와 CI 빌드 식별값(`VITE_COMMIT_SHA`, `VITE_BUILD_ID`, `RELEASE_ID`, `CI_RUNNER_IMAGE` digest)을 주고 깨끗한 clone에서 돌린다. 이 값 없이 통과해도 CI에서 떨어질 수 있다(1103/11-07, 11-08). diff --git a/scripts/create-feature.ts b/scripts/create-feature.ts index 1ccc7a63..15ed740b 100644 --- a/scripts/create-feature.ts +++ b/scripts/create-feature.ts @@ -1749,7 +1749,7 @@ function report(plan: FeaturePlan): string { .join(", ")} (FE-GATE-028). The merge gates check only their format.`, " 2. Run the merge gates: corepack pnpm ci:gate -- FE-GATE- 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-.txt. Locally FE-GATE-013 needs VITE_COMMIT_SHA=$(git rev-parse HEAD).", + " A failing gate's log is artifacts/quality/gates/FE-GATE-.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.", " public/release-manifest.json (the dev server's manifest) now names the feature's contract package; commit it with the feature.", " The registry baseline does not change: new routes, operations, schemas and invalidation topics are additive.",