Skip to content

[docs] Add coverage API glossary entries#10166

Merged
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/fix-issue-10159
Jul 23, 2026
Merged

[docs] Add coverage API glossary entries#10166
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/fix-issue-10159

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Fixes #10159

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 778eceb4-0d23-4875-a78c-2defe4551176
Copilot AI review requested due to automatic review settings July 23, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/glossary.md Outdated
Comment thread docs/glossary.md Outdated
Comment thread docs/glossary.md Outdated
Comment thread docs/glossary.md Outdated
Comment thread docs/glossary.md Outdated
@Evangelink Evangelink added the state/needs-review Awaiting review from the team. label Jul 23, 2026
@Evangelink
Evangelink enabled auto-merge (squash) July 23, 2026 08:25
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 778eceb4-0d23-4875-a78c-2defe4551176
Copilot AI review requested due to automatic review settings July 23, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Comments suppressed due to low confidence (2)

docs/glossary.md:470

  • ProducerId is not required to equal the collector extension's IDataProducer.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 with ITestCoverageCapabilities.EnabledProducerUids and 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 CoverageThresholdFailed only when the run would otherwise succeed, and --ignore-exit-code 14 can 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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

auto-merge was automatically disabled July 23, 2026 08:38

Head branch was modified

@Evangelink
Evangelink merged commit 7fc7b77 into main Jul 23, 2026
19 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/fix-issue-10159 branch July 23, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Update glossary - daily scan

3 participants