kettle-jem 7.1.45 โ†’ 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +100 -1
  4. data/LICENSE.md +4 -6
  5. data/README.md +113 -21
  6. data/lib/kettle/jem/maintenance_changelog.rb +49 -9
  7. data/lib/kettle/jem/member_workflow_wrappers.rb +24 -1
  8. data/lib/kettle/jem/tasks/install_task.rb +64 -4
  9. data/lib/kettle/jem/templates/.github/workflows/perf-comment.yml.example +1 -1
  10. data/lib/kettle/jem/templates/.github/workflows/perf.yml.example +2 -2
  11. data/lib/kettle/jem/templates/.github/workflows/platforms.yml.example +87 -0
  12. data/lib/kettle/jem/templates/.structuredmerge/kettle-jem.yml.example +2 -1
  13. data/lib/kettle/jem/templates/AGENTS.md.example +56 -272
  14. data/lib/kettle/jem/templates/CHANGELOG.transfer.md +42 -9
  15. data/lib/kettle/jem/templates/CODE_OF_CONDUCT.md.example +58 -100
  16. data/lib/kettle/jem/templates/CONTRIBUTING.md.example +35 -1
  17. data/lib/kettle/jem/templates/FUNDING.md.example +7 -0
  18. data/lib/kettle/jem/templates/FUNDING.md.no-osc.example +7 -0
  19. data/lib/kettle/jem/templates/README.md.example +23 -19
  20. data/lib/kettle/jem/templates/SECURITY.md.example +3 -3
  21. data/lib/kettle/jem/templates/gem.gemspec.example +3 -3
  22. data/lib/kettle/jem/templates/gemfiles/modular/coverage.gemfile.example +1 -1
  23. data/lib/kettle/jem/templates/gemfiles/modular/coverage_local.gemfile.example +4 -2
  24. data/lib/kettle/jem/templates/gemfiles/modular/documentation_local.gemfile.example +2 -1
  25. data/lib/kettle/jem/templates/gemfiles/modular/duel.gemfile.example +1 -1
  26. data/lib/kettle/jem/templates/gemfiles/modular/style.gemfile.example +1 -1
  27. data/lib/kettle/jem/templates/gemfiles/modular/style_local.gemfile.example +2 -1
  28. data/lib/kettle/jem/templates/gemfiles/modular/templating.gemfile.example +1 -1
  29. data/lib/kettle/jem/templates/gemfiles/modular/templating_local.gemfile.example +4 -2
  30. data/lib/kettle/jem/templates/readme/partials/configuration.md.example +0 -1
  31. data/lib/kettle/jem/templates/shim/Gemfile.example +1 -1
  32. data/lib/kettle/jem/templates/shim/gem.gemspec.example +2 -2
  33. data/lib/kettle/jem/version.rb +1 -1
  34. data/lib/kettle/jem.rb +306 -127
  35. data.tar.gz.sig +0 -0
  36. metadata +48 -184
  37. metadata.gz.sig +0 -0
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "fileutils"
4
+ require "rbconfig"
4
5
  require "bundler"
5
6
  require "json"
6
7
  require "open3"
@@ -39,7 +40,9 @@ module Kettle
39
40
  TRANSIENT_BUNDLER_RETRY_MAX_SECONDS = 16.0
40
41
  TRANSIENT_BUNDLER_ERRORS = [
41
42
  "isn't a Gem::Specification (NilClass instead)",
42
- "undefined method 'content_address' for nil"
43
+ "undefined method 'content_address' for nil",
44
+ "Text file busy",
45
+ "Text+file+busy"
43
46
  ].freeze
44
47
 
45
48
  def run(project_root: Dir.pwd, env: ENV, run_options: {}, command_runner: method(:run_system_command))
@@ -1905,9 +1908,24 @@ module Kettle
1905
1908
  report.merge(changed_files: (Array(report[:changed_files]) + extra).uniq.sort)
1906
1909
  end
1907
1910
 
1911
+ # Porcelain paths are relative to the repository root, not the project,
1912
+ # so a monorepo member would report `gems/<member>/Gemfile.lock` and miss
1913
+ # every project-relative comparison (lockfile restore, internal paths).
1914
+ # Scope to the project and strip the repository prefix. With -z a
1915
+ # rename/copy carries its source path as a separate NUL field.
1908
1916
  def git_dirty_paths(project_root)
1909
- git_output(project_root, "status", "--porcelain", "-z", "--untracked-files=all")
1910
- .split("\0").map { |entry| entry[3..] }.compact.reject(&:empty?).sort
1917
+ prefix = git_output(project_root, "rev-parse", "--show-prefix").strip
1918
+ fields = git_output(project_root, "status", "--porcelain", "-z", "--untracked-files=all", "--", ".").split("\0")
1919
+ paths = []
1920
+ until fields.empty?
1921
+ entry = fields.shift
1922
+ next if entry.length < 4
1923
+
1924
+ status = entry[0, 2]
1925
+ paths << entry[3..]
1926
+ fields.shift if status.include?("R") || status.include?("C")
1927
+ end
1928
+ paths.filter_map { |path| path.delete_prefix(prefix) if path.start_with?(prefix) }.reject(&:empty?).uniq.sort
1911
1929
  end
