Skip to content

test(coverage): restore to ~99.6/99.0/99.9/99.9 + gate coverage in CI - #57

Merged
gyng merged 1 commit into
mainfrom
test/coverage-restore
Jul 9, 2026
Merged

test(coverage): restore to ~99.6/99.0/99.9/99.9 + gate coverage in CI#57
gyng merged 1 commit into
mainfrom
test/coverage-restore

Conversation

@gyng

@gyng gyng commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Coverage had slid to 97.69 / 93.45 / 96.39 / 98.89 unnoticed (Vitest 2→4 remap changes in #54 plus untested-code drift) because CI ran `test:unit` but never the thresholds. This PR restores it above the original v0.0.48 baseline and makes regression impossible to miss.

What's in it

  • ~400 new tests across 5 parallel clusters — editor panels (Inspector 81.1% → 99.7% stmts, ColorField/themeTokens/Outline → 100%), meters (all listed files → 100%), plugins+llm+formula, lib/core (26/38 files at flat 100), canvas + widgets misc. Suite: 2,769 → 3,151 tests.
  • All test-only: zero source changes, zero coverage-ignore pragmas (standing policy). The residue is documented genuinely-unreachable arms — type-union-impossible branches, guards mirrored by `disabled` attributes, library-internal arms (downshift, lezer — the latter fuzz-verified over 60k fragments) — each justified in the agents' notes.
  • CI now gates coverage: the client job runs `test:coverage`, so the vite.config ratchet fails any regressing PR.
  • Thresholds re-ratcheted: statements 99→99.25, lines 99→99.5, functions 96→99.5, branches 95→98.5 (~0.4pp slack for cross-platform v8 remap jitter).
  • One pre-existing flaky test hardened (MonitorSourcesEditor rescan raced a disabled button under parallel load).

Verification

Final tree: `tsc` clean, oxfmt+oxlint clean, 3,151 tests / 276 files pass, build clean, coverage gate exit 0 at the new floors. Global: 99.62 stmts / 98.97 branches / 99.91 funcs / 99.93 lines.

No product code changed → no release from this PR (per instruction).

🤖 Generated with Claude Code

Coverage had slid to 97.69/93.45/96.39/98.89 unnoticed (Vitest 2->4 remap
changes in #54 plus untested-code drift) because CI ran test:unit, never the
thresholds. This restores it above the original v0.0.48 baseline and makes
regression impossible to miss:

- ~400 new tests across 5 parallel clusters (Inspector/editor panels, meters,
  plugins+llm+formula, lib/core, canvas+widgets misc): 2769 -> 3151 tests.
  Inspector.tsx alone went 81.1% -> 99.7% stmts. All test-only; no source
  changes, no coverage-ignore pragmas (standing policy). Residue is
  documented unreachable defensive arms / library-internal branches, each
  justified in the PR notes.
- CI client job now runs test:coverage instead of test:unit, so the
  vite.config ratchet gates every PR.
- Thresholds re-ratcheted: statements 99->99.25, lines 99->99.5,
  functions 96->99.5, branches 95->98.5 (~0.4pp slack for cross-platform
  v8 remap jitter).
- Also hardened one pre-existing flaky test (MonitorSourcesEditor rescan
  raced a disabled button under parallel load).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gyng
gyng enabled auto-merge (squash) July 9, 2026 23:48
@gyng
gyng merged commit cac41fd into main Jul 9, 2026
4 checks passed
@gyng
gyng deleted the test/coverage-restore branch July 9, 2026 23:51
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