AI NewsProductivityReported

Agoda cut code review time 64 percent with a modular monolith

Agoda rebuilt its post-booking API around domain components and ArchUnit tests. The team says code reviews on framework-backed changes finished in 1.08 hours instead of 3.02.

AI News

Editorial2 min read

LinkedInX
InfoQ header image for the Agoda modular monolith framework article

Image: InfoQ

Why it mattersReview time is the slowest step on many teams that release AI-written code. Agoda shows a way to cut it without rewriting the service.

Review time is the slowest step on many teams that release AI-written code. Agoda has measured what one fix is worth. The service is real. The window is three months of pull requests.

Agoda's post-booking API team published its results on 23 November on the Agoda Engineering blog. InfoQ wrote them up the same day. Median code review time on framework-backed changes was 1.08 hours. Legacy code in the same service took 3.02 hours. Time to first substantive feedback was 10.34 hours against 15.77. Framework-backed changes also used 29 percent fewer AI prompts per 100 changed lines, a figure Agoda labels as directional.

What the team built

The service is BAPI, the post-booking API that handles cancellations, rebooking, refunds and customer messages. Agoda carved it out of the core monolith in 2019 through a line-by-line extraction. Merge requests more than quadrupled between 2022 and 2025. Some files grew past 4,000 lines. The team compares its approach to Spring Modulith, which checks module boundaries in Spring Boot.

The team did not rewrite BAPI. It wrapped it in a framework called Platform. Code is organised by business domain, one package per component. A Data Mapper pattern isolates repository-specific models so they cannot leak into other domains. Typed builders enforce the shapes a component may hand to its callers.

Where the test suite does the reviewer's work

ArchUnit writes the architecture rules as tests. A rule says a repository-specific model may only be touched by its own repository. A violation fails the build on every pull request, before a human looks at it.

Agoda's own words, quoted by InfoQ: the ArchUnit suite catches "structural drift on every pull request before a human reviewer ever sees it."

The method is spelt out. Agoda compared framework-backed and legacy merge requests on BAPI in Q2 2026. The AI-prompt figure covers June to August. Median prompts per merge request were close in both groups (20 against 22). The saving came from fewer prompts on big changes.

The time now sits in review. A team that releases AI-written pull requests can see where. The writing step is already fast. The review step still takes most of a working morning. Most of it is a reviewer asking if this is the right place for the code. A rule that a build can check answers the question before anyone opens the diff. The reviewer then only reads what the test could not catch.

Source

Agoda Engineering, How We Cut the Coupling Tax in a Post-Booking API. Reported by Leela Kumili for InfoQ.

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project