1912
1930
 
1913
1931
  # A Gemfile.lock resolved in local-path development mode (*_DEV / *_LOCAL env) embeds
@@ -2221,9 +2239,16 @@ module Kettle
2221
2239
  # with a known transient Bundler race. Returns the last result and how many times the command ran.
2222
2240
  def call_command_with_transient_bundler_retry(command, chdir:, env:, quiet:, command_runner:)
2223
2241
  calls = 0
2242
+ mutating_bundle = bundle_install_mutating_command?(command)
2224
2243
  loop do
2225
2244
  calls += 1
2226
- result = command_runner.call(command, chdir: chdir, env: env, quiet: quiet)
2245
+ result = if mutating_bundle
2246
+ with_bundle_install_lock(env) do
2247
+ command_runner.call(command, chdir: chdir, env: env, quiet: quiet)
2248
+ end
2249
+ else
2250
+ command_runner.call(command, chdir: chdir, env: env, quiet: quiet)
2251
+ end
2227
2252
  return [result, calls] if result.fetch(:success) || calls >= TRANSIENT_BUNDLER_RETRY_ATTEMPTS
2228
2253
  return [result, calls] unless transient_bundler_failure?(result[:stderr])
2229
2254
 
@@ -2231,6 +2256,41 @@ module Kettle
2231
2256
  end
2232
2257
  end
2233
2258
 
2259
+ def bundle_install_mutating_command?(command)
2260
+ tokens = Array(command).map(&:to_s)
2261
+ return false if tokens.empty?
2262
+
2263
+ first = tokens.first
2264
+ return true if first == File.join("bin", "setup") || first.end_with?("/bin/setup")
2265
+
2266
+ bundle_index = tokens.index { |token| File.basename(token) == "bundle" }
2267
+ return false unless bundle_index
2268
+
2269
+ %w[install update].include?(tokens[bundle_index + 1])
2270
+ end
2271
+
2272
+ def bundle_install_lock_path(env = ENV)
2273
+ env_hash = env || {}
2274
+ override = (env_hash["KETTLE_DEV_BUNDLE_INSTALL_LOCK"] || ENV["KETTLE_DEV_BUNDLE_INSTALL_LOCK"]).to_s.strip
2275
+ return override unless override.empty?
2276
+
2277
+ xdg_state = (env_hash["XDG_STATE_HOME"] || ENV["XDG_STATE_HOME"]).to_s.strip
2278
+ base = xdg_state.empty? ? File.join(Dir.home, ".local", "state") : xdg_state
2279
+ ruby_abi = "#{RUBY_ENGINE}-#{RbConfig::CONFIG["ruby_version"]}-#{RUBY_PLATFORM}"
2280
+ File.join(base, "kettle-dev", "bundle-install-#{ruby_abi}.lock")
2281
+ end
2282
+
2283
+ def with_bundle_install_lock(env = ENV)
2284
+ lock_path = bundle_install_lock_path(env)
2285
+ FileUtils.mkdir_p(File.dirname(lock_path))
2286
+ File.open(lock_path, File::RDWR | File::CREAT, 0o600) do |lock|
2287
+ lock.flock(File::LOCK_EX)
2288
+ yield
2289
+ ensure
2290
+ lock&.flock(File::LOCK_UN)
2291
+ end
2292
+ end
2293
+
2234
2294
  # 2, 4, 8, 16, 16 seconds after the first, second, ... failed attempt.
2235
2295
  def transient_bundler_retry_delay(failed_attempts)
2236
2296
  [TRANSIENT_BUNDLER_RETRY_BASE_SECONDS * (2**(failed_attempts - 1)), TRANSIENT_BUNDLER_RETRY_MAX_SECONDS].min
@@ -49,7 +49,7 @@ jobs:
49
49
  path: ${{ runner.temp }}/report
50
50
  run-id: ${{ github.event.workflow_run.id }}
51
51
  github-token: ${{ github.token }}
52
- - uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0
52
+ - uses: ruby/setup-ruby@7eaac3fe3108dfb746bef3a3c1a21344d57923c7 # v1.348.0
53
53
  if: steps.report.outcome == 'success'
54
54
  with:
55
55
  ruby-version: ruby
@@ -144,7 +144,7 @@ jobs:
144
144
  - name: Setup the baseline's Ruby
145
145
  id: baseline-ruby
146
146
  if: steps.baseline.outputs.ruby != ''
147
- uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0
147
+ uses: ruby/setup-ruby@7eaac3fe3108dfb746bef3a3c1a21344d57923c7 # v1.348.0
148
148
  with:
149
149
  ruby-version: ${{ steps.baseline.outputs.ruby }}
