diff --git a/docs/operations/ci-quality-gates.md b/docs/operations/ci-quality-gates.md index 24b9231a..1634e3af 100644 --- a/docs/operations/ci-quality-gates.md +++ b/docs/operations/ci-quality-gates.md @@ -40,7 +40,7 @@ Playwright 설정의 `testDir`를 모아 비교한다(`scripts/lib/ungated-tests 한다. 게이트가 이미 돌리는 파일을 이 목록에 남겨 두면 실패한다. package script도 같은 방식으로 확인한다(`scripts/lib/ungated-scripts.ts`). -`check:*`·`verify:*`·`test:*`·`drill:*`·`review:*` 스크립트는 게이트 명령에서 +`check:*`·`verify:*`·`test:*`·`drill:*`·`review:*`·`scan:*` 스크립트는 게이트 명령에서 package script 그래프로 닿거나, 게이트가 이미 돌리는 Vitest 경로만 다시 돌려야 한다. 둘 다 아니면 `config/ci/ungated-scripts.json`에 이유와 함께 적는다. 게이트가 닿는 스크립트를 이 목록에 남겨 두면 실패한다. 두 목록에 남은 항목과 이유는 각 diff --git a/package.json b/package.json index 91ee6cd2..4ee15624 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "scripts": { "dev": "node scripts/generate-product-feature-index.ts && vite", "build": "node scripts/generate-product-feature-index.ts && node scripts/build-frontend.ts", - "build:profile": "node scripts/generate-runtime-config.ts", "build:release-candidate": "node scripts/generate-product-feature-index.ts && corepack pnpm build && corepack pnpm generate:supply-chain && corepack pnpm scan:security && corepack pnpm verify:release && node scripts/verify-supply-chain-artifacts.ts && node scripts/create-release-candidate.ts", "preview": "vite preview", "lint": "eslint src scripts tests recipes .storybook vite.config.ts vitest.config.ts playwright*.config.ts --max-warnings=0", @@ -93,7 +92,6 @@ "check:supply-chain:provider-fixtures": "node scripts/generate-product-feature-index.ts && node scripts/check-supply-chain-provider-fixtures.ts", "verify:reproducible-build": "node scripts/generate-product-feature-index.ts && node scripts/verify-reproducible-build.ts", "scan:security": "node scripts/security-scan.ts", - "scan:security:fixture": "node scripts/security-scan.ts --policy tests/fixtures/security/secret-detection/forbidden-policy.json --artifact artifacts/security/scan-fixture.sarif", "check:security:fixtures": "node scripts/check-security-fixtures.ts", "check:browser-security": "node scripts/check-browser-security.ts", "check:browser-file-storage-boundaries": "node scripts/check-browser-file-storage-boundaries.ts", @@ -122,8 +120,6 @@ "check:ci": "corepack pnpm check:artifact-schemas && node scripts/check-ci-contract.ts && corepack pnpm check:ci-workflow", "update:ci-contract-baseline": "node scripts/update-ci-contract-baseline.ts", "verify:documentation": "node scripts/generate-product-feature-index.ts && node scripts/verify-documentation-readiness.ts", - "build:app-only": "node scripts/generate-product-feature-index.ts && vite build && node scripts/generate-build-manifest.ts", - "generate:contract-set": "node scripts/generate-product-feature-index.ts && node scripts/generate-contract-set.ts", "check:types:web-worker": "tsc --project tsconfig.web-worker.json", "check:types:service-worker": "tsc --project tsconfig.service-worker.json", "check:types:fixture:http-operation-input": "tsc -p tests/fixtures/typecheck/tsconfig.http-operation-input.json", diff --git a/scripts/lib/ungated-scripts.ts b/scripts/lib/ungated-scripts.ts index b774ee8b..a1ee238c 100644 --- a/scripts/lib/ungated-scripts.ts +++ b/scripts/lib/ungated-scripts.ts @@ -12,7 +12,7 @@ import { reachablePackageScripts } from "./package-script-graph.ts"; */ export const UNGATED_SCRIPTS_PATH = "config/ci/ungated-scripts.json"; -const VERIFICATION_SCRIPT = /^(?:check|verify|test|drill|review):/u; +const VERIFICATION_SCRIPT = /^(?:check|verify|test|drill|review|scan):/u; const ungatedScriptsSchema = z .object({ diff --git a/tests/unit/product-index-entrypoints.test.ts b/tests/unit/product-index-entrypoints.test.ts index 85d7b97c..dea64a61 100644 --- a/tests/unit/product-index-entrypoints.test.ts +++ b/tests/unit/product-index-entrypoints.test.ts @@ -9,7 +9,6 @@ const GENERATE = "node scripts/generate-product-feature-index.ts && "; // Entry points the import walk below cannot see (tsc, vite, storybook). const NON_NODE_ENTRY_SCRIPTS = [ "dev", - "build:app-only", "storybook", "build:storybook", "check:types:app", diff --git a/tests/unit/ungated-scripts.test.ts b/tests/unit/ungated-scripts.test.ts index ea917d96..2ac5cfef 100644 --- a/tests/unit/ungated-scripts.test.ts +++ b/tests/unit/ungated-scripts.test.ts @@ -71,6 +71,20 @@ describe("ungated verification scripts", () => { ]); }); + // 12-05: scan:security:fixture stayed in package.json after FE-GATE-013 + // replaced it with check:security:fixtures, because scan: was not a + // verification family. + it("rejects a scan script that no gate reaches", () => { + expect( + ungatedScriptFailures({ + ...fixture, + scripts: { ...fixture.scripts, "scan:orphan": "node scripts/scan.ts" }, + }), + ).toContainEqual( + `verification script is not reached by any CI gate command and is not in ${UNGATED_SCRIPTS_PATH}: scan:orphan`, + ); + }); + it("counts a Vitest subset as gated only when a gate runs every path", () => { const failures = ungatedScriptFailures(fixture); expect(failures.join("\n")).not.toContain("check:subset");