fix: an absent report is not a coverage bug — with the test #83 was closed for lacking - #87
Merged
Merged
Conversation
…osed for lacking #83 measured all of this and was closed for one stated reason: this repository is public, so its own CI cannot reach the absent-artifact state by accident and the degrade path would ship untested. So the state is constructed here. WHAT CHANGES. `download-artifact` by `name:` HARD-FAILS on absence; by `pattern:` it succeeds with zero results. That asymmetry is why `collect` reaches its completeness gate under a full artifact quota while `Coverage (upload)` died at step two — same missing artifact, two outcomes. The absence is now a warning annotation and a step-summary line, and the uploader is gated on having a report as well as a token. WHY IT MATTERS NOW. Coverage is a REPORT; `Every unit ran, exactly once` is a CORRECTNESS CLAIM, and this file's own rule is that only the second may fail a suite. A private consumer whose org has exhausted Actions storage was getting a red required check for a run whose tests were all green — and it does not clear by deleting artifacts, because storage accrues in GigabyteHours. #83's closing note says so; measured downstream, 9628 expired records were purged org-wide and the newest retained artifact stayed frozen at the moment the quota filled. THE TEST. `action-degrades.yml` asks the action for an artifact no job in the run produces and requires the job to finish GREEN, plus a POSITIVE CONTROL that publishes a real lcov and takes the other branch — without which an action that did nothing at all would pass the first job, and degrading on absence would be indistinguishable from never working. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
📚 Docs preview: https://codes.sota-shimozono.com/TestShards.jl/previews/PR87/ (updates on each push to this PR) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Reopens the change in #83, with the thing that PR was closed for not having.
#83 measured everything correctly and was closed for one stated reason:
So it is constructed here.
What changes
actions/download-artifactbyname:hard-fails on absence; bypattern:it succeeds with zero results. That asymmetry is whycollectreaches its completeness gate under a full artifact quota whileCoverage (upload)died at step two — same missing artifact, two different outcomes.The absence is now a
::warning::plus a step-summary line, andcodecov-actionis gated on having a report as well as a token.Why now
Coverage is a report.
Every unit ran, exactly onceis a correctness claim. This repository's own rule is that only the second may fail a suite — and a private consumer whose org has exhausted Actions storage was getting a red required check for a run whose tests were all green.It does not clear by itself quickly, either. #83's own closing note records why:
Confirmed the hard way downstream: 9,628 expired artifact records were purged org-wide and the newest retained artifact stayed frozen at the moment the quota filled. It recovers at the billing rollover, not before.
The test
action-degrades.yml:absent— asks the action forno-such-artifact-<run_id>, which no job in the run produces, and requires the job to finish green.name:would hard-fail here;pattern:is what makes it survive, and this job is what keeps that true.present— the positive control: publishes a reallcov.infoand takes the other branch. Without it, an action that did nothing at all would passabsent, and degrading on absence would be indistinguishable from never working.What this does not do
It does not make coverage arrive. The org secret still does not reach a private repo on a free plan, so those consumers upload nothing — that is the separate half of the problem and it is stated in the action's own message. This PR only stops a missing report from failing a suite.
🤖 Generated with Claude Code