150
150
  # The bundle for this Ruby too, which the baseline's workers load.
@@ -161,7 +161,7 @@ jobs:
161
161
 
162
162
  # The candidate's Ruby, from its version file (the same one Duel reads)
163
163
  - name: Setup Ruby & RubyGems
164
- uses: ruby/setup-ruby@13841a643d859a0b8166ebb0211afbf488121be4 # v1.346.0
164
+ uses: ruby/setup-ruby@7eaac3fe3108dfb746bef3a3c1a21344d57923c7 # v1.348.0
165
165
  with:
166
166
  bundler-cache: true
167
167
 
@@ -0,0 +1,87 @@
1
+ # Targets the evergreen latest release of ruby on non-Linux platforms (macOS, Windows)
2
+ name: Current MRI (Platforms)
3
+
4
+ permissions:
5
+ contents: read
6
+ checks: write
7
+
8
+ env:
9
+ K_SOUP_COV_DO: false
10
+
11
+ on:
12
+ push:
13
+ branches:
14
+ - 'main'
15
+ - '*-stable'
16
+ tags:
17
+ - '!*' # Do not execute on tags
18
+ pull_request:
19
+ branches:
20
+ - '*'
21
+ # Allow manually triggering the workflow.
22
+ workflow_dispatch:
23
+
24
+ # Cancels all previous workflow runs for the same branch that have not yet completed.
25
+ concurrency:
26
+ # The concurrency group contains the workflow name and the branch name.
27
+ group: "${{ github.workflow }}-${{ github.ref }}"
28
+ cancel-in-progress: true
29
+
30
+ jobs:
31
+ test:
32
+ if: "github.event_name != 'push' || (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]'))"
33
+ name: Specs ${{ matrix.os }} ${{ matrix.ruby }}@${{ matrix.appraisal }}
34
+ runs-on: ${{ matrix.os }}
35
+ timeout-minutes: 30
36
+ env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
37
+ BUNDLE_GEMFILE: ${{ github.workspace }}/Appraisal.root.gemfile
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ include:
42
+ # Ruby 4.0
43
+ {KJ|CI:PLATFORMS_OS_MATRIX_ENTRIES}
44
+
45
+ steps:
46
+ {KJ|CI:PLATFORMS_MACOS_HARDENING_STEP} - name: Checkout
47
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48
+ with:
49
+ persist-credentials: false
50
+
51
+ - name: Setup Ruby & RubyGems
52
+ uses: appraisal-rb/setup-ruby-flash@b04c0c9f2e443c909968abc828a0b53e77567cf9 # v2.15 bundle validation and compatibility installation
53
+ with:
54
+ ruby-version: ${{ matrix.ruby }}
55
+ rubygems: ${{ matrix.rubygems }}
56
+ bundler: ${{ matrix.bundler }}
57
+ bundler-cache: true
58
+ manual-compatibility-bundle: true
59
+ gem-install-retries: 7
60
+
61
+ - name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
62
+ id: bundleAppraisalAttempt1
63
+ run: bundle exec appraisal ${{ matrix.appraisal }} install
64
+ # Continue to the next step on failure
65
+ continue-on-error: true
66
+
67
+ # Effectively an automatic retry of the previous step.
68
+ - name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
69
+ id: bundleAppraisalAttempt2
70
+ # If bundleAppraisalAttempt1 failed, try again here; Otherwise skip.
71
+ if: ${{ steps.bundleAppraisalAttempt1.outcome == 'failure' }}
72
+ run: |
73
+ rm -f gemfiles/${{ matrix.appraisal }}.gemfile.lock
74
+ rm -rf vendor/bundle "$HOME/.bundle/cache"
75
+ bundle exec appraisal ${{ matrix.appraisal }} install
76
+
77
+ - name: Restore RSpec status log
78
+ if: "${{!env.ACT}}"
79
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
80
+ with:
81
+ path: .rspec_status
82
+ key: rspec-status-platforms-${{matrix.os}}-${{matrix.ruby}}-${{matrix.appraisal}}-${{hashFiles('**/Gemfile.lock','Appraisal.root.gemfile','gemfiles/**/*.gemfile')}}-${{github.run_id}}-${{github.run_attempt}}
83
+ restore-keys: |
84
+ rspec-status-platforms-${{matrix.os}}-${{matrix.ruby}}-${{matrix.appraisal}}-${{hashFiles('**/Gemfile.lock','Appraisal.root.gemfile','gemfiles/**/*.gemfile')}}-
85
+ rspec-status-platforms-${{matrix.os}}-${{matrix.ruby}}-${{matrix.appraisal}}-
86
+
87
+ {KJ|CI:PLATFORMS_OS_TEST_STEPS}
@@ -154,7 +154,7 @@ engines:
154
154
  - truffleruby
155
155
 
156
156
  # List the OS platforms this project's CI exercises. kettle-jem uses this to
