Skip to content

Bug: cobertura-merged-class-methods-incomplete #530

Description

@drmoisan
  • Work Mode: minor-audit

Summary

A merged Cobertura class retains only the primary class's <methods>, so the emitted document's method-level lines do not account for all of that class's class-level lines.

Environment

  • OS/version: Windows 11 Pro 10.0.26200
  • Python version: n/a (PowerShell)
  • Command/flags used: ConvertTo-KoverageCoberturaXml / Merge-CoberturaClassesByFilename in scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1
  • Data source or fixture: docs/features/active/2026-08-06-quickfiler-high-confidence-queue-init-stall-424/evidence/qa-gates/coverage-final.cobertura.xml

Steps to Reproduce

  1. Dot-source scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1.
  2. Reprocess a Cobertura document containing two or more <class> elements that share a filename (for example Ns.Foo and its compiler-generated partner Ns.Foo.<>c).
  3. Inspect the merged class: compare the count of <line> children in its class-level <lines> rollup against the set of lines described by its <methods> subtree.

Expected Behavior

The merged class's <methods> subtree should describe the same source lines as its merged class-level <lines> rollup, or the divergence should be an explicitly documented and tested contract.

Actual Behavior

Merge-CoberturaClassesByFilename unions the class-level <lines> of same-filename classes but leaves <methods> un-merged; the merged class carries only the primary class's <method> children. For QuickFiler\Controllers\QfcHomeController.Iteration.cs in the -424 sample, the merged class-level rollup has 56 lines while the retained <methods> describe only 24.

Logs / Screenshots

  • Attached minimal logs or snippet
  • Snippet: merged class-level rollup 56 lines vs. retained <methods> 24 lines for QfcHomeController.Iteration.cs.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Per-method line-rate data in the emitted document is incomplete for merged classes. Root and per-file line rates are correct as of #441 / #478.

Source

From: docs/features/potential/2026-08-10-cobertura-merged-class-methods-incomplete.md

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