Skip to content

fix(release): 🐛 install borrowed changelog bundles before the changelog exec - #68

Merged
pboling merged 1 commit into
mainfrom
fix/issue-67-cold-start-bundles
Nov 20, 2026
Merged

pboling merged 1 commit into
mainfrom
fix/issue-67-cold-start-bundles

Conversation

@pboling

@pboling pboling commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #67 — kettle-release now installs the borrowed bundles before the changelog step execs them, so a release works from a cold gem home (e.g. right after a Ruby upgrade).

Root cause

The release materializes the bundles it owns (member Gemfile, Appraisal.root.gemfile) up front, but the changelog step execs two borrowed bundles it never installed:

  1. The tool bundle (release_changelog_gemfile — the kettle-changelog checkout's gemfiles/release.gemfile as BUNDLE_GEMFILE)
  2. The member coverage bundle (changelog_coverage_gemfile — exec'd by kettle-changelog's coverage step)

bundle exec never auto-installs, so on a fresh gem home the changelog step died with Bundler::GemNotFound (observed on the 3.1.31 release attempt: the structuredmerge 7.1.17 set pinned by the tool bundle was absent from the new Ruby's gem home). Ordering matters: the changelog runs in step 0 and needs the coverage bundle early, before any appraisal installs happen.

Change

run_pre_release_checks! now calls materialize_borrowed_changelog_bundles! before run_changelog!:

  • Each present borrowed gemfile (tool bundle, coverage bundle; deduped) gets bundle install with BUNDLE_GEMFILE set.
  • Installs use a disposable BUNDLE_LOCKFILE under tmp/kettle-release/lockfiles/ — the existing release-task copy when the bundle has a canonical lockfile, a fresh tmp path otherwise, so no canonical lockfile is ever written or created in the repo.
  • bundle install is a fast no-op on a warm machine, so this is unconditional when the changelog step runs (skipped with --skip-changelog).

Tests

4 new specs: both bundles install before the changelog exec with disposable lockfiles; a lockfile-less borrowed bundle installs against a tmp lockfile leaving the repo clean; no installs when the changelog runs from the ambient bundle; no installs when the step is skipped. 4 existing run_pre_release_checks! specs gained a general run_cmd! allowance (they run against the real repo root, which has a coverage bundle that now — correctly — gets an install call first).

Full suite green (968 examples); member lint clean.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Health
kettle-dev 92% 76% ➖
Summary 92% (5992 / 6520) 76% (2293 / 3018) ➖

Minimum allowed line rate is 91%

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 44692512223

Coverage increased (+0.1%) to 86.863%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 18 of 18 lines across 1 file are fully covered (100%).
  • 24 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

24 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
lib/kettle/dev/rakelib/reek.rake 14 4.55%
lib/kettle/dev/rakelib/appraisal.rake 8 47.52%
lib/kettle/dev/rakelib/bundle_audit.rake 2 60.87%

Coverage Stats

Coverage Status
Relevant Lines: 6520
Covered Lines: 5992
Line Coverage: 91.9%
Relevant Branches: 3018
Covered Branches: 2293
Branch Coverage: 75.98%
Branches in Coverage %: Yes
Coverage Strength: 60.57 hits per line

💛 - Coveralls

@pboling
pboling merged commit bee6745 into main Nov 20, 2026
27 checks passed
@pboling
pboling deleted the fix/issue-67-cold-start-bundles branch November 20, 2026 09:43
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.

kettle-release is not cold-start safe: borrowed bundles (changelog tool, coverage) are never installed

2 participants