157
- # generate the current.yml OS matrix and the README platform tier table.
157
+ # generate the current.yml and platforms.yml OS matrices and the README platform tier table.
158
158
  # Windows applies only when declared: the `if: matrix.os` guards and the
159
159
  # Windows-only test step are emitted solely for destinations that opt in.
160
160
  #
@@ -585,6 +585,7 @@ tokens:
585
585
  paypal: "peterboling" # PayPal.Me slug only. Used as https://www.paypal.com/paypalme/<value>. ENV: KJ_FUNDING_PAYPAL
586
586
  buymeacoffee: "pboling" # Buy Me a Coffee slug only. Used as https://www.buymeacoffee.com/<value>. ENV: KJ_FUNDING_BUYMEACOFFEE
587
587
  liberapay: "pboling" # Liberapay account slug only. Used as https://liberapay.com/<value>/donate. ENV: KJ_FUNDING_LIBERAPAY
588
+ cloudroom_referral: "" # Full Cloudroom referral URL. Opt-in: when empty, the referral paragraph is omitted from README.md and FUNDING.md. ENV: KJ_FUNDING_CLOUDROOM_REFERRAL
588
589
 
589
590
  social:
590
591
  mastodon: "galtzo" # Local handle only for the instance assumed by the template link. Current template uses https://ruby.social/@<value>. ENV: KJ_SOCIAL_MASTODON
@@ -1,284 +1,68 @@
1
1
  # AGENTS.md - Development Guide
2
2
 
