Skip to content

Add missing codecov gem to unblock SimpleCov coverage reporting - #293

Merged
david22swan merged 1 commit into
mainfrom
adrian/fix-coverage-gemfile
Aug 18, 2026
Merged

Add missing codecov gem to unblock SimpleCov coverage reporting#293
david22swan merged 1 commit into
mainfrom
adrian/fix-coverage-gemfile

Conversation

@actowery

Copy link
Copy Markdown
Member

Summary

spec_helper.rb's SIMPLECOV=yes gate (via puppetlabs_spec_helper's module_spec_helper) requires simplecov, simplecov-console, and codecov to all be loadable. simplecov-console was already declared in the Gemfile and simplecov was present only transitively, but codecov was missing entirely. This PR adds gem "codecov", '~> 0.6', require: false to the Gemfile's :development group — no other changes.

Additional Context

  • Root cause and the steps to reproduce: running SIMPLECOV=yes bundle exec rake spec on main raises LoadError: cannot load such file -- codecov at spec_helper.rb:7, which puppetlabs_spec_helper wraps into a generic "add the simplecov, simplecov-console, codecov gems to Gemfile" error. Surfaced during a DevX coverage audit across PDK/Bolt-adjacent tooling (PPM-1579).
  • Thought process: codecov is required by the existing gate but was never added as a dependency — this just supplies the missing piece rather than changing any gating behavior.

Related Issues (if any)

Surfaced as part of PPM-1579 (Quality Improvements for H2 2026) coverage audit — no existing issue filed against this repo specifically.

Checklist

  • 🟢 Spec tests. — SIMPLECOV=yes bundle exec rake spec now completes and reports 82.02% line coverage (406/495) instead of erroring. Note: 3 pre-existing failures in spec/integration/puppetcore_spec.rb (missing PUPPET_FORGE_TOKEN env var) are unrelated to this change.
  • 🟢 Acceptance tests. — not run (this is a dev/coverage-tooling-only dependency change, no acceptance-test surface affected).
  • Manually verified. — verified locally under Ruby 3.3.11; note CI runs Ruby 3.1 (ci.yml), not independently verified against 3.1 but this is a pure Gemfile dependency addition with no version-specific code.

spec_helper.rb's SIMPLECOV=yes gate (via puppetlabs_spec_helper's
module_spec_helper) requires simplecov, simplecov-console, and codecov
to all be loadable. simplecov-console was already declared here and
simplecov was present transitively, but codecov was missing entirely,
so running with SIMPLECOV=yes raised a LoadError instead of producing
a coverage report.

With this gem added, `SIMPLECOV=yes bundle exec rake spec` now
correctly reports coverage (82.02% line coverage as of this change).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@actowery
actowery requested a review from a team as a code owner August 18, 2026 17:01
@david22swan
david22swan merged commit e7fd52a into main Aug 18, 2026
4 checks passed
@david22swan
david22swan deleted the adrian/fix-coverage-gemfile branch August 18, 2026 17:06
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.

2 participants