[docs] Add coverage API glossary entries#10166
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 778eceb4-0d23-4875-a78c-2defe4551176
There was a problem hiding this comment.
Pull request overview
Documents the MTP coverage API contract introduced in PR #9896.
Changes:
- Adds 13 coverage-related glossary entries.
- Cross-links messages, result models, scopes, metrics, and services.
Show a summary per file
| File | Description |
|---|---|
docs/glossary.md |
Adds coverage API glossary documentation. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 5
- Review effort level: Medium
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 778eceb4-0d23-4875-a78c-2defe4551176
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (2)
docs/glossary.md:470
ProducerIdis not required to equal the collector extension'sIDataProducer.Uid; the API only validates that it is a stable, non-empty identifier (the UID is merely a recommended example). Calling it the extension UID conflates this correlation key withITestCoverageCapabilities.EnabledProducerUidsand may mislead producers that intentionally use another stable ID.
A public sealed class in `Microsoft.Testing.Platform.Extensions.Messages` (extends `DataWithSessionUid`) published to the MTP message bus by a coverage collector to report a single coverage measurement. Carries: `Scope` ([CoverageScope](#coveragescope)), `Metric` ([CoverageMetric](#coveragemetric)), `CoveredCount`, `CoverableCount` (both `long`), `ProducerId` (the collector's extension UID), and optionally `CustomMetricName` (when `Metric == CoverageMetric.Custom`). The platform's [ITestCoverageResult](#itestcoverageresult) aggregator consumes these messages using last-write-wins correlation on the full key `(SessionUid, ProducerId, Scope, Metric, CustomMetricName)`. `Percentage` is a convenience computed property. Introduced in [PR #9896](https://github.com/microsoft/testfx/pull/9896). See also [TestCoverageThresholdMessage](#testcoveragethresholdmessage), [TestCoverageReportMessage](#testcoveragereportmessage).
docs/glossary.md:478
- A failed coverage threshold does not unconditionally make the process exit with 14. The exit-code policy applies
CoverageThresholdFailedonly when the run would otherwise succeed, and--ignore-exit-code 14can then suppress it; failures such as test failures retain precedence. Documenting the unconditional behavior gives users an incorrect exit-code contract.
A public sealed class in `Microsoft.Testing.Platform.Extensions.Messages` (extends `DataWithSessionUid`) published by a coverage collector to report the result of a coverage threshold evaluation. Carries the same metric identification as [TestCoverageMessage](#testcoveragemessage) plus: `Aggregation` ([CoverageAggregation](#coverageaggregation)), `AggregatedOver` (optional [CoverageScopeLevel](#coveragescopelevel)), `ActualPercentage`, `RequiredPercentage`, `HasCoverableData`, `TreatNoDataAsFailure`, and `Passed` (derived: a threshold with no coverable data passes unless `TreatNoDataAsFailure` is set). When any threshold message has `Passed == false`, `ITestCoverageResult.HasThresholdFailure` returns `true`, causing the process to exit with `ExitCode.CoverageThresholdFailed` (14). Introduced in [PR #9896](https://github.com/microsoft/testfx/pull/9896). See also [TestCoverageMessage](#testcoveragemessage), [ITestCoverageResult](#itestcoverageresult).
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Medium
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
Review Summary — PR #10166
This PR adds glossary documentation for the coverage API concepts introduced in PR #9896. It is a documentation-only change (no code, no tests, no public API surface changes).
Verdict Table
| # | Dimension | Verdict |
|---|---|---|
| 1 | Algorithmic Correctness | N/A |
| 2 | Threading & Concurrency | N/A |
| 3 | Public API Design | N/A |
| 4 | Backward Compatibility | N/A |
| 5 | Cross-TFM Compatibility | N/A |
| 6 | Test Coverage & Test Quality | N/A |
| 7 | Localization | N/A |
| 8 | Performance | N/A |
| 9 | Error Handling | N/A |
| 10 | Security | N/A |
| 11 | IPC/Wire Format | N/A |
| 12 | Documentation | ✅ Clean |
| 13 | Code Style & Conventions | ✅ Clean |
| 14 | Naming | ✅ Clean |
| 15 | Resource Management | N/A |
| 16 | Nullability | N/A |
| 17 | Architecture & Layering | N/A |
| 18 | MSBuild / NuGet Packaging | N/A |
| 19 | Scope Discipline | ✅ Clean |
| 20 | TODO / FIXME Policy | ✅ Clean |
| 21 | Changelog / Release Notes | N/A |
| 22 | Copyrights & License Headers | N/A |
Overall Verdict
All clear. The glossary entries are well-written, correctly cross-linked, alphabetically ordered, and accurately describe the coverage API surface from PR #9896. No issues found.
Head branch was modified
Summary
Fixes #10159