Skip to content

Add coverage reporting and publish the real numbers - #1

Merged
Bruce1508 merged 2 commits into
mainfrom
coverage-reporting
Sep 11, 2026
Merged

Bruce1508 merged 2 commits into
mainfrom
coverage-reporting

Conversation

@Bruce1508

Copy link
Copy Markdown
Owner

Adds test-coverage tooling to both apps and publishes the measured numbers in the README.

Result
Backend 141 tests, 92% over app/
Frontend unit 22 tests, 12.4%
Frontend e2e 4 Playwright specs

Both reproduce with make coverage, and CI now prints them.

Why the frontend number is low, and why it's published anyway

Vitest v4 measures only the files a test imported unless coverage.include is set. The default run reported 88% of 34 statements — a number that would not survive anyone checking it. Pointing include at the real app//components//lib/ tree gives 12.4% of 242.

That figure is low by design: lib/ and the presentational components are unit-tested in jsdom, while the four page components are covered end-to-end by Playwright, which the unit run cannot see. The README states this alongside the number rather than omitting it.

Nothing is excluded from the denominator for looking bad. An earlier draft excluded app/layout.tsx, which lifted the figure to 12.7%; that exclusion was removed.

Also

  • Corrects the Status section, which still claimed no CI/CD after CI landed in f94fc59.
  • Coverage emits text only — the default HTML reporter writes vendored JS that trips npm run lint.

Verification

141 backend + ruff + mypy, 22 frontend unit, 4 e2e, tsc --noEmit, eslint, actionlint — all pass locally. Backend ran with a live Ollama daemon, so the two Ollama-gated tests executed rather than skipping.

🤖 Generated with Claude Code

Backend is 92% over `app/` across 141 tests. Frontend unit coverage is
12.4%, measured over the whole app/components/lib tree rather than only
the files a test happens to import — without an explicit `include`,
v8 reported 88% of 34 statements, which would not have survived anyone
checking it.

The frontend figure is low by design: the four page components are
covered end-to-end by Playwright rather than in jsdom. The README states
that alongside the number instead of omitting it or narrowing the scope.
Nothing is excluded from the denominator for looking bad — an earlier
draft excluded app/layout.tsx, which lifted the figure to 12.7%.

Both numbers are reproducible with `make coverage` and now print in CI.
Coverage emits text only, since the default HTML reporter writes vendored
JS that trips `npm run lint`.

Also corrects the Status section, which still claimed the project had no
CI/CD after CI landed in f94fc59.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FwJbsXDAjQAERfSQbYkgMc
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5adbb288-4dc8-4628-ad80-b8b77a836357


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The README advertises 92% backend coverage, but nothing enforced it: a
PR that gutted the test suite would keep CI green while the badge and
prose went on claiming 92%.

--cov-fail-under=91, not 92. The headline figure is coverage.py rounding
~91.9% (1545/1681), and the real value drifts to ~91.7% between runs as
the Ollama-gated tests do or don't execute. A gate of 92 would fail on
the very commit that introduced it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FwJbsXDAjQAERfSQbYkgMc
@Bruce1508
Bruce1508 merged commit 7be8136 into main Sep 11, 2026
3 checks passed
@Bruce1508
Bruce1508 deleted the coverage-reporting branch September 11, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant