Repository navigation
ci: dogfood patchcov-action on pull requests - #131
Merged
Merged
Conversation
added 2 commits
October 10, 2026 22:52
Add an advisory Coverage job to CI that runs action-works/patchcov-action@v1: a sticky comment and 90% patch / 95% line gates on pull requests, and the baseline published on pushes to main. It is skipped on merge_group and is not a required check. Document it in CONTRIBUTING and align the action example's checkout pin with CI (v7). Closes #130
A fork's token is read-only, so the sticky comment would fail the job. The gates still apply. Add actions: read to the README example, which the baseline download needs.
CoverageTotal: 99.4% ⚪ 0 pp vs Comparing No per-file coverage changes vs Touched files absent from every coverage report (4)
These files may contain no executable code or may have been omitted from the coverage run. Patch coverageNo new executable lines added by this diff. |
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #130
What changed and why
patchcov recommends
action-works/patchcov-actionbut never ran it on its own PRs. This adds aCoveragejob toci.ymlthat does:fail-under-patch: 90gate and afail-under-lines: 95gate (the project measures 99.1% lines locally; the action's default line gate is 30).pushtomain: publishes the baseline artifact. The job is inci.ymlbecause the action looks for the baseline inci.ymlby default.timeout-minutes: 15, like the other jobs that run tests; the header comment on timeouts is updated.Decisions the issue left open, all recorded in the plan comment:
Coverageis not in.github/rulesets/main.jsonor the required-checks list, so a red run cannot block a merge or eject a queue entry. Making it required later is a one-line change.merge_group. The job is skipped there (if: github.event_name != 'merge_group'): the comment, patch gate and baseline arepull_request/push-only, so the queue run would only repeat the instrumented tests. A skipped job counts as passing if it is ever required.@v1. It is the only tag on the action repo. The action's README onmaindocuments@v2, which has not been tagged, so@v2would not resolve.v1defaults to patchcov 0.1.1, so the job passesversion: latest.actions: readon top of the issue's permissions: the baseline lookup downloads another run's artifact, and a job-levelpermissions:block drops everything it does not list. I could not confirm that the download fails without it, so treat it as precaution; the first run onmainwill show. The README example gains it too.rust-cacheandcargo-llvm-covitself.commentis turned off for them (read-only token); gates still apply.CONTRIBUTING.mddescribes the job; the README and troubleshooting checkout examples move@v4to@v7to match CI, as the issue asked to consider.Verification
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo run --locked -- lint-markers: clean.cargo test --locked --all-targets(540 passed, 0 failed, includes the markdown link check) andcargo test --locked --doc: pass.ci.ymlparses; every job hastimeout-minutes; required-check names are unchanged.cargo llvm-cov --all-features --workspacelocally: 99.14% lines, ~28 s.Coveragerun is the test; the baseline publish can only be seen after merge.Review findings not acted on
version: latesttests the last release, not the PR's code, and is not reproducible. Deliberate: the issue is to run the shipped action. A new release could redden the advisory job, which is the rough edge dogfooding should show.ci.ymlfilename; noconcurrencygroup. The filename dependency is noted in the workflow comment. No other job usesconcurrency, so adding one only here is out of keeping; follow-up if runs pile up.Follow-ups
Coveragerequired (ruleset + CONTRIBUTING list) once it has run stably.@v2but nov2tag exists.