Skip to content

Fix red security scan on main, a flaky card-reconciliation test, and macOS test portability - #627

Merged
techmore merged 4 commits into
mainfrom
claude/ci-fixes-main
Nov 3, 2026
Merged

techmore merged 4 commits into
mainfrom
claude/ci-fixes-main

Conversation

@techmore

@techmore techmore commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Fixes what is red on main today, fixes one intermittent failure, and makes two tests pass on a Mac.

Changes

  • Security scan (red on main). bundler-audit fails on advisories published today against loofah 2.25.2, nokogiri 1.19.4 and rails-html-sanitizer 1.7.1. This is a conservative update of only those three gems: loofah 2.25.3, nokogiri 1.19.7, rails-html-sanitizer 1.7.2. bundler-audit check --update passes locally.

  • Host vitals test, portable. It read /proc directly, so it failed on macOS. HostVitals now reads /proc through one small method that the test stubs with fixed contents. The test checks exact CPU and memory percentages instead of only their types. Disk and database size still come from the real host. The real /proc read still runs where /proc exists (Linux CI) and skips elsewhere. A new test checks that an unreadable reading is nil, never 0.

  • Platform overview instance label. Under a C/POSIX locale, such as a shell without LANG, Ruby returns ENV values as binary, so "SER8 · Incus" failed to match. The label is now read as UTF-8 under any locale. A value that is not valid UTF-8 shows as "Not configured" instead of raising.

  • Intermittent CI (sqlite3) failure in PosCardPaymentTest. PosPaymentReconciliationJob takes one machine-wide flock and skips its sweep when the lock is held. Parallel test workers shared that file, so one test's job sometimes did nothing. This hit 6 of the last 25 failed CI runs: Web app UX pass: phone top bar, 24px targets, Dark contrast, clearer Settings and Staff #623, Bump @shopify/cli from 4.9.4 to 5.0.0 #597 and Bump the expo-sdk-patches group across 1 directory with 3 updates #598 at line 72, Speed score: 9 means ~2 s (log scale to 0 at 120 s) #588 at line 56. The lock path is now one method, and the tests use a temporary file per test. Holding the real lock from another process reproduces both failures on the old code, and they pass on the new one. Production keeps the same lock file.

Overlap

Testing

  • Locally on macOS with Ruby 4.0.6: the full bin/rails test suite, the product-site checks and the node tests.
  • CI runs on Linux.

🤖 Generated with Claude Code

techmore and others added 4 commits November 2, 2026 18:54
bundler-audit on main fails on advisories published today against
loofah 2.25.2, nokogiri 1.19.4 and rails-html-sanitizer 1.7.1.
Conservative update of only those three gems to loofah 2.25.3,
nokogiri 1.19.7 and rails-html-sanitizer 1.7.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test read /proc/loadavg and /proc/meminfo directly, so it failed on
a Mac. HostVitals now reads /proc through one small method that the
test stubs with fixed contents, checking the exact CPU and memory
percentages instead of only their types. Disk and database size still
come from the real host. The real /proc read still runs where /proc
exists (Linux CI). A new test pins that an unreadable reading is nil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under a C/POSIX locale (a shell without LANG, as on some Macs) Ruby
returns ENV values as binary, so a label such as "SER8 · Incus" did
not equal the UTF-8 string and the platform overview test failed. The
label is now read as UTF-8, and a value that is not valid UTF-8 shows
as "Not configured" instead of raising.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PosPaymentReconciliationJob takes one machine-wide flock and skips its
sweep when the lock is held. Parallel test workers shared that file, so
when two PosCardPaymentTest cases ran the job at the same moment one
silently did nothing. That intermittently failed the overlap test
(line 72) and the rotation test (line 56) on main and on several PRs.

The lock path is now one small method, and the tests point it at a
temporary file per test. Holding the real lock from another process
reproduces both failures on the old code, and they pass on the new.
Production still uses tmp/locks/pos-payment-reconciliation.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore techmore changed the title Fix red security scan on main; make host-health and platform tests portable Fix red security scan on main, a flaky card-reconciliation test, and macOS test portability Nov 3, 2026
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore
techmore merged commit edab701 into main Nov 3, 2026
4 checks passed
@techmore
techmore deleted the claude/ci-fixes-main branch November 3, 2026 00:48
techmore added a commit that referenced this pull request Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant