Skip to content

fix: an absent report is not a coverage bug — with the test #83 was closed for lacking - #87

Merged
sotashimozono merged 1 commit into
mainfrom
fix/coverage-upload-degrades
Aug 25, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
fix/coverage-upload-degrades

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

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:

This repository is public, so its storage is free and its own CI cannot reach the absent-artifact state by accident — it has to be constructed.

So it is constructed here.

What changes

actions/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 different outcomes.

The absence is now a ::warning:: plus a step-summary line, and codecov-action is gated on having a report as well as a token.

Why now

Coverage is a report. Every unit ran, exactly once is 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:

Actions storage is accrued in GigabyteHours and does not fall when artifacts are deleted.

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 for no-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 real lcov.info and takes the other branch. Without it, an action that did nothing at all would pass absent, 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

…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>
@github-actions github-actions Bot added the bug Something isn't working label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📚 Docs preview: https://codes.sota-shimozono.com/TestShards.jl/previews/PR87/

(updates on each push to this PR)

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sotashimozono
sotashimozono merged commit db3fc69 into main Aug 25, 2026
32 checks passed
@sotashimozono
sotashimozono deleted the fix/coverage-upload-degrades branch August 25, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant