Skip to content

ci: dogfood the pull request patchcov build - #135

Merged
newhoggy merged 1 commit into
mainfrom
issue-134-dogfood-pr-own-build
Oct 10, 2026
Merged

newhoggy merged 1 commit into
mainfrom
issue-134-dogfood-pr-own-build

Conversation

@newhoggy

Copy link
Copy Markdown
Contributor

Closes #134

The existing Coverage job runs the last release, so it cannot catch regressions in the PR's own diff, parser or renderer. This adds a parallel advisory Coverage (PR build) job that checks out the immutable PR head, builds its locked debug binary, measures the same checkout with cargo-llvm-cov and invokes ./target/debug/patchcov explicitly for rendering and gating.

The job publishes a separate sticky comment, run summary and artifact before enforcing 90% patch / 95% overall coverage. Fork PRs skip comments but retain reports and gates. It runs only on pull requests and has its own cache key and 15-minute timeout. The existing released-action job and required checks are unchanged.

The new job intentionally has no baseline: it reports patch and total coverage; project deltas and indirect changes remain in the release report. The action always installs a release even in thin mode and has no local-binary input, so direct CLI orchestration avoids changes to the external action. The cost is one extra debug build plus instrumented test run. CONTRIBUTING explains the distinction.

Implementation plan: #134 (comment)

Verification

All passed locally, repeated after fetching/rebasing onto origin/main (which had not moved):

  • actionlint .github/workflows/ci.yml and git diff --check.
  • cargo fmt --check, cargo test --locked --all-targets, cargo test --locked --doc.
  • cargo clippy --locked --all-targets -- -D warnings, cargo run --locked -- lint-markers.
  • cargo +1.88.0 test --locked --all-targets and cargo +1.88.0 test --locked --doc.
  • RUSTDOCFLAGS='-D warnings' cargo doc --locked --no-deps --document-private-items.
  • cargo build --locked --bin patchcov, cargo llvm-cov --locked --all-features --workspace --no-report, and cargo llvm-cov report --lcov --output-path coverage-pr-head.lcov.
  • Built CLI markdown render and both gates: 99.4% overall line coverage, no new executable lines in this workflow/docs diff. A deliberate 101% line threshold exits 1 as expected.

Review and limitations

Reviewed the committed changes in ci.yml and CONTRIBUTING.md against origin/main: no actionable findings; none fixed or skipped. No departures from the plan or unrelated follow-ups.

Hosted job execution, actual added CI time and fork-token behavior require GitHub verification; local runs cannot prove comment/artifact publication.

@github-actions

Copy link
Copy Markdown

Coverage

Total: 99.4% ⚪ 0 pp vs main

Comparing 9f564e3..e11c7c9 (merge-base → PR head)

No per-file coverage changes vs main.

Touched files absent from every coverage report (2)
  • .github/workflows/ci.yml
  • CONTRIBUTING.md

These files may contain no executable code or may have been omitted from the coverage run.

Patch coverage

No new executable lines added by this diff.

📦 Full per-file coverage summary · run summary

@github-actions

Copy link
Copy Markdown

PR build

Measured and rendered by this PR's own patchcov build. No baseline deltas; see the release Coverage report for those.

Coverage

Total: 99.4%

Comparing 9f564e3..e11c7c9 (merge-base → PR head)

No baseline available yet (first run, or the main baseline artifact was missing). Per-file deltas will appear on PRs once a baseline has been published from main.

Touched files absent from every coverage report (2)
  • .github/workflows/ci.yml
  • CONTRIBUTING.md

These files may contain no executable code or may have been omitted from the coverage run.

Patch coverage

No new executable lines added by this diff.

Full per-file summary is attached as the coverage-summary build artifact.

@newhoggy
newhoggy added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 38365d8 Oct 10, 2026
8 checks passed
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.

ci: also dogfood the pull request's own patchcov build

1 participant