#162 💰 Pay down tech debt, batch your jobs, gate your AI's SQL access

Happy Wednesday!

Here is issue #162 of our newsletter, bringing you news and the best tools for your current or future Rails projects…

1. 🌱 Afraid to touch your legacy Rails app? Francois breaks down the strangler fig pattern: migrating one capability at a time while the old and new systems run side by side, then decommissioning each legacy code path only once its replacement is validated. A working Rails example shows the approach end-to-end, from routing a notification through an event to cutting over behind a feature flag.

2. 💸 Your APM bill didn't grow because the tool changed. Sara maps where APM spend actually piles up, and how it quietly outgrows what you signed up for, from log ingestion billed by volume to custom metrics and high-cardinality tags that creep in unnoticed. Her six-step checklist helps you audit usage, spot the inflators, and assign an owner before your next renewal.

3. 🧪 Does a green test suite mean your app actually works? Juan had 187 passing tests, clean Rubocop, and zero Brakeman warnings, then added system tests and immediately found six bugs living in the seams between correctly-working pieces of code, like a UI component silently swallowing a block of flash messages. He walks through why unit tests structurally can't see this class of bug, and the rule he landed on afterward: test at the lowest level that can actually catch the bug, not just the level where you found it.

4. 🤖 The agent loop used to be sealed inside ask, but in RubyLLM 2.0, it's exposed as plain Ruby. Carmine Paolino walks through how the loop breaks into composable verbs you drive yourself: ask_later, generate, run_tools, and step, each reading persisted messages so a turn can run as its own background job with granular retries. The loop is resumable mid-tool-round, and chat.cancel! stops a run from another thread through the database, no Redis or pub/sub required.

5. 📦 Turn a pile of background jobs into a single trackable batch. JP Camara breaks down SolidQueue 1.7's new batch API: on_finish, on_success, and on_failure callbacks, shared metadata, and nested batches for multi-step pipelines. He puts it to work in a RubyLLM chat that delegates tasks to sub-agents and resumes once each has reported back.

6. 🤖 He left the architecture out of the prompt, on purpose. Rob tested Rails Baseline by handing fresh Claude and Codex sessions a packaged ZIP and product requirements that never mentioned Pundit, Entitlements, or Solid Queue, to see if the agents would discover the existing patterns on their own. They mostly did: one test's missing decision on CSV storage became a documentation recipe a later agent actually used, and the other surfaced real SSRF handling for user-supplied URLs. Even so, the agent still wrote an ordinary Rails routing bug that slipped past its own test suite, which is exactly the kind of friction Rob wanted this dogfooding to catch.

7. 🔒 Read-only protects your data from being changed. It doesn't decide who can see it. Evil Martians' Igor Platonov, Anton Senkovskiy, and Travis Turner found their internal Rails assistant's read-only SQL access still leaked peer-review scores and reviewer names, then walked through how they moved the boundary into Action Policy with a custom ocean_access declaration that scopes visible rows and allowlists columns per model. Fourteen deterministic "evil test" evals, covering privacy, reviews, analytics, and tool choice, verify the boundary independently of the model's behavior.

Upcoming Events & Learning

  • 📅 When it comes to AI, every small business owner asks "Is it safe?" Join the OmbuLabs.ai Team for a free 45-minute webinar on rolling out Claude in your business the right way, no technical background required. Learn what Claude actually does with your data, how to set ground rules your team will actually follow, and the first three steps to roll it out this month. September 9th, 11 am ET.
  • âš¡ Got 5 minutes and something worth showing off? Philly.rb's Lightning Talks night at Indy Hall is September 15th, 5:30–8:00 pm. Space is limited, so submit a talk if you've got one, and RSVP now.

Check out our other articles on: ​​​​Ruby | Rails | Compatibility | ​​Upgrades​​​​ | ​​​​Tech Debt​​​ | AI​

Bookmark, share, or save them for later. We hope these links are helpful. 😉

Best,

The ​​​​​​FastRuby.io​​​​​​ Team

Do you know anyone who would love to receive this newsletter? Tell them to subscribe👇 and catch the latest issue right in their inbox.

Don't wait to bring your Rails application up to date.

We will get on a quick call and recommend a couple of options to start upgrading your Rails app.