Repository navigation
Run the Regression Harness Under Coverage on Request - #1178
Conversation
REGRESSION_COVERAGE_TOOL names a host directory holding dotnet-coverage.dll. When set, the process and plugin runs execute under dotnet-coverage collect and write a Cobertura report beside their logs, so a host-side wrapper can upload them under the regression flag. Plugins build with a path map to /Builder, so codecov.yml's existing fixes rule maps their sources as it maps the image's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release build's version has no -g suffix, while every image version is a release tag, so the tag is what names the commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Findings
|
| Layer / File(s) | Summary |
|---|---|
Map plugin sources and copy symbols RegressionTests/regression-test.sh |
Plugin builds map source paths to /Builder and copy the generated PDB into the version directory. The script returns failure if the PDB copy fails. |
Configure regression coverage runs RegressionTests/regression-test.sh, RegressionTests/README.md, OPERATIONS.md |
When REGRESSION_COVERAGE_TOOL is set, the script validates its path and uses dotnet-coverage for process and plugin runs. It removes reports from earlier runs. The documentation describes setup, report paths, source mapping, and commit lookup. Reference-style links replace inline links in the regression README. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant Harness as Regression test script
participant Docker
participant Coverage as dotnet-coverage
participant Report as Cobertura report
Harness->>Docker: Start process or plugin run
Docker->>Coverage: Collect coverage when configured
Coverage->>Report: Write report beside the run log
Possibly related issues
- Session Handoff [coverage]: Reach 80% Coverage Without Testing Unused Code #1171: The issue defines regression-harness coverage work; this PR adds opt-in collection and report output for process and plugin runs.
Possibly related PRs
- ptr727/PlexCleaner#1172: This PR defines the
regressionCodecov flag and/Builder/::source-path mapping used by the reports and plugin builds.
Merge Risk: 
Low · up to f1de2
-
Mergeable with bounded follow-up: avoid overlapping runs and use a readable, self-contained coverage-tool directory. Otherwise, coverage reports can be lost or an opt-in coverage run can fail.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 1 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
|
A recorded local strict-review pass covers head |
PR Summary by QodoCollect regression harness coverage on request
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🟡 Changes recommended
An active documentation-style issue remains because the README uses inline links instead of the repository’s required reference-style links.
1 open issue
What changed in this PR
Adds opt-in .NET coverage collection to the regression harness while preserving existing behavior when coverage is disabled. Reports use /Builder source mapping for Codecov integration and are documented for host operators.
Changes:
- Runs process and custom-plugin tests through
dotnet-coveragewhenREGRESSION_COVERAGE_TOOLis set. - Builds plugins with
/Builderpath mapping and copies PDB files for coverage symbol resolution. - Documents coverage usage, report locations, commit resolution, and the operational workflow.
- Outstanding findings include stale coverage reports across reruns, relative coverage-tool paths not being normalized, and two documentation/comment-style nits.
This pull request requires changes.
| File | Description |
|---|---|
RegressionTests/regression-test.sh |
Adds optional coverage execution, plugin PDB/path-map handling, and tool validation. Findings: stale reports and relative tool paths are moderate issues; redundant comments are a nit. |
RegressionTests/README.md |
Documents enabling regression coverage, locating reports, and resolving the run version. Finding: use reference-style links as a nit. |
OPERATIONS.md |
Connects the regression coverage mode to the overall coverage runbook. |
Review effort: Lite
A version directory is reused across runs of one build, so a report a later run did not regenerate would otherwise pass for that run's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Docker reads a relative --volume source without a leading ./ as a named volume, so the run would mount an empty volume rather than the tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |

Summary
Phase 4 of the coverage plan tracked on #1171: the regression harness collects coverage on request, so a host-side wrapper can upload it under the
regressionflag thatcodecov.ymlalready declares.REGRESSION_COVERAGE_TOOLnames a host directory holdingdotnet-coverage.dll. When it is set, theprocessandcustomplugin runs execute underdotnet-coverage collect, each writingcoverage_<run>.xmlbeside its log. When it is unset, the runs are unchanged.-p:PathMap=<build dir>=/Builder, and their PDB is copied beside the DLL. Socodecov.yml's/Builder/::fixes rule maps plugin sources the same way it maps the image's.RegressionTests/README.md"Running the harness" documents the variable, the reports, and how a run's version resolves to its commit.OPERATIONS.md"Measure code coverage" points there.The wrapper and the upload live in the private host-configuration repository, as
OPERATIONS.mdalready says.Verification
developimage,dotnet-coverage collect ... /PlexCleaner/Debug/PlexCleaner defaultsettings --settingsfile=...passed the dashed arguments through and wrote a Cobertura report with/Buildersource paths.MatroskaHeaderCleanupwith the path map gave its portable PDB/Builderdocument paths.shellcheckandshfmt -dare clean, andprose_lint.py --diffis clean apart from the comment lines this change adds, which thecommentslabel covers.plexcleaner-regression.sh coverage quick develop reducedwith this branch as the harness ref, over thedevelopimage 3.23.53-g0644743d39. The process andMatroskaHeaderCleanupruns each wrote a Cobertura report, the plugin's naming/Builder/Pluginssources. The upload resolved the commit to 0644743 ondevelop. Codecov's flags list now holdsregression, and its report for that commit under the flag reads 53.25% over 65 files, with both plugin files mapped to repository paths.🤖 Generated with Claude Code