managarten/.claude/guidelines
Till JS 4b8defcc4a chore(ci): add v8 test coverage tracking (non-blocking baseline)
CI previously ran `pnpm run test || true` — test failures were silently
swallowed with no artifact, so we had no visibility into what was actually
passing across 1,296 test files.

- New `test:coverage` turbo pipeline task + root script; packages that opt
  in by declaring their own `test:coverage` get picked up automatically.
- Wired up three high-value Vitest targets: apps/mana/apps/web (main
  frontend, ~590 tests), shared-ui (Svelte component library), and
  shared-storage (S3 client). Each emits lcov.info + coverage-summary.json
  + browsable HTML.
- apps/mana/apps/web `"test"` was running in watch mode (just `vitest`),
  which hangs under turbo orchestration — changed to `vitest run` and
  added `test:watch` for the interactive case.
- CI uploads coverage artifacts (14-day retention) regardless of whether
  tests passed. `continue-on-error: true` replaces `|| true` so a failed
  suite shows up as a warning annotation on the PR rather than being
  invisible. Flip to a hard gate once main is green for a full week.
- Testing guideline documents the pattern + the template vitest config
  + the planned 80% threshold.
- ESLint flat-config `vitest.config.ts` ignore only matched at the root;
  widened to `**/vitest.config.{ts,js,mjs}` so nested configs don't trip
  the project-service parser.

Coverage baseline produced locally:
  shared-storage:  91.37% lines (6 files, 123 tests)
  shared-ui:        2.87% lines (mostly Svelte components, untested)
  apps/mana/web:    9/59 test files fail — pre-existing, not regression

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 19:21:14 +02:00
..
ai-tools.md docs(ai-tools): add how-to guide for wiring module tools to the AI agent 2026-04-19 19:15:57 +02:00
authentication.md feat(auth): server-side tier gating via requireTier middleware 2026-04-19 17:38:06 +02:00
code-style.md chore: remove all NestJS backend references, replace with Hono/Bun 2026-03-31 16:52:25 +02:00
database.md fix(todo): use TEXT for user_id columns (Better Auth compatibility) 2025-12-09 16:24:22 +01:00
design-ux.md chore(lint): audit:theme-tokens guard against bare --muted / --theme-* drift 2026-04-16 00:58:13 +02:00
error-handling.md 💄 style: apply prettier formatting across codebase 2025-12-03 02:02:09 +01:00
expo-mobile.md 💄 style: apply prettier formatting across codebase 2025-12-03 02:02:09 +01:00
hono-server.md refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
sveltekit-web.md refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
testing.md chore(ci): add v8 test coverage tracking (non-blocking baseline) 2026-04-19 19:21:14 +02:00