Modern Treasury spent years squeezing every drop of performance from their cloud CI pipeline. Better caching, faster machines, DAG reordering—they got feedback times down to 5–7 minutes. Still felt too slow. The problem wasn't raw speed; it was latency between writing code and getting actionable results. Their solution? Run CI locally on developer hardware, where an M4 MacBook Pro with 14 cores and 48GB of RAM could execute nearly their entire test suite faster than cloud infrastructure could coordinate a single job.

Why Cloud CI Still Feels Sluggish

Cloud CI carries structural overhead that no amount of optimization eliminates. Each pull request triggers provisioning cycles, inter-step coordination delays, resource contention from competing builds, and result propagation through multiple services before feedback reaches the developer. In practice, engineers would start a cloud run and context-switch to another task rather than wait—which meant bugs sat unfixed for longer than they should. When LLMs entered the workflow as coding assistants, this latency became a bottleneck that directly throttled iteration speed. The local environment advantage is stark: no network round-trips to GitHub, no waiting for CI provider webhooks, no coordinating distributed workers. Everything runs on hardware that's already warm and available. Modern Treasury found that passing local CI almost always predicted cloud CI success, while the feedback arrived in seconds rather than minutes.

Standardizing the Local Development Environment

Making local CI viable required consistent environments across every developer's machine. The team adopted Ruby on Rails' bin/setup pattern—idempotent scripts that provision a complete development environment with a single command. They progressively added cloud-only checks as local dependencies, leveraging existing tools like Gemfile, package.json, and Brewfile alongside project-specific Docker images. This standardization served double duty: it eliminated the usual onboarding headaches while establishing the prerequisite infrastructure for reliable local CI runs. Developers simply ran bin/setup occasionally to sync their environment with everything needed for both development and testing.

Choosing a Local CI Runner

Modern Treasury evaluated several approaches before settling on Rails 8.1's new bin/ci command—a purpose-built DSL that covered their reporting needs out of the box. Shell scripts were too brittle for complex pipelines, Rake lacked good summary reporting, and Taskfile would have introduced unwanted dependencies. The native Rails solution offered minimal setup, ran any arbitrary command, and displayed failures clearly. For their monolith's massive test suite, they extended the DSL with grouping support and a --group flag, allowing developers to run CI subsets relevant to their current change rather than waiting hours for a full pipeline. This dramatically reduced iteration time while preserving comprehensive cloud runs as a safety net.

LLMs Thrive on Instant Feedback

Perhaps the biggest winner in this shift was AI-assisted development. Modern Treasury already used their RSpec and Jest test suites as LLM harness loops, but code that passed local checks would still fail cloud CI due to missing autogenerated types, missed linter rules, or failed license checks. With local CI expanded to cover nearly every failure mode, LLMs could iterate until an entire build passed—guaranteeing working, compliant code rather than just syntactically correct output. The integration was straightforward: agents run a script, parse the output, and iterate on results. No complex MCP configurations or permission juggling required.

Key Takeaways

  • Cloud CI optimization hits diminishing returns; local hardware is underutilized by comparison
  • bin/setup patterns unify environments and enable reliable local testing
  • Rails 8.1's bin/ci DSL provides a lightweight, zero-dependency runner for teams already on Rails
  • Group-based filtering lets large projects run relevant subsets without full pipeline waits
  • Local CI supercharges LLM agent productivity by collapsing feedback latency to near-zero