ci: unblock dependabot PRs (codecov token, flaky README example) - #30
Merged
Conversation
added 2 commits
August 21, 2026 20:07
Dependabot PRs run against the Dependabot secret store, which does not
carry CODECOV_TOKEN, so the uploader ran with an empty token and codecov
rejected it ("Token required because branch is protected"). With
fail_ci_if_error: true that failed the coverage job, and with it the
"CI ok" gate, on every dependabot PR.
Coverage is still measured on those runs; only the upload is skipped,
with a notice annotation saying so.
The example filled a capacity-2 cache with three keys and then removed one of them, so whether a "size" eviction was ever recorded depended on when moka happened to run its pending maintenance. It passed only because moka 0.12.15 leaked a phantom entry slot per insert/remove race, which effectively shrank the capacity; moka 0.12.16 fixes that leak and the example started failing. Overflow the cache well past its capacity and drive maintenance with run_pending_tasks() instead of guessing, which also matches what the notes below the example say about lazy delivery.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
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.
All three open dependabot PRs (#27, #28, #29) were red. Two independent causes:
1.
coveragefailed on every dependabot PR. Those runs use the Dependabotsecret store, which does not carry
CODECOV_TOKEN, so the uploader ran withToken length: 0and codecov rejected the upload.fail_ci_if_error: trueturned that into a job failure and took the
CI okgate with it.The upload is now guarded by a job-level
HAS_CODECOV_TOKENflag (job-levelenv is visible to a step's own
if:; step-level env is not). Coverage is stillmeasured on those runs — only the upload is skipped, with a notice annotation.
If you'd rather have real coverage on dependabot PRs, mirror the secret into the
Dependabot store:
gh secret set CODECOV_TOKEN --app dependabot.2. The eviction-listener README example was flaky, which is what broke #27
(moka 0.12.15 -> 0.12.16). It filled a capacity-2 cache with three keys and then
removed one, so a
"size"eviction was never guaranteed. It only passed because0.12.15 leaked a phantom entry slot per insert/remove race, effectively shrinking
the capacity; 0.12.16 fixes that leak.
The example now overflows the cache well past capacity and drives maintenance
with
run_pending_tasks(). Verified deterministic against both 0.12.15 and0.12.16 locally.