diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6f7e784..0d24d4d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Changed +- Raised the configured desktop and shared-types Vitest coverage thresholds to 100% for lines, functions, branches, and statements, with a regression guard against reintroducing a lower owned JavaScript coverage floor. - Pinned npm `10.9.9` as the approved lockfile generator, activated it through Node-bundled Corepack before dependency consumption, and fail closed unless its bundled `tar` is at least `7.5.19`; primary CI still consumes the committed lock only through frozen `npm ci` validation, rejects mutable npm resolution in the lock gate, requires integrity evidence for public-registry lock entries, and preserves generator-sensitive root `@esbuild/*` peer metadata. ### Fixed @@ -74,4 +75,4 @@ - `ChordsFeature` (코드 분석) 화면에서 각 파트(Role)의 `transpositionPlan`(이조/조옮김 계획)을 표시하는 기능을 추가했습니다. - `RangesFeature` (음역대 분석) 화면에서 겹침 경고(Overlap warning) 외에 해당 파트의 채보(Transcription) 가능 노드 수를 요약하여 보여주는 기능을 추가했습니다. -- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`). \ No newline at end of file +- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`). diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index f1db6f2b8..122903aa2 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -28,10 +28,10 @@ export default defineConfig({ "src/features/score/scoreStorage.ts" ], thresholds: { - lines: 90, - functions: 90, - branches: 90, - statements: 90 + lines: 100, + functions: 100, + branches: 100, + statements: 100 } } } diff --git a/docs/engineering/acceptance-criteria.md b/docs/engineering/acceptance-criteria.md index 6bce19771..ce2f9c0a9 100644 --- a/docs/engineering/acceptance-criteria.md +++ b/docs/engineering/acceptance-criteria.md @@ -25,6 +25,11 @@ Run the narrowest passing set that covers touched areas, and do not claim succes - `npm run test` - `npm audit --workspaces --audit-level=high` +Every repository-configured Vitest coverage gate requires 100% lines, functions, +branches, and statements for its configured production source set. This applies +to both the desktop application and the shared-types package; adding another +owned Vitest source set must not introduce a lower threshold. + When CI/workflow files, supply-chain controls, or release/security docs are changed, also run: - `python3 scripts/checks/verify_supply_chain.py` diff --git a/packages/shared-types/test/coverage-policy.test.ts b/packages/shared-types/test/coverage-policy.test.ts new file mode 100644 index 000000000..48fe23b5b --- /dev/null +++ b/packages/shared-types/test/coverage-policy.test.ts @@ -0,0 +1,12 @@ +import { coverageThresholds } from "../vitest.config"; + +describe("shared-types coverage policy", () => { + it("requires 100% for every configured coverage metric", () => { + expect(coverageThresholds).toEqual({ + lines: 100, + functions: 100, + branches: 100, + statements: 100 + }); + }); +}); diff --git a/packages/shared-types/vitest.config.ts b/packages/shared-types/vitest.config.ts index 14e004545..269601644 100644 --- a/packages/shared-types/vitest.config.ts +++ b/packages/shared-types/vitest.config.ts @@ -1,17 +1,19 @@ import { defineConfig } from "vitest/config"; +export const coverageThresholds = { + lines: 100, + functions: 100, + branches: 100, + statements: 100 +} as const; + export default defineConfig({ test: { globals: true, coverage: { provider: "v8", include: ["src/index.ts"], - thresholds: { - lines: 90, - functions: 90, - branches: 90, - statements: 90 - } + thresholds: coverageThresholds } } });