Skip to content

fix(ci): use direct coverage for local tool updates - #926

Merged
akrock merged 8 commits into
mainfrom
codex/pr903-ci-gates
Nov 21, 2026
Merged

akrock merged 8 commits into
mainfrom
codex/pr903-ci-gates

Conversation

@akrock

@akrock akrock commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Local .NET tool updates with optional new release notes can pass the coverage gate even when the patch has no measurable source lines. This branch also updates the repository-local ReportGenerator pin from 5.5.11 to 5.5.12.

Changes

  • Select the direct Codecov-mode patch gate only when the diff modifies .config/dotnet-tools.json and any other changes are new Markdown entries directly under releases/unreleased.entries/.
  • Keep all four evidence producers and the 95% line and 85% branch thresholds for aggregate and measurable patch coverage, with the existing 0.5 percentage-point tolerance. Mixed code or policy changes continue to require native fan-in.
  • Cover qualifying and mixed changes with regression tests. Document the exception in the contributor guide, CI guide, fan-in guide, and validation tool reference.

Verification

Verified head bc72d5ba against main at 3600fd198 locally with .NET SDK 10.0.402.

Check Result
Installed consumer, package checks, packed storage Passed. Package checks validated 52 artifacts.
Full-solution coverage 24,678 passed, 13 skipped, zero failures across 59 test projects.
Aggregate coverage 96.35% line and 89.96% branch.
Patch coverage 100% line (7/7) and 100% branch (32/32).
Selection regression All 23 tool-manifest cases passed. The manifest-plus-release-note plan selected all four producers and the direct patch gate.
Tool restore and formatting ReportGenerator 5.5.12 restored. Formatting verification for the changed C# files and git diff --check passed.

The coverage lane passed on rerun with a physical macOS temp directory. Both runs used the same source snapshot and patch. GitHub’s native matrix will run on this PR because the branch includes CI selection code.

Related work

  • Replaces the CI-gate work from PR #903.
  • Tracks the broader native fan-in contract separately in issue #913.

dependabot Bot and others added 5 commits November 2, 2026 14:36
Bumps dotnet-reportgenerator-globaltool from 5.5.11 to 5.5.12

---
updated-dependencies:
- dependency-name: dotnet-reportgenerator-globaltool
  dependency-version: 5.5.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: benchmark-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
# Conflicts:
#	eng/ci-critical-path.md
#	tools/ForgeTrust.AppSurface.Evidence.Validation/README.md
Copilot AI balanced review requested due to automatic review settings November 20, 2026 04:20
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: c905694d-86b0-4cfc-8d2a-b7d4c30d0184

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Updates
    • Updated ReportGenerator from version 5.5.11 to 5.5.12.
  • CI
    • Qualifying changes limited to the local tool manifest, optionally with new release notes, use the direct patch coverage gate instead of native coverage.
    • The gate retains all four evidence producers and existing coverage thresholds. Changes that include other paths continue to use native coverage.
  • Documentation
    • Updated contribution and coverage guides to explain the selection rules and how direct patch coverage differs from native fan-in.

The ReportGenerator local tool version changes from 5.5.11 to 5.5.12. The evidence workflow adds a tool-manifest-only exception to native coverage selection, with tests and documentation for qualifying changes and retained coverage requirements.

Changes: Tool Manifest Coverage Selection

Layer / File(s) Summary
Manifest exception and coverage selection
.config/dotnet-tools.json, tools/ForgeTrust.AppSurface.Evidence.Validation/RepositoryEvidenceWorkflow.cs, Aspire/ForgeTrust.AppSurface.Aspire.Tests/RepositoryEvidenceWorkflowTests.cs, releases/unreleased.entries/2026-11-07-reportgenerator-tool-update.md, CONTRIBUTING.md, eng/ci-critical-path.md, guides/coverage-fan-in.md, tools/ForgeTrust.AppSurface.Evidence.Validation/README.md
The workflow disables native coverage selection for a modified existing tool manifest, optionally with directly added Markdown release entries. Tests cover qualifying and non-qualifying inventories. The documentation describes retained evidence producers, coverage thresholds, and direct versus native patch-gate behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant GitDiffInventory
  participant RepositoryEvidenceWorkflow
  participant SelectionJson
  participant DirectPatchGate
  participant NativeCoverageMatrix
  GitDiffInventory->>RepositoryEvidenceWorkflow: Provide changed paths and statuses
  RepositoryEvidenceWorkflow->>RepositoryEvidenceWorkflow: Check the tool-manifest-only predicate
  RepositoryEvidenceWorkflow->>SelectionJson: Set requiresNativeCoverage for the inventory
  SelectionJson->>DirectPatchGate: Select direct patch coverage when the exception applies
  SelectionJson->>NativeCoverageMatrix: Select native coverage when the exception does not apply
