From f6e7d6e6ee12bd0e6c8e378ca100aabb4f11352c Mon Sep 17 00:00:00 2001 From: seonghobae Date: Sat, 29 Aug 2026 22:10:18 +0900 Subject: [PATCH 1/7] test(desktop): enforce full configured coverage --- CHANGELOG.md | 3 ++- apps/desktop/vite.config.ts | 8 ++++---- docs/engineering/acceptance-criteria.md | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6f7e784..c8972147e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Changed +- Raised the configured desktop Vitest coverage thresholds to 100% for lines, functions, branches, and statements. - 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..e6e5b7884 100644 --- a/docs/engineering/acceptance-criteria.md +++ b/docs/engineering/acceptance-criteria.md @@ -25,6 +25,9 @@ Run the narrowest passing set that covers touched areas, and do not claim succes - `npm run test` - `npm audit --workspaces --audit-level=high` +The desktop Vitest coverage gate requires 100% lines, functions, branches, and +statements for its configured source set. + When CI/workflow files, supply-chain controls, or release/security docs are changed, also run: - `python3 scripts/checks/verify_supply_chain.py` From db5700ee073e603d4839fdad09e1990a197183df Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:04:03 +0900 Subject: [PATCH 2/7] test(quality): reproduce shared-types coverage floor gap --- .../shared-types/test/coverage-policy.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/shared-types/test/coverage-policy.test.ts 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..af5ec9595 --- /dev/null +++ b/packages/shared-types/test/coverage-policy.test.ts @@ -0,0 +1,16 @@ +import { readFileSync } from "node:fs"; + +describe("shared-types coverage policy", () => { + it("requires 100% for every configured coverage metric", () => { + const configSource = readFileSync( + new URL("../vitest.config.ts", import.meta.url), + "utf8" + ); + + for (const metricName of ["lines", "functions", "branches", "statements"]) { + expect(configSource).toMatch( + new RegExp(`\\b${metricName}:\\s*100\\b`) + ); + } + }); +}); From 2f66cf65a03630f5d99da537b6ea09d6d806f944 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:05:44 +0900 Subject: [PATCH 3/7] test(quality): enforce full shared-types coverage --- packages/shared-types/vitest.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/shared-types/vitest.config.ts b/packages/shared-types/vitest.config.ts index 14e004545..ef488fefb 100644 --- a/packages/shared-types/vitest.config.ts +++ b/packages/shared-types/vitest.config.ts @@ -7,10 +7,10 @@ export default defineConfig({ provider: "v8", include: ["src/index.ts"], thresholds: { - lines: 90, - functions: 90, - branches: 90, - statements: 90 + lines: 100, + functions: 100, + branches: 100, + statements: 100 } } } From 0be7f03e01a156e2740e86840c1f736de5675125 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:06:20 +0900 Subject: [PATCH 4/7] docs(quality): define repository-wide Vitest coverage floor --- docs/engineering/acceptance-criteria.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/engineering/acceptance-criteria.md b/docs/engineering/acceptance-criteria.md index e6e5b7884..ce2f9c0a9 100644 --- a/docs/engineering/acceptance-criteria.md +++ b/docs/engineering/acceptance-criteria.md @@ -25,8 +25,10 @@ Run the narrowest passing set that covers touched areas, and do not claim succes - `npm run test` - `npm audit --workspaces --audit-level=high` -The desktop Vitest coverage gate requires 100% lines, functions, branches, and -statements for its configured source set. +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: From c94ba18de7aaa5acc1db3e9c86b8dcf937a03433 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:06:39 +0900 Subject: [PATCH 5/7] docs(changelog): record full JavaScript coverage floor --- CHANGELOG.md | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8972147e..c7865a13c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ### Changed -- Raised the configured desktop Vitest coverage thresholds to 100% for lines, functions, branches, and statements. +- 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 @@ -27,52 +27,3 @@ ## [0.1.2] - 2026-04-29 ### Changed - -- Aligned the packaged desktop app version with the release package metadata. - -### Fixed - -- Stabilized YouTube import fallback behavior in browser and desktop dev paths. -- Guarded OSSF Scorecard execution so release-branch pushes skip unsupported non-default branch runs cleanly. - -## [0.1.1] - 2026-04-28 - -### Added - -- Implemented rehearsal workspace design (Issue #107) -- Add capo and tuning detection heuristics (Issue #103) -- Add bandit security scan workflow - -### Fixed - -- Upgrade pytest to 9.0.3 to fix GHSA-6w46-j5rx-g56g -- Resolve npm audit vulnerabilities -- Fix ruff import sorting and formatting errors -- Add missing docstrings to tests -- Fix test configuration and typing issues - -## [0.1.0] - 2026-03-27 - -### Added - -- Issue #29: Defined core `song -> section -> role` rehearsal domain contracts -- Issue #38: Added cross-architecture build support (Windows/macOS arm64+amd64) -- Issue #40: Enforced 100% Python docstring and test coverage -- Issue #32: Implemented local analysis orchestration and secure IPC boundaries -- Issue #33: Implemented secure local audio intake and project bootstrap -- Issue #35: Engineered section, form, and cue anchor extraction pipeline -- Issue #34: Implemented role extraction targets and part graph -- Issue #31: Added role-specific harmony, range, overlap, and confidence metrics -- Issue #28: Delivered practical rehearsal workspace UI -- Issue #27: Supported manual overrides, provenance tracking, and local project persistence -- Issue #36: Implemented rehearsal priority calculation and cue-sheet (CSV) / chart (JSON) exports -- Issue #30: Added policy-constrained YouTube import with local fallback -- Issue #26: Finalized roadmap and prepared application for initial release - -## [0.1.4] - 2026-05-15 - -### 추가됨 (Added) - -- `ChordsFeature` (코드 분석) 화면에서 각 파트(Role)의 `transpositionPlan`(이조/조옮김 계획)을 표시하는 기능을 추가했습니다. -- `RangesFeature` (음역대 분석) 화면에서 겹침 경고(Overlap warning) 외에 해당 파트의 채보(Transcription) 가능 노드 수를 요약하여 보여주는 기능을 추가했습니다. -- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`). From 707dd3bb564e07ad48d18bbfc98fa2f89811025c Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:07:01 +0900 Subject: [PATCH 6/7] fix(changelog): preserve historical release entries --- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7865a13c..0d24d4d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,3 +27,52 @@ ## [0.1.2] - 2026-04-29 ### Changed + +- Aligned the packaged desktop app version with the release package metadata. + +### Fixed + +- Stabilized YouTube import fallback behavior in browser and desktop dev paths. +- Guarded OSSF Scorecard execution so release-branch pushes skip unsupported non-default branch runs cleanly. + +## [0.1.1] - 2026-04-28 + +### Added + +- Implemented rehearsal workspace design (Issue #107) +- Add capo and tuning detection heuristics (Issue #103) +- Add bandit security scan workflow + +### Fixed + +- Upgrade pytest to 9.0.3 to fix GHSA-6w46-j5rx-g56g +- Resolve npm audit vulnerabilities +- Fix ruff import sorting and formatting errors +- Add missing docstrings to tests +- Fix test configuration and typing issues + +## [0.1.0] - 2026-03-27 + +### Added + +- Issue #29: Defined core `song -> section -> role` rehearsal domain contracts +- Issue #38: Added cross-architecture build support (Windows/macOS arm64+amd64) +- Issue #40: Enforced 100% Python docstring and test coverage +- Issue #32: Implemented local analysis orchestration and secure IPC boundaries +- Issue #33: Implemented secure local audio intake and project bootstrap +- Issue #35: Engineered section, form, and cue anchor extraction pipeline +- Issue #34: Implemented role extraction targets and part graph +- Issue #31: Added role-specific harmony, range, overlap, and confidence metrics +- Issue #28: Delivered practical rehearsal workspace UI +- Issue #27: Supported manual overrides, provenance tracking, and local project persistence +- Issue #36: Implemented rehearsal priority calculation and cue-sheet (CSV) / chart (JSON) exports +- Issue #30: Added policy-constrained YouTube import with local fallback +- Issue #26: Finalized roadmap and prepared application for initial release + +## [0.1.4] - 2026-05-15 + +### 추가됨 (Added) + +- `ChordsFeature` (코드 분석) 화면에서 각 파트(Role)의 `transpositionPlan`(이조/조옮김 계획)을 표시하는 기능을 추가했습니다. +- `RangesFeature` (음역대 분석) 화면에서 겹침 경고(Overlap warning) 외에 해당 파트의 채보(Transcription) 가능 노드 수를 요약하여 보여주는 기능을 추가했습니다. +- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`). From 6214e88a1bab5404f1859505c56a5b1cc0479eef Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 2 Sep 2026 19:11:34 +0900 Subject: [PATCH 7/7] fix(review): bind coverage guard to active typed policy --- .../shared-types/test/coverage-policy.test.ts | 18 +++++++----------- packages/shared-types/vitest.config.ts | 14 ++++++++------ 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/shared-types/test/coverage-policy.test.ts b/packages/shared-types/test/coverage-policy.test.ts index af5ec9595..48fe23b5b 100644 --- a/packages/shared-types/test/coverage-policy.test.ts +++ b/packages/shared-types/test/coverage-policy.test.ts @@ -1,16 +1,12 @@ -import { readFileSync } from "node:fs"; +import { coverageThresholds } from "../vitest.config"; describe("shared-types coverage policy", () => { it("requires 100% for every configured coverage metric", () => { - const configSource = readFileSync( - new URL("../vitest.config.ts", import.meta.url), - "utf8" - ); - - for (const metricName of ["lines", "functions", "branches", "statements"]) { - expect(configSource).toMatch( - new RegExp(`\\b${metricName}:\\s*100\\b`) - ); - } + 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 ef488fefb..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: 100, - functions: 100, - branches: 100, - statements: 100 - } + thresholds: coverageThresholds } } });