Skip to content

Count the offline tests in the coverage report - #214

Merged
edridudi merged 1 commit into
mainfrom
claude/codecov-selector
Sep 13, 2026
Merged

edridudi merged 1 commit into
mainfrom
claude/codecov-selector

Conversation

@edridudi

Copy link
Copy Markdown
Collaborator

The README's coverage badge shows 69%, which is not stale — it is what Codecov genuinely has. The cause is the job's test selector:

run: mvn '-Dtest=*Preview*' -B test -Dgpg.skip

*Preview* matches on class name. Every offline test added recently — HexUtilTest, TupleTest, BackendFactoryTest, BaseServiceErrorHandlingTest, Bech32UtilValidationTest, ProposalDeserializationTest — has no "Preview" in its name, so none of them ran in that job and none of their coverage was ever uploaded.

That is 45 tests, including the entire MockWebServer error-handling suite from #205 and everything from #213, invisible to the badge.

Change

Selects by exclusion: everything except the mainnet and preprod suites. Those have their own workflows, take ~15 minutes, and are the ones that hit rate limits — they do not belong in a coverage job.

run: mvn '-Dtest=!*Mainnet*,!*Preprod*' -B test -Dgpg.skip

Effect

Before After
Tests run in the job 130 175
Lines 69% (reported) 81.8%
Branches — 71.2%

Verified locally with the exact selector: 175 tests pass, and the suites that run are the twelve Preview integration tests plus all the offline ones, with no Mainnet or Preprod.

The badge is dynamic, so it updates on the next upload to Codecov from main — no README change needed.

🤖 Generated with Claude Code

The Codecov job ran mvn -Dtest=*Preview*, which matches on class name. The
offline tests added recently - HexUtilTest, TupleTest, BackendFactoryTest,
BaseServiceErrorHandlingTest, Bech32UtilValidationTest and
ProposalDeserializationTest - do not have Preview in their names, so they
never ran there and none of their coverage was reported. The badge sat at
69% while the real figure was materially higher.

Selects by exclusion instead: everything except the mainnet and preprod
suites, which have their own workflows and are too slow and too
rate-limited to belong in the coverage job.

175 tests now run there instead of 130, reporting 81.8% of lines and
71.2% of branches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@edridudi
edridudi merged commit 471a095 into main Sep 13, 2026
3 checks passed
@edridudi
edridudi deleted the claude/codecov-selector branch September 13, 2026 22:13
edridudi added a commit that referenced this pull request Sep 13, 2026
* Authenticate the Codecov upload

Uploads have been failing since 2026-09-12:

  429 - {"message":"Rate limit reached. Please upload with the Codecov
  repository upload token to resolve issue."}

Tokenless uploads from public repos are rate limited. codecov-action exits
0 on upload errors, so the job kept reporting success while Codecov's data
went stale - the badge has been showing coverage from two days and several
merges ago, including none of the work in #213 or #214.

Passes CODECOV_TOKEN, and sets fail_ci_if_error so a failed upload is
visible rather than silent. The silence is what let this go unnoticed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Upgrade codecov-action to v5 for the current token format

The v3 action bundles uploader 0.8.0, which only accepts the legacy 36
character UUID token and rejects today's 50 character tokens:

  Token found by environment variables with length 50 did not pass validation

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: dudiedri <dudi.edri@ox.security>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant