Skip to content

ci: set frontend coverage baseline below the observed floor - #60

Merged
thedancingdeveloper merged 1 commit into
mainfrom
fix/frontend-coverage-gate
Aug 1, 2026
Merged

ci: set frontend coverage baseline below the observed floor#60
thedancingdeveloper merged 1 commit into
mainfrom
fix/frontend-coverage-gate

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Problem

ci/check-frontend-coverage.mjs compared against 18.5% statements / 32.59% branches / 26.43% lines. The suite does not reproducibly meet those numbers: identical code reports 960/5191 statements on some machines (18.49% / 32.55% / 26.4%) and 965-966/5191 on others (18.58-18.6% / 32.87-32.99% / 26.46%).

The result was CI failing or passing based on which runner picked up the job. Three PRs in the last day failed this gate without touching any frontend code, then passed unchanged on re-run.

Change

  • lower the baseline below the low end of the observed band (statements 18.4, branches 32.5, functions 34.6, lines 26.3)
  • record the band and the fact that this is a ratchet floor, not a target, in the baseline file
  • document the gate and how to run it locally in docs/DEVELOPMENT.md

Coverage itself is unchanged — next_statement_target (25) and long_term_statement_target (60) are untouched, so the ratchet still works as intended.

Follow-up not included here

The underlying spread is a handful of statements that are covered only sometimes, most likely async continuations that race process teardown. Making those tests deterministic is worth doing separately; it is not a prerequisite for a gate that stops firing falsely.

Validation

  • npm test -- --coverage --coverage-reporters=text-summary --coverage-reporters=json-summary (88 tests pass, 960/5191 statements)
  • node ci/check-frontend-coverage.mjs ...frontend coverage meets baseline: statements 18.49%, branches 32.55%, functions 34.7%, lines 26.4%

🤖 Generated with Claude Code

The gate compared against 18.5% statements / 32.59% branches / 26.43% lines,
which the suite does not reproducibly meet. Identical code reports 960/5191
statements on some machines and 965-966/5191 on others, so runs failed or
passed depending on which runner picked up the job rather than on any change
to the code.

Lower the floor below the low end of that band, record the band in the
baseline file, and document the gate in DEVELOPMENT.md. Coverage itself is
unchanged; this only stops false failures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thedancingdeveloper
thedancingdeveloper merged commit 60b3542 into main Aug 1, 2026
6 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the fix/frontend-coverage-gate branch August 1, 2026 06:50
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