CI Gates, Test Result Caches, and the Code Graph That Might Tell Us What to Test
What I learned from splitting Rails CI by risk, caching exact test results, and exploring whether AI and code graphs can make test selection safer.
What I learned from splitting Rails CI by risk, caching exact test results, and exploring whether AI and code graphs can make test selection safer.
Why a Rails test suite can fail on Ubuntu because of an older native libvips, and how to upgrade it safely without confusing it with the ruby-vips gem.
How a moving set of Rails CI flakes exposed shared download state, Selenium stale-node retries, and specs asserting before the browser settled.
A practical look at Alibaba OpenCodeReview, why diff-only AI review is not enough, and how to use AI reviewers without trusting them too much.
A Rails CI debugging story: following the evidence to shared test state, instead of weakening assertions to make failures disappear.
Migrating Rails UJS to Turbo can silently break submit buttons and resets in production, because Turbo's event timing and Promise handling differ from UJS.
Small probe tasks for testing local AI agents: function calling, skill awareness, prompt-length pressure, cache behavior, and layer-by-layer debugging.
A flaky RSpec suite traced to a Rake task that commits data outside the per-test transaction, and how DatabaseCleaner's truncation strategy fixes it.
Using application services to build test data couples your specs to that business logic, making test suites slow and fragile; Factory Bot traits fix it.
How to wire up VS Code for Ruby debugging with the Shopify Liquid LSP, the rdbg debugger from Ruby's debug gem, and launch configs for RSpec, Minitest, and Cucumber.
Active Storage's variant API gets rough past the basic thumbnail case: multiple sizes, per-attachment metadata, and tests that break on file-not-found errors.
A practical breakdown of when to mock external dependencies in Rails tests versus using the real thing, built around the test pyramid, VCR, WebMock, and Pact.
Rails keeps users logged in by encrypting the whole session into a browser cookie, then lets Warden authenticate each request, which changes how you should test it.
How to tell whether a slow endpoint is I/O bound or CPU bound, using system monitors, timing, and cProfile, and why the fix differs for each.
Catch-all exception handlers hide the real bug. Debuggers that pause on every thrown exception, caught or not, find it faster than logging ever will.
How British Summer Time breaks Ruby tests, cron schedules, and cloud functions that assume UTC, and how to write timezone-aware specs instead.
The code review anti-patterns that slow teams down most: giant PRs, style-war comments, and reviews that skip the business context entirely.
A Rails test suite hung intermittently until transactional tests, ActiveJob, and ActiveStorage turned out to be racing over the same locked rows.
Runtime method overrides work very differently in PHP and Ruby: one has no rollback mechanism, the other builds aliasing and scoping in from the start.
Two concurrent requests can both pass an exists? check and race to insert the same row; here is why, and how to write idempotent Rails controllers.
Two services sharing a database can pass every test and still fail in production if their DB configuration silently drifts apart.
A framework for deciding how much to test: the testing pyramid, layered test responsibility by architecture tier, and what makes test data good.
How to debug Unicode font rendering in Ruby's Prawn PDF library and work around PDF::Inspector's limits when testing non-ASCII characters like it.
What changes when you upgrade React 17 to 18: the new root API, automatic batching, Strict Mode's double-invoked effects, and test setup fixes.
A practical walkthrough of upgrading a React 16 app to React 17, covering dependency updates, Jest and Enzyme test fixes, and new ESLint warnings.
Four breaking changes we hit upgrading to Rails 7.2: show_exceptions, array-containment SQL, connection pool locking, and assert_enqueued_email_with.
What Rails actually loads when you run a rake task, the console, the server, or tests, and how to load rake tasks in each environment when you need them.