Skip to content

Bug: coverage-aggregation-double-counts-method-rows #815

Description

@drmoisan
  • Work Mode: full-bug

Summary

The coverage aggregation method pinned in atomic plans double-counts method rows when it sums
Cobertura output, so reported first-party coverage is inflated. On issue 809's delivery the plan's
artifacts reported 79.38% first-party branch coverage; recomputing the same run de-duplicated gives
77.03%. The method is reused by other plans, so every gate that depends on it reads high.

Environment

  • OS/version: Windows 11 Pro 10.0.26200, .NET Framework 4.8
  • Python version: not applicable
  • Command/flags used: the repository coverage route (dotnet-coverage), Cobertura output consumed by
    the aggregation step written into atomic plans
  • Data source or fixture: the raw Cobertura report from issue 809's final QA gate run

Steps to Reproduce

  1. Run the repository coverage route to produce a Cobertura report.
  2. Aggregate first-party branch coverage using the method pinned in a current atomic plan.
  3. Recompute the same figure de-duplicating method rows before summing.
  4. Compare: the two disagree, with the pinned method reporting the higher value.

Expected Behavior

A coverage figure quoted in a QA gate equals the figure a de-duplicated recomputation from the same
raw Cobertura report produces. Two methods over one report do not give two answers.

Actual Behavior

The pinned aggregation counts method rows more than once. Measured on issue 809: 79.38% reported
versus 77.03% recomputed, a 2.35 point overstatement on first-party branch coverage.

Both figures clear the 75% branch threshold, so no verdict changed on 809 and the merge was not
affected. The defect is that the counting method is wrong and is copied forward into other plans,
where a smaller true margin would not survive the same overstatement.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: the recomputation was performed by the feature reviewer for issue 809 from the raw
    Cobertura report committed under that item's evidence/qa-gates/ tree.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

High because it silently corrupts a quality gate across many future plans rather than affecting one
item. A gate that reports a number nobody can reproduce provides no assurance, and the error is in
the optimistic direction, so it fails to stop the cases it exists to stop.

Source

From: docs/features/potential/2026-09-08-coverage-aggregation-double-counts-method-rows.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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions