Repository navigation
ci: enable branch coverage and upload coverage xml as artifact - #4031
Merged
dan-petty merged 2 commits intoNov 7, 2026
Merged
Conversation
…2163) Keep `.data/coverage.xml` as an artifact with a 7-day retention in the aggregate `test` job of `ci.yml`. Add a workflow contract test in `tests/invariants/test_workflow_contracts.py` that verifies the step attributes and order. Update `CONTRIBUTING.md`, `docs/TESTING.md`, and `docs/SDLC.md` to state that the 85% floor measures lines and branches, and archive OpenSpec change 2163-enable-branch-coverage-and-upload-coverage. Closes #2163
dan-petty
marked this pull request as ready for review
November 7, 2026 21:58
Owner
Check resultsHead commit:
Skipped check: Plan Check |
dan-petty
deleted the
ci/2163-enable-branch-coverage-and-upload-coverage
branch
November 7, 2026 22:02
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.
The coverage gate measures lines only, so an untested branch passes. CI writes .data/coverage.xml for diff-cover and then discards it, so a reviewer cannot see the per-file figures of a run.
This change sets
branch = truein[tool.coverage.run], so coverage.py measures lines and branches. The aggregateTests & Coveragejob now uploads.data/coverage.xmlas an artifact usingactions/upload-artifactpinned to a commit SHA with a 7-day retention. A workflow contract test intests/invariants/test_workflow_contracts.pyverifies the step attributes, conditions, and order.CONTRIBUTING.md,docs/TESTING.md, anddocs/SDLC.mdare updated to state that the 85% floor measures lines and branches, and that the XML report is kept.Closes #2163
Change:
openspec/changes/archive/2026-11-07-2163-enable-branch-coverage-and-upload-coverage/