Loading

Possibly related PRs

Merge Risk: Minimal · previous review bc72d

This PR bumps the ReportGenerator local tool to 5.5.12. It lets manifest-only updates, optionally with new release notes, use the direct patch coverage gate instead of the native matrix. All four evidence producers and the 95% line and 85% branch thresholds stay in force. Mixed changes still require native fan-in. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(ci): use direct coverage for local tool updates" matches the main change: the diff selects the direct Codecov-mode patch gate for qualifying .config/dotnet-tools.json updates, with opti…
Description check Passed The description states the purpose: local .NET tool updates with optional release notes use the direct coverage gate when the patch has no measurable source lines. It lists the selection rule, the ret…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(ci): use direct coverage for local tool updates" matches the main change: the diff selects the direct Codecov-mode patch gate for qualifying .config/dotnet-tools.json updates, with optional new release entries. It is concise, specific, and follows a conventional-commit style. The changeset also includes a ReportGenerator version bump and documentation, which the title does not mention, but that is expected for a title that highlights the primary change.

Full details: Description check

Explanation

The description states the purpose: local .NET tool updates with optional release notes use the direct coverage gate when the patch has no measurable source lines. It lists the selection rule, the retained producers and thresholds, the ReportGenerator pin bump, the regression tests, the documentation updates, and verification results. It relates directly to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checked the tool-file line,
Then hopped past gates with plans in time.
Four evidence paths stayed in view,
The patch gate took the manifest through.
“Five-five-twelve!” the rabbit cheered,
As release notes joined the queue.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 0e88ee72-3be0-4b8d-9f22-cf993fc3beae
Commits

Reviewing files that changed from the base of the PR and between 3600fd1 and bc72d5b.

Files selected for processing: 8

  • .config/dotnet-tools.json
  • Aspire/ForgeTrust.AppSurface.Aspire.Tests/RepositoryEvidenceWorkflowTests.cs
  • CONTRIBUTING.md
  • eng/ci-critical-path.md
  • guides/coverage-fan-in.md
  • releases/unreleased.entries/2026-11-07-reportgenerator-tool-update.md
  • tools/ForgeTrust.AppSurface.Evidence.Validation/README.md
  • tools/ForgeTrust.AppSurface.Evidence.Validation/RepositoryEvidenceWorkflow.cs

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

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.

🟢 Approval recommended

The change is narrowly scoped to tool-manifest-only CI selection behavior, is backed by added regression tests for qualifying and mixed inventories, and is accompanied by comprehensive documentation updates alongside the ReportGenerator version bump.

No open issues 🎉

What changed in this PR

Adjusts CI coverage selection so repository-local .NET tool-manifest-only updates (optionally with new unreleased release-note entry Markdown files) use the direct Codecov-mode patch gate, preventing failures when there are no measurable source lines, and bumps the pinned ReportGenerator tool version.

Changes:

  • Add a detector for qualifying “.config/dotnet-tools.json modified + optional new releases/unreleased.entries/*.md files” diffs and exempt them from native fan-in selection.
  • Add regression tests covering qualifying inventories and mixed/non-qualifying inventories.
  • Document the exception across validation-tool docs and contributor/CI guidance; update the ReportGenerator tool pin to 5.5.12.
File Description
tools/​ForgeTrust.AppSurface.Evidence.Validation/​RepositoryEvidenceWorkflow.cs Adds tool-manifest-only change detection and uses it to suppress native coverage selection for qualifying diffs.
tools/​ForgeTrust.AppSurface.Evidence.Validation/​README.md Documents the tool-manifest coverage selection exception and clarifies direct vs native patch-gate behavior.
releases/​unreleased.entries/​2026-11-07-reportgenerator-tool-update.md Adds an unreleased entry noting the ReportGenerator tool pin update and the CI selection exception.
guides/​coverage-fan-in.md Updates the coverage fan-in guide to describe the tool-manifest exception in the current CI path.
eng/​ci-critical-path.md Updates CI critical-path documentation to reference the new exception and current measurable-line requirements.
CONTRIBUTING.md Updates contributor guidance to explain when tool-manifest-only changes use the direct patch gate and what remains required.
Aspire/​ForgeTrust.AppSurface.Aspire.Tests/​RepositoryEvidenceWorkflowTests.cs Adds regression tests for qualifying tool-manifest-only inventories and for mixed/non-qualifying cases.
.config/​dotnet-tools.json Bumps the pinned dotnet-reportgenerator-globaltool version from 5.5.11 to 5.5.12.

Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@akrock
akrock merged commit dee44f5 into main Nov 21, 2026
46 checks passed
@akrock
akrock deleted the codex/pr903-ci-gates branch November 21, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants