One Repository to Rule Them All: How Monorepo Consolidation Can Quietly Stall Engineering Growth
Photo: Sylvain Kalache from San Francisco, USA, CC BY 2.0, via Wikimedia Commons
For a certain generation of engineering organizations, the monorepo became something close to a religious conviction. Google did it. Meta did it. Microsoft eventually came around. If the largest technology companies on earth could manage hundreds of millions of lines of code inside a single repository, surely the practice would translate cleanly to a hundred-person product team in Austin or a growing fintech shop in Chicago.
That assumption deserves scrutiny.
The operational realities that make monorepos viable at hyperscaler scale — custom-built distributed build systems, dedicated developer infrastructure teams, and years of internal tooling investment — rarely accompany the architectural decision when smaller organizations adopt the pattern. What gets imported instead is the structure without the scaffolding, and the consequences compound quietly over months before leadership recognizes them as systemic.
The Promise That Gets Cited in Every Proposal
The case for consolidation is not without merit. When multiple services and shared libraries live in separate repositories, dependency drift becomes a genuine maintenance burden. Teams ship incompatible interface changes. Shared component versioning turns into a coordination problem that consumes sprint capacity. Integration testing across repository boundaries requires external orchestration that breaks in unpredictable ways.
A monorepo collapses those boundaries. Changes to shared code and the services that consume it can be committed atomically. Dependency versions are consistent by definition. Code review spans the full surface area of a change rather than fragmenting across pull requests in separate repositories.
These are real benefits. The problem is that the organizations promoting consolidation tend to measure the costs they are escaping while leaving the costs they are acquiring unmeasured.
What Happens to CI/CD When the Repository Grows
The first place the liability appears is in build and test pipeline performance. In a well-structured polyrepo environment, a commit to Service A triggers only the tests and build jobs relevant to Service A. The feedback loop stays tight. Engineers merge with confidence and move forward.
In a monorepo without sophisticated change detection tooling, a commit to a shared utility library can trigger full builds across every service that imports it — which, by the nature of shared libraries, may be most of the codebase. Organizations that invest early in affected-path analysis and incremental build caching can contain this problem. Organizations that adopt monorepo structure first and build the supporting infrastructure later find that their CI pipelines expand in duration proportionally to codebase growth, until a routine pull request requires a forty-minute wait before a green signal arrives.
That delay is not neutral. It disrupts flow state, discourages small incremental commits, and subtly incentivizes engineers to batch larger changes together — which increases review complexity and reintroduces the integration risk the monorepo was meant to eliminate.
Ownership Erosion and the Responsibility Diffusion Problem
Repository structure encodes accountability. When a team owns a repository, the boundary is unambiguous. They control merge permissions, they set quality standards, and they bear the operational consequences of what ships from that codebase. That clarity has organizational value that rarely appears on the whiteboard when consolidation is proposed.
Monorepos complicate that clarity. Code ownership tooling — GitHub's CODEOWNERS files being the most common example in US engineering organizations — can enforce review requirements at the directory level, but it cannot fully replicate the cognitive and cultural weight of repository ownership. Engineers from Team B learn quickly that their unrelated change to a shared configuration file has been blocked by a failing test in Team A's service, written by engineers they have never met, covering functionality they do not understand.
The resulting dynamic is friction by proximity. Teams that previously operated with relative autonomy find themselves entangled in each other's release cycles. A production incident in one domain delays deployments across unrelated domains. The monorepo promised unified velocity; what it delivered was unified risk.
The Tooling Debt That Arrives Uninvited
Hyperscalers built custom distributed build systems specifically because standard tooling does not scale to monorepo sizes. Bazel, Pants, Nx, and Turborepo each represent serious investments in build infrastructure — investments that require dedicated engineering time to configure, maintain, and evolve as the codebase grows.
Organizations that adopt a monorepo expecting their existing CI configuration to accommodate the transition typically discover the gap within six to twelve months. By that point, the consolidation is complete, the polyrepo history has been archived, and the path back is expensive enough that leadership resists it. The organization is then committed to building the tooling infrastructure that should have preceded the architectural decision, under production pressure, while the pipeline continues to slow.
Recognizing the Inflection Point
None of this is an argument against monorepos as a pattern. It is an argument for organizational honesty about when the pattern fits and when it does not.
The inflection point where consolidation becomes a liability tends to share a recognizable profile. CI pipeline duration has grown beyond fifteen minutes for routine changes and continues to climb. Engineers have begun complaining that unrelated test failures are blocking their work. Ownership disputes over shared directories are consuming engineering management time. The team responsible for developer infrastructure is perpetually backlogged on build tooling improvements.
When those signals appear together, the question worth asking is not how to optimize the monorepo further, but whether the organizational structure and the repository structure are still aligned. In many cases, a deliberate split — extracting high-churn services into independent repositories while preserving a monorepo for genuinely shared foundational code — recovers the autonomy that consolidation eroded without abandoning the benefits that motivated it.
Building the Structure That Serves the Team
Repository architecture is infrastructure, and like all infrastructure decisions, it should be evaluated against the organization's current scale and trajectory rather than the practices of companies operating at a fundamentally different order of magnitude.
The engineering teams that navigate this well tend to share a common discipline: they instrument the costs of their current structure before making the case for change. Pipeline duration trends, blocked deployment frequency, and cross-team dependency incidents are measurable. Making those measurements visible to leadership transforms the conversation from one about architectural philosophy to one about operational economics — which is where decisions of this kind belong.
A monorepo is a tool. Like any tool, its value is conditional on the context in which it is applied. The organizations that treat it as a destination rather than a decision tend to discover the difference at the worst possible time.