3
- ## ๐ŸŽฏ Project Overview
4
-
5
- This project is a **RubyGem** managed with the [StructuredMerge](https://github.com/structuredmerge/structuredmerge-ruby) toolchain.
6
-
7
- **Minimum Supported Ruby**: See the gemspec `required_ruby_version` constraint.
8
- **Local Development Ruby**: See `mise.toml` for the version used in local development (typically the latest stable Ruby).
9
-
10
- ### Modular Gemfile Architecture
11
-
12
- Gemfiles are split into modular components under `gemfiles/modular/`. Each component handles a specific concern (coverage, style, debug, etc.). The main `Gemfile` loads these modular components via `eval_gemfile`.
13
- Gemfiles in the project, including modular ones, can utilize a `*_local.gemfile` counterpart pattern enabled via an ENV flag. This uses `nomono` to load sibling gems in the same workspace.
14
-
15
- ## โš ๏ธ AI Agent Terminal Limitations
16
-
17
- ### Use `mise` for Project Environment
18
-
19
- **CRITICAL**: The canonical project environment lives in `mise.toml`, with local overrides in `.env.local` loaded via `dotenvy`.
20
-
21
- โš ๏ธ **Watch for trust prompts**: After editing `mise.toml` or `.env.local`, `mise` may require trust to be refreshed before commands can load the project environment. Until that trust step is handled, commands can appear hung or produce no output, which can look like terminal access is broken.
22
-
23
- **Recovery rule**: If a `mise exec` command goes silent or appears hung, assume `mise trust` is the first thing to check. Recover by running:
24
-
25
- ```bash
26
- mise trust -C /path/to/project
27
- mise exec -C /path/to/project -- bundle exec kettle-test
28
- ```
29
-
30
- Do this before spending time on unrelated debugging; in this workspace pattern, silent `mise` commands are usually a trust problem first.
31
-
32
- โœ… **CORRECT** โ€” Run self-contained commands with `mise exec`:
33
-
34
- ```bash
35
- mise exec -C /path/to/project -- bundle exec kettle-test
36
- ```
37
-
38
- โœ… **CORRECT** โ€” If you need shell syntax first, load the environment in the same command:
39
-
40
- ```bash
41
- eval "$(mise env -C /path/to/project -s bash)" && bundle exec kettle-test
42
- ```
43
-
44
- โŒ **WRONG** โ€” Do not rely on a previous command changing directories:
45
-
46
- ```bash
47
- cd /path/to/project
48
- bundle exec rspec
49
- ```
50
-
51
- โŒ **WRONG** โ€” A chained `cd` does not give directory-change hooks time to update the environment:
52
-
53
- ```bash
54
- cd /path/to/project && bundle exec rspec
55
- ```
56
-
57
- ### Prefer Internal Tools Over Terminal
58
-
59
- โœ… **PREFERRED** โ€” Use internal tools:
60
-
61
- - `grep_search` instead of `grep` command
62
- - `file_search` instead of `find` command
63
- - `read_file` instead of `cat` command
64
- - `list_dir` instead of `ls` command
65
- - `replace_string_in_file` or `create_file` instead of `sed` / manual editing
66
-
67
- โŒ **AVOID** when possible:
68
-
69
- - `run_in_terminal` for information gathering
70
-
71
- Only use terminal for:
72
-
73
- - Running tests (`bundle exec kettle-test`)
74
- - Installing dependencies (`bundle install`)
75
- - Simple commands that do not require much shell escaping
76
- - Running scripts (prefer writing a script over a complicated command with shell escaping)
77
-
78
- When you do run tests, keep the full output visible so you can inspect failures completely.
79
-
80
- ## ๐Ÿ—๏ธ Architecture
81
-
82
- ### Toolchain Dependencies
83
-
84
- This gem is part of the **StructuredMerge** ecosystem. Key development tools:
85
-
86
- | Tool | Purpose |
87
- |------|---------|
88
- | `kettle-dev` | Development dependency: Rake tasks, release tooling, CI helpers |
89
- | `kettle-test` | Test infrastructure: RSpec helpers, stubbed_env, timecop |
90
- | `kettle-jem` | Template management and gem scaffolding |
91
-
92
- ### Executables (from kettle-dev)
93
-
94
- | Executable | Purpose |
95
- |-----------|---------|
96
- | `kettle-release` | Full gem release workflow |
97
- | `kettle-pre-release` | Pre-release validation |
98
- | `kettle-dvcs` | DVCS (git) workflow automation |
99
- | `kettle-commit-msg` | Commit message validation |
100
- | `kettle-check-eof` | EOF newline validation |
101
-
102
- ## ๐Ÿ“ Project Structure
103
-
104
- ```
105
- lib/
106
- โ”œโ”€โ”€ <gem_namespace>/ # Main library code
107
- โ”‚ โ””โ”€โ”€ version.rb # Version constant (managed by kettle-release)
108
- spec/
109
- โ”œโ”€โ”€ fixtures/ # Test fixture files (NOT auto-loaded)
110
- โ”œโ”€โ”€ support/
111
- โ”‚ โ”œโ”€โ”€ classes/ # Helper classes for specs
112
- โ”‚ โ””โ”€โ”€ shared_contexts/ # Shared RSpec contexts
113
- โ”œโ”€โ”€ spec_helper.rb # RSpec configuration (loaded by .rspec)
114
- gemfiles/
115
- โ”œโ”€โ”€ modular/ # Modular Gemfile components
116
- โ”‚ โ”œโ”€โ”€ coverage.gemfile # SimpleCov dependencies
117
- โ”‚ โ”œโ”€โ”€ debug.gemfile # Debugging tools
118
- โ”‚ โ”œโ”€โ”€ documentation.gemfile # YARD/documentation
119
- โ”‚ โ”œโ”€โ”€ optional.gemfile # Optional dependencies
120
- โ”‚ โ”œโ”€โ”€ rspec.gemfile # RSpec testing
121
- โ”‚ โ”œโ”€โ”€ style.gemfile # RuboCop/linting
122
- โ”‚ โ””โ”€โ”€ x_std_libs.gemfile # Extracted stdlib gems
123
- โ”œโ”€โ”€ ruby_*.gemfile # Per-Ruby-version Appraisal Gemfiles
124
- โ””โ”€โ”€ Appraisal.root.gemfile # Root Gemfile for Appraisal builds
125
- .git-hooks/
126
- โ”œโ”€โ”€ commit-msg # Commit message validation hook
127
- โ”œโ”€โ”€ prepare-commit-msg # Commit message preparation
128
- โ”œโ”€โ”€ commit-subjects-goalie.txt # Commit subject prefix filters
129
- โ””โ”€โ”€ footer-template.erb.txt # Commit footer ERB template
130
- ```
131
-
132
- ## ๐Ÿ”ง Development Workflows
133
-
134
- ### Running Commands
135
-
136
- Always make commands self-contained. Use `mise exec -C /home/pboling/src/my/prism-merge -- ...` so the command gets the project environment in the same invocation.
137
- If the command is complicated write a script in local tmp/ and then run the script.
138
-
139
- ### Running Tests
140
-
141
- **Always run specs via `kettle-test`** (provided by `kettle-test`). It runs `bundle exec rspec`,
142
- captures all output to `tmp/kettle-test/rspec-TIMESTAMP.log`, and prints a structured highlight block:
143
- timing, seed, pass/fail count, failing examples, and SimpleCov coverage percentages.
144
-
145
- Full suite:
146
-
3
+ ## Project Overview
4
+
5
+ RubyGem managed with the [StructuredMerge](https://github.com/structuredmerge/structuredmerge-ruby) toolchain (`kettle-dev`, `kettle-test`, `kettle-jem`).
6
+
7
+ - **Minimum Supported Ruby:** see the gemspec `required_ruby_version`.
8
+ - **Local Development Ruby & Env:** see `mise.toml` (with local overrides in `.env.local`).
9
+ - **Modular Gemfiles:** `Gemfile` loads `gemfiles/modular/*.gemfile` via `eval_gemfile`, with `*_local.gemfile` counterparts using `nomono` for local sibling gems when an ENV toggle is set. Never set `BUNDLE_GEMFILE` to a modular gemfile directly.
10
+ - **Full layout, executables, coverage vars, & release steps:** see `CONTRIBUTING.md`, `RUBOCOP.md`, and `spec/README.md`.
11
+
12
+ ## Environment & Terminal Rules
13
+
14
+ - **Always run self-contained commands** with `mise exec` (never rely on a prior `cd` or shell state):
15
+ ```bash
16
+ mise exec -C /path/to/project -- bundle exec kettle-test
17
+ ```
18
+ - **`mise trust` recovery:** after editing `mise.toml` or `.env.local`, `mise` may require trust and commands can hang or go silent. Immediately run:
19
+ ```bash
20
+ mise trust -C /path/to/project
21
+ ```
22
+ then rerun the `mise exec` command before debugging anything else.
23
+ - Prefer built-in file/search/edit tools over shell commands for reading and editing; reserve the terminal for tests, Bundler, and scripts (for complex commands, write a script under local `tmp/` instead of escaping).
24
+
25
+ ## Development Workflows
26
+
27
+ ### Tests & Coverage
28
+ - **Always run specs via `kettle-test`** (captures logs to `tmp/kettle-test/` and prints timing, seed, failures, and SimpleCov summary):
29
+ ```bash
30
+ mise exec -C /path/to/project -- bundle exec kettle-test
31
+ ```
32
+ - For targeted/single-file spec runs, disable the hard coverage gate:
33
+ ```bash
34
+ mise exec -C /path/to/project -- env K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
35
+ ```
36
+ - **NEVER pipe test output through `head`/`tail`** โ€” inspect full failure output.
37
+ - Coverage details: `bin/rake coverage` or `bin/kettle-soup-cover -d` (see `CONTRIBUTING.md` for `K_SOUP_COV_*` env vars).
38
+
39
+ ### Lint & Quality
147
40
  ```bash
148
- mise exec -C /path/to/project -- bundle exec kettle-test
149
- ```
150
-
151
- For single file, targeted, or partial spec runs the coverage threshold **must** be disabled.
152
- Use the `K_SOUP_COV_MIN_HARD=false` environment variable to disable hard failure:
153
-
154
- ```bash
155
- mise exec -C /path/to/project -- env K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
41
+ mise exec -C /path/to/project -- bundle exec rubocop-gradual
42
+ mise exec -C /path/to/project -- bundle exec rake reek
156
43
  ```
44
+ See `RUBOCOP.md` for `.rubocop_gradual.lock` policy.
157
45
 
158
- ### Template Management (kettle-jem)
159
-
160
- Run the full kettle-jem installer to sync project files with the latest template
161
- and regenerate local finishing artifacts such as binstubs:
162
-
46
+ ### Template Management (`kettle-jem`)
47
+ Use the `kettle-jem` executable (never internal `kettle:jem:*` rake tasks directly):
163
48
  ```bash
164
- # Standard run (quiet, non-interactive โ€” the default)
49
+ # Standard non-interactive install (quiet=true, force=true, allowed=true by default)
165
50
  mise exec -C /path/to/project -- env K_JEM_TEMPLATING=true kettle-jem install
166
-
167
- # Verbose output (see per-file detail)
168
- mise exec -C /path/to/project -- env K_JEM_TEMPLATING=true KETTLE_JEM_VERBOSE=true kettle-jem install
169
-
170
- # Interactive mode (prompt before each change)
171
- mise exec -C /path/to/project -- env K_JEM_TEMPLATING=true kettle-jem install --interactive
172
-
173
- # Scoped file update only; skips install finishing steps
51
+ # Verbose or interactive: add --verbose (or KETTLE_JEM_VERBOSE=true) or --interactive
52
+ # Scoped update only (skips finishing steps):
174
53
  mise exec -C /path/to/project -- env K_JEM_TEMPLATING=true kettle-jem template --only README.md
175
54
  ```
176
55
 
177
- Use the `kettle-jem` executable as the public entrypoint. The
178
- `kettle:jem:*` rake tasks are internal orchestration targets that the
179
- executable may call after it has prepared the templating environment.
180
-
181
- **Current defaults** (no flags needed):
182
- - **quiet=true** โ€” only phase summary lines shown; use `--verbose` or `KETTLE_JEM_VERBOSE=true` to opt out
183
- - **force=true** โ€” non-interactive; use `--interactive` to opt out
184
- - **allowed=true** โ€” env file changes auto-accepted; set `allowed=false` to require review
185
-
186
- ### Building & Installing Locally
187
-
188
- To test local code changes across sibling repos, rebuild and reinstall the gem:
189
-
190
- ```bash
191
- cd /path/to/gem && rm -rf *.gem && SKIP_GEM_SIGNING=true gem build *.gemspec && gem install --force *.gem
192
- ```
193
-
194
- - `SKIP_GEM_SIGNING=true` bypasses the PEM passphrase prompt for signed gemspecs.
195
- - `--force` overwrites the currently installed version.
196
- - Always rebuild **and** reinstall before verifying cross-repo behaviour.
197
-
198
- ### Coverage Reports
199
-
200
- ```bash
201
- mise exec -C /path/to/project -- bin/rake coverage
202
- mise exec -C /path/to/project -- bin/kettle-soup-cover -d
203
- ```
204
-
205
- **Key ENV variables** (set in `mise.toml`, with local overrides in `.env.local`):
206
- - `K_SOUP_COV_DO=true` โ€“ Enable coverage
207
- - `K_SOUP_COV_MIN_LINE` โ€“ Line coverage threshold
208
- - `K_SOUP_COV_MIN_BRANCH` โ€“ Branch coverage threshold
209
- - `K_SOUP_COV_MIN_HARD=true` โ€“ Fail if thresholds not met
210
- - `K_SOUP_COV_MIN_STRICT=true` โ€“ Require 100% line, branch, and method coverage
211
-
212
- ### Code Quality
213
-
214
- ```bash
215
- mise exec -C /path/to/project -- bundle exec rake reek
216
- mise exec -C /path/to/project -- bundle exec rubocop-gradual
217
- ```
218
-
219
- ### Releasing
220
-
221
- ```bash
222
- bin/kettle-pre-release # Validate everything before release
223
- bin/kettle-release # Full release workflow
224
- ```
225
-
226
- ## ๐Ÿ“ Project Conventions
227
-
228
- ### Freeze Block Preservation
229
-
230
- Template updates preserve custom code wrapped in freeze blocks:
231
-
232
- ```ruby
233
- # kettle-jem:freeze
234
- # ... custom code preserved across template runs ...
235
- # kettle-jem:unfreeze
236
- ```
237
-
238
- ### Modular Gemfile Architecture
239
-
240
- Gemfiles are split into modular components under `gemfiles/modular/`. Each component handles a specific concern (coverage, style, debug, etc.). The main `Gemfile` loads these modular components via `eval_gemfile`.
241
-
242
- ### Forward Compatibility with `**options`
243
-
244
- **CRITICAL**: All constructors and public API methods that accept keyword arguments MUST include `**options` as the final parameter for forward compatibility.
245
-
246
- ## ๐Ÿงช Testing Patterns
247
-
248
- ### Test Infrastructure
249
-
250
- - Uses `kettle-test` for RSpec helpers (stubbed_env, block_is_expected, silent_stream, timecop)
251
- - Uses `Dir.mktmpdir` for isolated filesystem tests
252
- - Spec helper is loaded by `.rspec` โ€” never add `require "spec_helper"` to spec files
253
-
254
- ### Environment Variable Helpers
255
-
256
- ```ruby
257
- before do
258
- stub_env("MY_ENV_VAR" => "value")
259
- end
260
-
261
- before do
262
- hide_env("HOME", "USER")
263
- end
264
- ```
265
-
266
- ### Dependency Tags
267
-
268
- Use dependency tags to conditionally skip tests when optional dependencies are not available:
269
-
270
- ```ruby
271
- RSpec.describe SomeClass, :prism_merge do
272
- # Skipped if prism-merge is not available
273
- end
274
- ```
275
-
276
- ## ๐Ÿšซ Common Pitfalls
56
+ ### Local Gem Build & Release
57
+ - Cross-repo local build/install (`SKIP_GEM_SIGNING=true` skips the PEM passphrase prompt):
58
+ ```bash
59
+ SKIP_GEM_SIGNING=true gem build *.gemspec && gem install --force *.gem
60
+ ```
61
+ - Release: `bin/kettle-pre-release` then `bin/kettle-release` (see `CONTRIBUTING.md`).
277
62
 
278
- 1. **NEVER pipe test output through `head`/`tail`** โ€” Run tests without truncation so you can inspect the full output.
279
- 2. **README.md is mostly auto-generated by kettle-jem** โ€” Only the following sections may be edited by hand or by agents:
280
- - `## ๐ŸŒป Synopsis`
281
- - `## โš™๏ธ Configuration`
282
- - `## ๐Ÿ”ง Basic Usage`
63
+ ## Conventions & Pitfalls
283
64
 
284
- All other sections (badges, installation, FLOSS funding, security, contributing, versioning, license, etc.) are managed by the kettle-jem template and will be overwritten on the next templating run. Do not edit them.
65
+ - **Freeze blocks:** wrap custom code in templated files with `# kettle-jem:freeze` / `# kettle-jem:unfreeze` to preserve it across template runs.
66
+ - **Forward compatibility:** all constructors and public API methods accepting keyword arguments **MUST** end with `**options`.
67
+ - **Testing:** `spec_helper` is loaded by `.rspec` โ€” never add `require "spec_helper"` to spec files. Use `kettle-test` helpers (`stub_env`, `hide_env`, `block_is_expected`, `silent_stream`, `timecop`), `Dir.mktmpdir` for filesystem tests, and dependency tags (e.g. `:prism_merge`) for optional dependencies.
68
+ - **`README.md` is mostly template-managed:** only hand-edit `## ๐ŸŒป Synopsis`, `## โš™๏ธ Configuration`, and `## ๐Ÿ”ง Basic Usage`. All other sections are managed by `kettle-jem` and overwritten on the next template run.
@@ -17,15 +17,25 @@ filters against a fixed project context, never transfers them to a destination
17
17
  changelog, and rejects unknown fields, values, and operators. Use filters only
18
18
  for genuine destination applicability boundaries.
19
19
 
20
- Available fields are `profile`, `topology`, `ruby.min`, `engine.jruby`,
21
- `engine.truffleruby`, `engine.alternates`, `feature.appraisals`,
22
- `feature.rubyforum`, `feature.rubyforum_project_tag`,
23
- `feature.corporate_sponsors`, `feature.organization_logo`,
24
- `feature.structuredmerge_driver`, `feature.dedicated_version_gem`,
25
- `workflow.dep_heads`, `workflow.jruby_94`, `workflow.duel`, and
26
- `version_gem.mode`. Boolean
27
- fields accept `true` or `false`; `ruby.min` accepts normal version comparisons;
28
- the other fields accept `=` or `!=`.
20
+ Supported `##` sections are the standard Keep-a-Changelog headings: `Added`,
21
+ `Changed`, `Deprecated`, `Removed`, `Fixed`, and `Security`.
22
+
23
+ Available filter fields:
24
+ - `profile` (`=` / `!=`): `full`, `monorepo-root`, `monorepo-subgem-package`,
25
+ `monorepo-subgem-release`, `monorepo-subgem-full`, `shim`
26
+ - `topology` (`=` / `!=`): `standalone` (includes monorepo roots),
27
+ `monorepo-subproject`
28
+ - `version_gem.mode` (`=` / `!=`): `inline`, `dedicated`, `disabled`
29
+ - `ruby.min`: version comparisons (`<`, `<=`, `=`, `!=`, `>=`, `>`)
30
+ - Booleans (`=true` / `=false`): `engine.jruby`, `engine.truffleruby`,
31
+ `engine.alternates`, `feature.appraisals`, `feature.rubyforum`,
32
+ `feature.rubyforum_project_tag`, `feature.corporate_sponsors`,
33
+ `feature.organization_logo`, `feature.structuredmerge_driver`,
34
+ `feature.dedicated_version_gem`, `workflow.dep_heads`, `workflow.jruby_94`,
35
+ `workflow.duel`
36
+
37
+ Validate entries after editing with:
38
+ `bundle exec rspec spec/integration/readme_changelog_template_spec.rb -e "transfer"`.
29
39
 
30
40
  ## Added
31
41
 
@@ -51,6 +61,9 @@ the other fields accept `=` or `!=`.
51
61
  Perf workflow compares each pull request, each push to main, and, on a
52
62
  schedule, the last release, and `rake duel` compares local changes, with
53
63
  the benchmarks in `duel/`.
64
+ - kettle-jem-template-20261203-001 [if topology=monorepo-subproject] - Monorepo subgems now include
65
+ `.rubocop`, `.rubocop.yml`, and `.rubocop_rspec.yml` so local linting matches
66
+ `rubocop-lts`.
54
67
 
55
68
  ## Changed
56
69
 
@@ -66,6 +79,26 @@ the other fields accept `=` or `!=`.
66
79
  installing the main Gemfile bundle.
67
80
  - kettle-jem-template-20260801-001 - Generated README gem dashboard links now
68
81
  use ClickGems instead of BestGems.
82
+ - kettle-jem-template-20261203-002 - Updated `CODE_OF_CONDUCT.md` and README
83
+ badges from Contributor Covenant 2.1 to Contributor Covenant 3.0.
84
+ - kettle-jem-template-20261203-003 [if feature.corporate_sponsors=true] - Moved README Corporate Sponsorship
85
+ into its own un-gated `## ๐Ÿข Corporate Sponsorship` section so non-MIT
86
+ projects also display corporate sponsor cards.
87
+ - kettle-jem-template-20261203-004 - Development Gemfiles now pass
88
+ `relative_paths: true` to `nomono` (`>= 1.1.20`) so sibling `Gemfile.lock`
89
+ PATH remotes stay relative and checkout-independent.
90
+ - kettle-jem-template-20261203-006 [if topology=standalone] - Trimmed generated `AGENTS.md` to ~4k
91
+ characters by removing duplicate sections, a hardcoded local path, and
92
+ IDE-specific tool names.
93
+ - kettle-jem-template-20261203-007 [if topology=standalone] - Split non-Linux CI lanes (macOS and
94
+ Windows) out of `.github/workflows/current.yml` into `.github/workflows/platforms.yml`
95
+ (with `fail-fast: false` and `Jitujoshi71/soft-fail`) so macOS runner starvation does not turn the Current MRI badge red.
96
+
97
+ ## Removed
98
+
99
+ - kettle-jem-template-20261203-005 [if topology=standalone] - Removed retired Tidelift funding links
100
+ and badges; `SECURITY.md` now directs vulnerability reports to GitHub Private
101
+ Vulnerability Reporting.
69
102
 
70
103
  ## Fixed
71
104