Skip to content
Strata v1.2.6

v1.2.4

v1.2.4 — Fix CI coverage gate + improve agent instructions

Section titled “v1.2.4 — Fix CI coverage gate + improve agent instructions”

Released: 2026-05-15

The CI Frontend job was failing with:

ERROR: Coverage for functions (89.06%) does not meet global threshold (90%)

Five functions across three files had no unit tests:

FileFunctions
front/src/lib/api/assets.tsupdateSnapshot, deleteSnapshot
front/src/lib/theme.tsinitTheme
front/src/lib/hooks/assets.tsuseUpdateAssetSnapshot, useDeleteAssetSnapshot

Tests added:

  • lib/api/__tests__/assets.test.tsupdateSnapshot and deleteSnapshot covering PUT/DELETE calls
  • lib/__tests__/theme.test.tsinitTheme with window.matchMedia mock
  • lib/hooks/__tests__/assets.test.ts (new file) — both snapshot mutation hooks via renderHook

Instructions previously stated npm test enforces coverage thresholds — it does not. Updated:

  • .github/instructions/astro.instructions.md — added “Coverage Gate (CI-Enforced — MANDATORY)” section
  • .github/instructions/nestjs.instructions.md — same section added
  • .github/instructions/agents-plan-checklist.instructions.md — test gate commands corrected

Correct gate commands:

Terminal window
cd backend && npm run test:cov # backend — enforces thresholds
cd front && npx vitest run --coverage # frontend — enforces thresholds

Coverage thresholds (both backend and frontend)

Section titled “Coverage thresholds (both backend and frontend)”
MetricThreshold
Statements90%
Branches80%
Functions90%
Lines90%