Skip to content

ci: pass CODECOV_TOKEN on coverage upload - #1385

Merged
henryiii merged 1 commit into
mainfrom
ci/codecov-token
Jul 29, 2026
Merged

henryiii merged 1 commit into
mainfrom
ci/codecov-token

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Coverage uploads from main have failed since the branch became protected:

error -- Upload queued for processing failed: {"message":"Token required because branch is protected"}

Codecov permits tokenless uploads for public repos only on unprotected branches. Fork PRs get a colon-prefixed branch name (fork:main) and upload correctly, but pushes to main are rejected. As a result Codecov holds no report for any recent main commit and falls back to e4ee3af, which is 228 commits old. Every PR then shows a coverage loss that does not exist — see #1379, where Codecov reports "All modified and coverable lines are covered by tests" but codecov/project still fails.

This adds the token input. The repository secret CODECOV_TOKEN must be set for the fix to operate.

Codecov rejects tokenless uploads to protected branches, so pushes to
main fail with "Token required because branch is protected". Codecov has
no report for any recent main commit and falls back to a base 228
commits old, which makes every PR look like it loses coverage.

Fork PRs get a colon-prefixed branch name and keep uploading without the
token.

Assisted-by: ClaudeCode:claude-opus-5
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (e4ee3af) to head (61e112e).
⚠️ Report is 229 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1385      +/-   ##
===========================================
- Coverage   100.00%   99.76%   -0.24%     
===========================================
  Files           17       19       +2     
  Lines         4546     5217     +671     
  Branches         0     1128    +1128     
===========================================
+ Hits          4546     5205     +659     
- Misses           0       12      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henryiii
henryiii merged commit a04962c into main Jul 29, 2026
74 of 75 checks passed
@henryiii
henryiii deleted the ci/codecov-token branch July 29, 2026 12:43
henryiii added a commit that referenced this pull request Jul 29, 2026
Followup to #1385.

:robot: _AI text below_ :robot:

Codecov reports main at 99.76% with 12 missed lines in 5 spots. This
fills them:

- `sum_string_vector`: int64 overflow/underflow fall-back to the double
path (`TypeTools.hpp`)
- `handle_secondary_array`: array-escaping from #1110, direct and via
`process_quoted_string` (`StringTools_inl.hpp`)
- Config parsing: quoted section name with a trailing comment, and a
too-short header after comment strip (`Config_inl.hpp`)
- `Option::get_name` on a hidden (empty-group) option (`Option_inl.hpp`)

The last line, the `break` in the rvalue `App::_parse` overload
(`App_inl.hpp:1601`), is unreachable: `_parse_single` can only return
false when a parent app exists, and this overload only runs at the top
level. It is now marked `LCOV_EXCL_LINE` as defensive code.
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