Repository navigation
fix(ci): match Python coverage reports to their workflow run - #14651
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8b0f8941-4558-474e-9eae-005cb5ee0e47
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
October 23, 2026 13:47 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
October 23, 2026 13:47 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
had a problem deploying
to
github-app-auth
October 23, 2026 13:47 — with
GitHub Actions
Failure
Vincent Biret (baywet)
had a problem deploying
to
github-app-auth
October 23, 2026 13:53 — with
GitHub Actions
Failure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8b0f8941-4558-474e-9eae-005cb5ee0e47
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
October 23, 2026 14:06 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
marked this pull request as ready for review
October 23, 2026 14:52
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
October 23, 2026 14:52 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
enabled auto-merge
October 23, 2026 14:52
Vincent Biret (baywet)
had a problem deploying
to
github-app-auth
October 23, 2026 14:53 — with
GitHub Actions
Failure
Vincent Biret (baywet)
had a problem deploying
to
github-app-auth
October 23, 2026 14:54 — with
GitHub Actions
Failure
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The producer and consumer changes align, and no unresolved correctness or security issues were identified.
No open issues 🎉
What changed in this PR
This PR ties Python coverage comments to the pull request and revision that produced the report, replacing artifact-based PR identification with workflow-run metadata.
Changes:
- Resolve the PR from run metadata or a paginated commit lookup, then validate its state, commit, branch, and repositories before reporting.
- Share a named, reports-only artifact between the coverage workflows and download it into a dedicated directory.
- Disable persisted checkout credentials in the reporting workflow.
| File | Description |
|---|---|
.github/workflows/python-test-coverage.yml |
Uploads a named coverage artifact and removes PR-number file handling. |
.github/workflows/python-test-coverage-report.yml |
Validates the matching PR and gates artifact download and commenting on successful resolution. |
Review effort: Balanced
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 23, 2026
This branch had an error being deployed
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.
Motivation and Context
Keep Python coverage comments associated with the pull request and revision that produced the report.
Description
Resolve the pull request from workflow-run metadata, with a paginated commit-association lookup when necessary. Confirm the open pull request still matches the run's commit, branch, and repositories before downloading and commenting. Skip reporting with an explicit warning when a unique matching pull request cannot be established.
Use a named coverage artifact containing only the reports and download it to a dedicated directory.
Validation:
node --test .github\tests\*.js: passed, 19 existing automation tests.docker run --rm --mount 'type=bind,source=D:\github\semantic-kernel-coverage-report-run-selection,target=/repo,readonly' --workdir /repo rhysd/actionlint:latest -color .github/workflows/python-test-coverage.yml .github/workflows/python-test-coverage-report.yml .github/workflows/github-automation-tests.yml: passed.git diff --check: passed.The Python unit suite was not run because no Python implementation changed. End-to-end coverage reporting requires GitHub Actions.
Contribution Checklist