Repository navigation
Coverage: fail when a src project is missing from the report - #51
Conversation
From 2026-10-01 to 2026-10-11 coverlet.MTP 10.1.0 excluded DotCov.dll, and the Coverage gate and the badge passed on the two assemblies left. The gate now requires a Cobertura package for every project under src/ before the thresholds count. It runs before `check`, so a failure never leaves a PASS summary, and the badge is only drawn after the gate passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eae43872e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try | ||
| { | ||
| while (reader.ReadToFollowing("package")) | ||
| measured.Add(reader.GetAttribute("name") ?? ""); |
There was a problem hiding this comment.
Require measured lines before accepting a package
When an assembly is emitted as an empty package, such as <package name="DotCov"><classes /></package>, this adds its name to measured even though the project supplied no coverage data. The subsequent check then evaluates only the other projects and can still return PASS:, recreating the incomplete-measurement result this gate is intended to prevent; require actual line data for each expected package rather than package-name presence alone.
AGENTS.md reference: AGENTS.md:L17-L19
Useful? React with 👍 / 👎.
| // (coverlet.MTP 10.1.0 excluded DotCov.dll while this gate passed on the other two), so every | ||
| // src/ project needs a package before the thresholds count. Runs before `check` so a failure | ||
| // never leaves a PASS summary behind; a missing input stays `check`'s to report. | ||
| private void AssertEverySourceProjectMeasured() |
There was a problem hiding this comment.
Move project coverage policy into DotCov
This private build-wrapper method now owns project discovery, raw Cobertura interpretation, and the missing-project gate, so DotCov's parser/check path and other consumers do not share the policy and future XML-handling changes must be duplicated to avoid disagreement before check runs. Put the required-package evaluation in DotCov and leave this Fallout build to bind the repository's expected projects and present the result.
AGENTS.md reference: src/DotCov.Fallout/AGENTS.md:L30-L32
Useful? React with 👍 / 👎.
| if (!source.DirectoryExists() || !Path.Exists(Input)) | ||
| return; |
There was a problem hiding this comment.
Let empty report directories reach the NoData gate
When --reports names an existing directory with no matching coverage files, including a CI run where collection emits nothing, Path.Exists(Input) is true and ReportResolver.Resolve(Input) returns an empty list, so this precheck reports every project as missing before dotcov check can emit its documented NODATA: verdict and warning GitHub summary. Treat an empty resolved input set like a missing input and delegate it to the normal gate so the exit status and summary describe the same inconclusive result.
AGENTS.md reference: AGENTS.md:L17-L19
Useful? React with 👍 / 👎.
Summary
Target Coverage DependsOn CollectCoverage + AssertEverySourceProjectMeasured # every src/*/*.csproj needs a <package name="…"> in the report dotcov check --min-line … --min-branch … --github-summaryFrom 2026-10-01 (#38, coverlet.MTP 10.1.0) to 2026-10-11 (#46) coverlet excluded
DotCov.dll, and the gate and the badge passed onDotCov.ToolandDotCov.Falloutalone. The new check runs beforecheck, so a failure never leaves a PASS summary, and CI only draws the badge after the gate step passes.Evidence
DotCovpackage passed the gate (badge history: 99.7% on 09-29, 99.5% from 10-01).After:
Coverage_SourceProjectMissingFromReport_FailsBeforeTheThresholdsexpects a non-zero exit namingDroppedand noPASS:;Coverage_EverySourceProjectMeasured_ReachesTheThresholdsexpectsPASS:. Not run locally; this PR's CI runs both and the real gate.Merge Danger
Door: two-way
Blast Radius: coverage-gate
A new
src/project without coverage now fails CI until the test project's coverlet include filters cover it.🤖 Generated with Claude Code