Skip to content

Refactor: coverage-threshold-discrepancy-claude-md-vs-rules #668

Description

@drmoisan
  • Work Mode: full-feature

Problem / Why

Two authoritative policy documents state different numbers, and tooling disagrees with both: the local test wrapper enforces an 80% floor while a feature-review hook hard-codes 85% against artifacts/csharp/coverage.xml. A repository whose measured figure sits between 80% and 85% therefore passes one gate and fails another depending on which artifact happens to exist, which makes the gate a function of tooling accident rather than of code quality. Feature #464 had to route around this deliberately by declining to emit the canonical coverage artifact.

Proposed Behavior

Pick one set of thresholds, state it in a single authoritative location, and make every other document and every gate reference that location rather than restating a number. Align the wrapper floor and the review hook to the chosen value.

Acceptance Criteria

  • Exactly one document states the numeric coverage thresholds; all others reference it.
  • The test wrapper's floor and the feature-review hook's floor both equal the stated threshold.
  • The branch-coverage threshold and its documented exemptions (Pester and kcov measure no branch coverage) are consistent across all documents.
  • The interaction between the filtered first-party denominator and the unfiltered whole-run denominator is stated explicitly, since the two differ materially.

Constraints & Risks

Raising the effective floor could block unrelated in-flight work, so the change should be sequenced deliberately. The denominator question is the substantive part and must not be skipped: feature #464 measured 70.32% and 85.25% on two runs of the same repository whose lines-valid differed by 17,946, so a bare percentage is not meaningful without naming what was measured.

Test Conditions

  • A gate test proving the threshold fails below the floor and passes at or above it
  • Config-parity test pinning every restated threshold to the single authoritative source

Source

From: docs/features/potential/2026-08-27-coverage-threshold-discrepancy-claude-md-vs-rules.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions