Skip to content

PAY-7045 Dependabot coverage for Ruby 4, and CI housekeeping - #77

Merged
fz-jamesf merged 7 commits into
mainfrom
PAY-7045-dependabot-coverage
Dec 1, 2026
Merged

fz-jamesf merged 7 commits into
mainfrom
PAY-7045-dependabot-coverage

Conversation

@fz-jamesf

@fz-jamesf fz-jamesf commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Note

Ruby 4 CI fails on this PR until #82 is in, and that's expected. Ruby 4's lockfile has json 3, which raises on the duplicate "name"/:name payload Save#save builds, so two WebHook#update specs fail. #82 fixes that bug, but its own Ruby 4 job fails rubocop until this PR fixes it. Each PR fixes the other's Ruby 4 failure. Main has no required status checks, so merge this one first, then #82 rebases onto main and goes green.

Why

Dependabot never updated Ruby 4's gems: dependabot.yml named /gemfiles/ruby4.0, but the directory is gemfiles/ruby4, and it had no committed lockfile anyway. With nothing locked, the Ruby 4 CI job resolves the newest gems on every run, so main went red today without a commit that caused it: rubocop 1.93 added Style/DirectiveScope, which flags two directives in lib/.

  • Dependabot now covers every gemfiles/* directory with one glob, so a renamed or added Ruby can't fall out of coverage again. The weekly group becomes one PR across all three lockfiles.
  • Adds the 28-day cooldown and grouped GitHub Actions updates the other FZ repos use (PAY-6318). Security updates skip the cooldown.
  • Commits Ruby 4's lockfile. .gitignore excluded every Gemfile.lock, so the 3.3 and 3.4 lockfiles had been force-added and Ruby 4's never was.
  • Fixes the two directives and bumps rubocop to 1.93 on 3.3 and 3.4 too, since their locked versions don't understand disable-next.
  • Bumps addressable to 2.10.0 and json to 2.21.2 on Ruby 3.3 and 3.4, clearing the open Snyk advisories: addressable's ReDoS CVEs (fixed in 2.9.1) and json's heap overflow (CVE-2026-54696, fixed in 2.19.9). json stays on 2.x there, since json 3 trips the Save#save bug below. This supersedes Bump addressable from 2.8.8 to 2.9.1 in /gemfiles/ruby3.3 #74.
  • Switches the gem source from http to https, and ignores .tool-versions alongside .ruby-version.
  • Turns off the matrix's fail-fast, so one Ruby failing no longer cancels the others and hides whether they pass.

Nothing here reaches merchants: the gem has no runtime dependencies and ships only lib/, the README and the gemspec. The two lib/ changes are rubocop comments.

Ticket: PAY-7045

Security Impact

Gems are now fetched over https instead of http, and the dev and test lockfiles clear Snyk's open addressable and json advisories. Everything else is CI and dev-dependency config. No change to the published gem's code, dependencies or files.

Rollback

Revert the PR. No data, flag or published gem involved.

Testing

CI on Ruby 3.3, 3.4 and 4. Locally, rspec and rubocop pass on 3.3 and 3.4. On Ruby 4, rubocop passes and rspec has 2 failures in WebHook#update: json 3.2.0 raises on the duplicate "name"/:name keys that Save#save builds. That's a real gem bug, fixed in #82, so the Ruby 4 job stays red until it lands. Merge this one first, then #82 rebases onto it.

🤖 Generated with Claude Code

Claude sessions
  • Created by: PR Reviews · 57e8f9d7-6655-4c30-84cd-74040767eca2 · 2026-11-26
  • Last touched by: PR Reviews · 57e8f9d7-6655-4c30-84cd-74040767eca2 · 2026-11-26 · owner

fz-jamesf and others added 4 commits November 26, 2026 12:53
- The gemfiles pointed at http://rubygems.org, so CI and local installs
  fetched gem metadata unencrypted.
- Only the source line and the lockfiles' remote line change; no gem moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rubocop 1.93 has Style/DirectiveScope, which flags a disable/enable pair
  around a single method. The Ruby 4 CI job resolves the newest rubocop on
  every run, so it started failing main on these two directives.
- The rubocops locked for Ruby 3.3 and 3.4 (1.84 and 1.86) don't understand
  disable-next. Bumping them keeps all three Rubies linting with the same
  version and the same result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .gitignore excluded every Gemfile.lock, so when Ruby 4 support went in its
  lockfile was never committed (the 3.3 and 3.4 ones had been force-added).
  The Ruby 4 CI job resolved the newest gems on every run, which is how a
  rubocop release broke main with no commit to the repo.
- The negation keeps the per-Ruby lockfiles tracked while the root
  Gemfile.lock stays local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The Ruby 4 entry named /gemfiles/ruby4.0, but the directory is
  gemfiles/ruby4, so Dependabot never updated Ruby 4's gems. One glob over
  /gemfiles/* means adding or renaming a Ruby can't drop out of coverage.
- With directories, the weekly group is one PR across all three lockfiles
  instead of one per Ruby.
- A 28-day cooldown and grouped GitHub Actions updates match the config the
  other FZ repos use (PAY-6318). Security updates skip the cooldown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyk-io-au

snyk-io-au Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

fz-jamesf and others added 3 commits November 26, 2026 12:55
- The matrix used the default fail-fast, so one Ruby failing cancelled the
  others and hid whether they passed. A Ruby-specific break (like json 3 on
  Ruby 4) then looked like every Ruby was broken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Snyk's PR check failed on both lockfiles: addressable below 2.9.1 has
  several ReDoS CVEs, and json below 2.19.9 has a heap buffer overflow
  (CVE-2026-54696), with Ruby 3.3 also below json 2.19.2's format string fix.
- addressable 2.10.0 and json 2.21.2 clear them all, and Ruby 4's lockfile
  already has those versions or newer. json stays on 2.x here so the 3.3 and
  3.4 builds don't take json 3's duplicate-key error before the gem's
  Save#save is fixed.
- Dev and test gems only (webmock pulls addressable in); nothing in the
  published gem changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The gem supports several Rubies and CI passes each one to setup-ruby
  explicitly, so a version-manager pin belongs to whoever's checkout it is.
  .ruby-version was already ignored; mise and asdf write .tool-versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Ruby 4 CI is intentionally failing pending #82, and the proposed merge sequence would bypass required checks, requiring human coordination and validation of the combined changes.

No open issues 🎉

What changed in this PR

Restores Dependabot coverage for Ruby 4 and makes the gem’s development and CI dependencies reproducible. Runtime behavior is unchanged; the lib/ edits affect only RuboCop comments.

Changes:

  • Covers all Ruby gemfile directories with grouped weekly updates and adds GitHub Actions updates with a 28-day cooldown.
  • Commits Ruby 4’s lockfile, updates Ruby 3.3/3.4 dependencies, and switches gem sources to HTTPS.
  • Updates RuboCop directives and disables CI matrix fail-fast. Ruby 4’s known JSON-related spec failures remain pending #82.
File Description
lib/​fat_zebra/​validation.rb Updates the RuboCop suppression comment to disable-next.
lib/​fat_zebra/​api_resource.rb Updates the RuboCop suppression comment to disable-next.
gemfiles/​ruby4/​Gemfile.lock Adds locked dependencies and checksums for Ruby 4.
gemfiles/​ruby4/​Gemfile Switches the gem source to HTTPS.
gemfiles/​ruby3.4/​Gemfile.lock Updates addressable, json, and RuboCop dependencies; uses HTTPS.
gemfiles/​ruby3.4/​Gemfile Switches the gem source to HTTPS.
gemfiles/​ruby3.3/​Gemfile.lock Updates addressable, json, and RuboCop dependencies; uses HTTPS.
gemfiles/​ruby3.3/​Gemfile Switches the gem source to HTTPS.
.gitignore Allows per-Ruby lockfiles and ignores .tool-versions.
.github/​workflows/​ci.yml Keeps other matrix jobs running when one fails.
.github/​dependabot.yml Broadens Ruby coverage and configures grouped updates and cooldowns.

Review effort: Balanced

@fz-jamesf
fz-jamesf merged commit 590230c into main Dec 1, 2026
7 of 8 checks passed
@fz-jamesf
fz-jamesf deleted the PAY-7045-dependabot-coverage branch December 1, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants