Skip to content

chore(coverage): raise TS plugin statements floor to 94% - #790

Merged
jflowers merged 3 commits into
unbound-force:mainfrom
jflowers:opsx/ts-plugin-coverage-gate
Oct 22, 2026
Merged

jflowers merged 3 commits into
unbound-force:mainfrom
jflowers:opsx/ts-plugin-coverage-gate

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

Raises the statements coverage floor for the .opencode/ TypeScript
plugin suite from 90 to 94 percent in .opencode/vitest.config.ts
(issue #780, closing the deferral recorded by the unleash-tier-routing
change). The floor is a static governance-raised floor, not a ratchet:
94 sits just below the lowest recorded baseline (94.58%, round-2 fresh
measurement) and 1.18 points under the current 95.18% (3521/3699)
measurement, leaving headroom for documented cross-platform V8
coverage divergence (macOS local vs ubuntu-latest CI). Enforcement
uses native Vitest thresholds only, wired through the existing
plugin-test / make check / Local CI chain — no new CI wiring. The
branches floor (85) is unchanged.

Also ships the OpenSpec change artifacts (proposal, design decisions
D1–D7, ci spec delta, tasks), the CHANGELOG.md entry, the AGENTS.md
Testing Conventions governance note, and 10 retrospective Dewey
learnings from the workflow.

Closes #780

How to Test

  1. Passing mode — the suite sits above the raised floor:

    cd .opencode && npx vitest run --coverage
    

    Expected: exit 0, all 39 test files / 1180 tests pass, statements
    coverage 95.18% (3521/3699) ≥ 94 floor (branches 87.89% ≥ 85
    unchanged).

  2. Failing mode — the gate blocks regressions (scratch check via
    CLI override, no shipped changes):

    cd .opencode && npx vitest run --coverage --coverage.thresholds.statements=96
    

    Expected: exit 1 with ERROR: Coverage for statements (95.18%) does not meet global threshold (96%) — the failure names the
    metric, measured value, and threshold.

  3. CI parity — the floor rides the existing enforcement chain:

    make plugin-test   # npm ci locked install + vitest green at the 94 floor
    make check         # lint + Go tests + build + coverage-gate + plugin-test
    
  4. Change validation: openspec validate ts-plugin-coverage-gate
    — 0 errors.

How to Demo

Show the gate blocking a regression: run the failing-mode command
above (threshold override to 96) and point to the error naming the
metric, measured value, and threshold; then run make plugin-test to
show the suite green at the 94 floor.

Key Files Changed

Known Issues

None blocking. Both review councils returned APPROVE WITH ADVISORIES
(spec review: 4 non-blocking advisories; code review: 3 non-blocking
advisories — including a reminder that spec artifacts, the
vitest.config.ts edit, and Dewey learnings ship with the feature
branch, which this PR does).


This PR was generated by /uf.finale (AI-assisted).

…overage-gate)

- Raise .opencode/vitest.config.ts statements threshold from 90 to 94
  percent per ts-plugin-coverage-gate design D2 (issue unbound-force#780); the
  branches floor stays 85 percent
- Add OpenSpec change artifacts (proposal, design, specs, tasks)
- Store retrospective Dewey learnings from the workflow

Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers requested a review from a team as a code owner October 22, 2026 19:53
@jflowers jflowers changed the title Raise TS plugin coverage floor to 94% (ts-plugin-coverage-gate) chore(coverage): raise TS plugin statements floor to 94% Oct 22, 2026
@jflowers
jflowers merged commit 78e9f8f into unbound-force:main Oct 22, 2026
17 of 18 checks passed
@jflowers
jflowers deleted the opsx/ts-plugin-coverage-gate branch November 15, 2026 21:37
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.

Add a coverage gate for the TypeScript plugin suite (deferred from unleash-tier-routing)

1 participant