Skip to content

Coverage threshold contradiction remains: CLAUDE.md/csharp.md say 80%, general-unit-test.md/quality-tiers.md say 85%/75%, and two live gates disagree #563

Description

@drmoisan

Summary

Issue #494 was chartered to reconcile the repository's contradictory coverage thresholds. A
user-authorized scope correction recorded in that feature's spec.md deferred the edits to
CLAUDE.md, .claude/rules/general-unit-test.md, and .claude/rules/quality-tiers.md to an
upstream prompt artifact for a separate repository. The contradiction therefore still exists in
TaskMaster after the epic merged.

Current state

Three always-loaded governance documents disagree:

Document Line coverage Branch coverage
CLAUDE.md (UT2) >= 80% on a "testable denominator" with COM/VSTO exemptions not stated
.claude/rules/csharp.md 80% not stated
.claude/rules/general-unit-test.md >= 85% >= 75%
.claude/rules/quality-tiers.md >= 85% uniform T1-T4 >= 75% uniform T1-T4

CLAUDE.md also permits [ExcludeFromCodeCoverage] and coverage.config assembly excludes, while
.claude/rules/general-unit-test.md states that no production file may be excluded from coverage
measurement and instructs reviewers to treat such an exclusion as a Blocking finding.

Why this is now executable, not just textual

The epic added Assert-CoberturaLineCoverageThreshold
(scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1:487), which enforces 80% line coverage
and performs no branch check. The review hook
.claude/hooks/validate-feature-review-coverage.ps1:313,323 fails below 85.0 line and 75.0
branch.

A measured figure in the interval [80, 85) passes the developer-facing gate and fails the
review-facing gate. The two enforcement points disagree on live numbers, not just prose.

Impact on the epic's stated outcome

docs/features/epics/build-ci-coverage-gate-fidelity/epic.md lists as leading indicator 2: "A
deliberately introduced coverage regression fails the documented coverage gate." The gate does
mechanically fail a regression, but at a threshold that disagrees with two of the three documents
#494 was chartered to reconcile. The indicator is partially discharged.

Suggested resolution

Pick one number for line coverage and one for branch coverage, apply it to all four documents and
both enforcement points, and record the decision. Per the epic's own recorded NFR, no threshold may
be lowered to accommodate a corrected denominator without an explicit recorded decision, so this
needs a maintainer decision rather than an agent choosing the convenient value.

Related: #561 (no CI enforcement of any threshold).

Found during the build-ci-coverage-gate-fidelity epic fan-in review; corroborated independently by
two review passes and the epic audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions