Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How GitHub Prevented Code Review Bottlenecks
Transcript
- Lucas: The hardest metric to optimize in software engineering is probably the time between when a developer finishes writing code and when it actually ships. We talk a lot about deployment frequency, but the hidden drag is almost always the code review process itself. If you look at GitHub's internal data over the last few years, they found that their average pull request sat idle for nearly twelve hours waiting for a reviewer. That is not a technical debt issue; that is a capacity and trust issue. Luna: Twelve hours feels like an eternity in the context of agile development cycles. I remember reading that their senior engineers were spending more than thirty percent of their week just reviewing other people's code instead of building new features. It creates this artificial scarcity of expertise. Lucas: Exactly. And what is fascinating is that they didn't solve it by hiring more reviewers or mandating stricter SLAs on response times. Those approaches usually just burn out your best people faster. Instead, they completely redesigned the feedback loop to be asynchronous and heavily gated by automation. The core insight was that most review comments are actually style violations or basic logic errors that should never have reached a human being in the first place. Luna: So they moved the heavy lifting to the machine layer? How much of the rejection rate did they push down to automated tools? Lucas: They pushed about eighty percent of what used to be manual review noise into pre-commit hooks and CI pipelines. Before a pull request even opens, it runs through a suite of checks that enforce formatting, security scanning, and dependency verification. If those fail, the PR is rejected instantly with no human involvement. This means that when a senior engineer does open a pull request, they are only seeing changes that have already passed basic hygiene checks. It forces contributors to care about the toolchain, which shifts the burden away from the reviewer. Luna: That makes sense, but doesn't that create friction for junior developers who might not know all the linting rules yet? You don't want to discourage new hires by making them fight the linter for three days straight. Lucas: It does create initial friction, but GitHub treated it as a training mechanism rather than a barrier. They integrated the error messages directly into the IDE so developers get real-time feedback before they even hit save. The idea is that you learn the rules as you write code, not after you submit it. But here is where it gets interesting for leadership. They realized that even with perfect automation, you still need humans for architectural decisions. So they split reviews into two distinct categories: mechanical reviews and logical reviews. Luna: Mechanical versus logical. I like that distinction. How do they decide which one applies to a given change? Lucas: They use metadata tags on the pull request. If you are changing a configuration file or updating a documentation page, it triggers a mechanical review path, which can often be auto-approved if the automated checks pass. If you are touching core database schemas or authentication flows, it triggers a logical review path, which requires explicit sign-off from a designated architect or senior lead. This prevents a senior engineer from having to micro-manage a trivial CSS update. Luna: That sounds like it requires really clear tagging discipline from the team. If someone mislabels a critical change as mechanical, you could ship something dangerous very quickly. Lucas: Which brings us to the second half of their strategy. They introduced architecture contracts. These are essentially standardized interfaces and behavioral guarantees that every service must adhere to. Think of it like a legal contract between teams. If Service A promises to accept data in a specific format and Service B agrees to send it that way, the integration becomes predictable. When you have these contracts in place, you don't need to review every line of code to ensure the systems will talk to each other correctly. Luna: So the contract acts as a safety net that reduces the cognitive load on the reviewer? They can trust the interface because the contract enforces it. Lucas: Precisely. The reviewer focuses on whether the implementation violates the spirit of the contract or introduces unexpected side effects, rather than checking basic connectivity. But there is a cultural cost to this approach. You have to train engineers to think in terms of boundaries and APIs rather than just monolithic functions. It requires a level of abstraction that many developers resist initially. Luna: I can imagine that resistance. Developers often prefer tight coupling because it feels easier to debug locally. Pulling back to design contracts feels like extra overhead until things break at scale. Lucas: Right, and GitHub had to invest heavily in internal education to make this stick. They started holding monthly architecture review sessions where teams presented their new contracts to the wider organization. It wasn't about policing; it was about sharing patterns. Over time, teams began to reuse existing contracts instead of inventing new ones, which further reduced the surface area for review. Fewer unique patterns mean fewer edge cases for reviewers to worry about. Luna: Reuse definitely simplifies the review landscape. But let's talk about the timeline. Did this change happen overnight or was it a gradual rollout? Lucas: It took about eighteen months to reach maturity. They started by piloting the automated gating on non-critical internal tools. Once they proved that the false positive rate was low, they expanded to customer-facing services. The key was transparency. They published weekly metrics on review latency and approval rates for everyone to see. When teams saw that their latency dropped from twelve hours to four hours, adoption became voluntary rather than mandated. Luna: Public metrics are a powerful motivator. It turns a process improvement into a competitive game within the engineering org. Do they track anything else besides latency? Lucas: They track rework rate, which is the percentage of pull requests that require significant changes after the initial review. A high rework rate indicates that the requirements weren't clear upfront or that the automated gates aren't catching the right issues. By combining latency with rework rate, they get a true picture of efficiency. Low latency with high rework is just fast failure. They aim for low latency with low rework, which signals that the team got it right the first time. Luna: That is a much healthier metric than just speed. Speed alone can incentivize sloppy code. Balancing it with quality metrics keeps the system honest. Lucas: Absolutely. And one final piece of their puzzle is the concept of batched reviews. Instead of asking for immediate attention, they encourage teams to schedule review blocks. Senior engineers might block out two hours on Tuesday afternoon specifically for reviewing pull requests. During that window, they focus solely on code. Outside that window, notifications are muted. This protects deep work time and ensures that reviews are done with full attention rather than fragmented throughout the day. Luna: Batching seems intuitive in hindsight, but most companies struggle with it because of the fear of missing out on urgent bugs. How do they handle emergencies? Lucas: They have a clear escalation protocol. If a production issue requires an immediate fix, it bypasses the standard batching rule and triggers a direct alert to an on-call reviewer. But crucially, these exceptions are rare. By normalizing the batched approach, the signal to noise ratio for emergency alerts improves significantly. People stop ignoring the alerts because they know that when one comes through, it actually matters. Luna: So the rarity of the exception reinforces the value of the exception. It is a classic signal processing problem applied to human attention. Lucas: Exactly. It reminds me of how we talk about network traffic shaping. You prioritize the critical packets and let the background traffic flow in bursts. Applying that same logic to human cognition is surprisingly effective. Of course, none of this works if the underlying code quality is terrible. The infrastructure only amplifies the behavior of the team. Luna: True. If you automate a chaotic process, you just get chaotic results faster. The cultural shift toward ownership and clear contracts is really the foundation here. Lucas: It is. And for any CTO listening to this, the takeaway isn't necessarily to copy GitHub's exact workflow. It is to audit your own review bottlenecks. Are you reviewing style issues that a linter could catch? Are your architects bogged down by trivial changes? Identify where the human brain is being wasted on mechanical tasks, and automate that first. Luna: And then redesign the remaining human interactions to be purely about judgment and context. It turns out that respecting our attention span is the best way to improve software delivery. Lucas: Well said. If these conversations are useful for what you're building or running, consider supporting the show. A couple of dollars a month is genuinely what keeps these going — buy me a coffee dot com slash fexingo, if you've gotten something out of them. It helps us keep producing independent analysis without corporate influence. Luna: We appreciate every bit of support that lets us dig deeper into these operational details. Thanks for helping us keep the lights on. Lucas: Looking ahead, I wonder if we will see more companies adopting this async-first model as remote work becomes permanent. It might fundamentally change how we define team proximity. Luna: It certainly challenges the old notion that you need to be in the same room to collaborate effectively. Maybe proximity is just a metaphor for communication latency now. Lucas: That is a provocative way to put it. Let's see if the data supports that theory over the next quarter.