Summary
Package-level line-rate and branch-rate are never recomputed after Cobertura package filtering and class merging, so every surviving <package> carries a stale rate computed over a different, larger class set.
Environment
- OS/version: Windows 11 Pro 10.0.26200
- Python version: n/a (PowerShell)
- Command/flags used:
ConvertTo-KoverageCoberturaXml -XmlContent <cobertura> -RepoRoot <root> -PathSeparator '\'
- 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
- Dot-source
scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1.
- Run
ConvertTo-KoverageCoberturaXml over a raw dotnet-coverage Cobertura document that contains .Test packages and multiple same-filename classes.
- Inspect the
line-rate and branch-rate attributes of any surviving <package> element in the output and compare them against a rate recomputed from that package's post-filter, post-merge class set.
Expected Behavior
After package filtering removes .Test packages and class merging unions same-filename classes, each surviving <package> should carry line-rate and branch-rate recomputed over its own post-processing class set.
Actual Behavior
ConvertTo-KoverageCoberturaXml writes only the six root <coverage> attributes and the line-rate / branch-rate / complexity attributes of merged class elements. It never recomputes <package line-rate=...> or <package branch-rate=...>, so each package retains the value the generator emitted for a different, larger class set.
Logs / Screenshots
Impact / Severity
Per-assembly reported coverage is wrong wherever filtering or merging changed a package's class set. Repository-wide root attributes are unaffected (those were corrected by #441).
Source
From: docs/features/potential/2026-08-10-cobertura-package-rates-not-recomputed.md
Summary
Package-level
line-rateandbranch-rateare never recomputed after Cobertura package filtering and class merging, so every surviving<package>carries a stale rate computed over a different, larger class set.Environment
ConvertTo-KoverageCoberturaXml -XmlContent <cobertura> -RepoRoot <root> -PathSeparator '\'docs/features/active/2026-08-06-quickfiler-high-confidence-queue-init-stall-424/evidence/qa-gates/coverage-final.cobertura.xmlSteps to Reproduce
scripts/vscode/Invoke-MSTestWithCoverage.Helpers.ps1.ConvertTo-KoverageCoberturaXmlover a rawdotnet-coverageCobertura document that contains.Testpackages and multiple same-filename classes.line-rateandbranch-rateattributes of any surviving<package>element in the output and compare them against a rate recomputed from that package's post-filter, post-merge class set.Expected Behavior
After package filtering removes
.Testpackages and class merging unions same-filename classes, each surviving<package>should carryline-rateandbranch-raterecomputed over its own post-processing class set.Actual Behavior
ConvertTo-KoverageCoberturaXmlwrites only the six root<coverage>attributes and theline-rate/branch-rate/complexityattributes of merged class elements. It never recomputes<package line-rate=...>or<package branch-rate=...>, so each package retains the value the generator emitted for a different, larger class set.Logs / Screenshots
scripts/temp-extract-coverage.ps1:47, which reads$pkg.'line-rate'for per-assembly reporting.Impact / Severity
Per-assembly reported coverage is wrong wherever filtering or merging changed a package's class set. Repository-wide root attributes are unaffected (those were corrected by #441).
Source
From: docs/features/potential/2026-08-10-cobertura-package-rates-not-recomputed.md