Skip to content

(ci): c8 coverage + patch-coverage gate (80% on changed lines) - #51

Merged
JeanBaptisteRenard merged 1 commit into
mainfrom
feat/coverage-patch-gate
Jun 10, 2026
Merged

(ci): c8 coverage + patch-coverage gate (80% on changed lines)#51
JeanBaptisteRenard merged 1 commit into
mainfrom
feat/coverage-patch-gate

Conversation

@JeanBaptisteRenard

Copy link
Copy Markdown
Collaborator

What

  • c8 (devDep) wraps node --test; npm run coverage / task coverage emit text + lcov to ./coverage (gitignored).
  • .c8rc.json excludes the Electron-only layer node:test can't exercise (main.js, preload.js, mcp-bridge.js, claude-auth.js, DOM glue, bundles, workers, scripts).
  • .github/workflows/test.yml: coverage on both Node versions; diff-cover gate at 80% on CHANGED lines only (Node 22, PRs).

Why patch coverage, not global

A global threshold is meaningless here — main.js alone is 2047 LOC of untestable IPC/native code. Patch coverage gates new work without that noise. Builds on #50 (suite no longer hangs → coverage measurable).

Validated locally: lcov produced; diff-cover gate command passes on this infra-only diff (no .js logic changed).

Generated with Claude Code

- c8 (devDep) wraps node --test; `npm run coverage` / `task coverage`
  emit text + lcov to ./coverage (gitignored).
- .c8rc.json excludes the Electron-only layer that node:test cannot
  exercise (main.js, preload.js, mcp-bridge.js, claude-auth.js, the DOM
  glue, bundles, workers, scripts).
- .github/workflows/test.yml: run coverage on both Node versions; gate
  PRs with diff-cover at 80% on CHANGED lines only (Node 22). A global
  threshold is meaningless here — main.js alone is 2047 LOC of untestable
  IPC/native code; patch coverage gates new work without that noise.

Prereq #50 (suite no longer hangs) makes coverage measurable. Validated
locally: lcov produced, gate command passes on this infra-only diff.
@JeanBaptisteRenard
JeanBaptisteRenard merged commit 59712a6 into main Jun 10, 2026
6 of 7 checks passed
@JeanBaptisteRenard
JeanBaptisteRenard deleted the feat/coverage-patch-gate branch June 10, 2026 19:45
abasiri pushed a commit that referenced this pull request Aug 1, 2026
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