The Toast Code Review Round
- Know how the Toast code review interview runs, from the files you get to what gets scored
- Review a multi-file order API and rank its bugs by impact
- Review a menu import service that reads any file or URL a caller names
- Handle the senior and staff follow-ups on caching, data models and API security
Toast tells you about this round in advance. Its Technical Interview Preparation page lists "collaboration on code reviews" as one of the exercise types, next to writing code and designing a greenfield system. Candidates mention it more often than any other Toast round, in loops from 2021 through 2026.
The shape has held steady. You get a small service that someone else wrote, with bugs planted in it, and an hour to find them, explain them and decide what to fix first. The code is usually Java. The newest version, from September 2026, was a multi-file HTTP API, and the candidate called it "An extremely painful hour." Both practice reviews below are original code built in the shape candidates describe.
How the Toast code review interview runs
The round sits inside the virtual onsite, next to coding, system design and a hiring manager conversation. In the Q4 2025 senior loop it was the third of five rounds. In the September 2026 loop it was one of four. Toast rounds often have two interviewers, one of them shadowing, so don't be surprised by two faces on the call.
You open with several files that belong to one service. Think of a resource class with the endpoints, a request or entity class, a service or data access class and maybe a test. A question-bank listing of the September 2026 review spelled out the bar. Explain each defect by its impact, fix it the same way across every file it touches, and finish a prioritized review within the hour.
Expect Java even if you code in Python. A Blind commenter who appeared to work at Toast described the round in 2022 as "coding best practices, structure, shippable code quality" and added "Java usually." The Q4 2025 code was a Dropwizard and Hibernate service, so annotations like @GET, @Path and @QueryParam should look familiar before you join.
A prioritized review is part of the stated bar, so the order you put things in matters as much as what you find. Twelve issues read out in file order land worse than six with the two that would page someone at 2 a.m. called out first.
Reviewing a multi-file order API (2026)
The September 2026 review was a multi-file HTTP API with three kinds of planted bug. A GET endpoint that should have been a POST, a problem with the request payload, and missing input validation. The practice service below has the same kinds of bug in a restaurant order API. It is not the code Toast showed.
// ---- OrderResource.java ----@Path("/orders")@Produces(MediaType.APPLICATION_JSON)public class OrderResource { private final OrderService orderService; public OrderResource(OrderService orderService) { this.orderService = orderService; } @GET @Path("/{orderId}/items/add") public Order addItem(@PathParam("orderId") String orderId, @QueryParam("itemId") String itemId, @QueryParam("quantity") int quantity, @QueryParam("price") long price) { return orderService.addItem(orderId, new LineItem(itemId, quantity, price)); } @GET @Path("/{orderId}") public Order getOrder(@PathParam("orderId") String orderId) { return orderService.find(orderId); }}// ---- LineItem.java ----public class LineItem { public String itemId; public int quantity; public long price; // in cents, as sent by the client public LineItem(String itemId, int quantity, long price) { this.itemId = itemId; this.quantity = quantity; this.price = price; }}// ---- OrderService.java ----public class OrderService { private final Map<String, Order> orders = new HashMap<>(); public Order addItem(String orderId, LineItem item) { Order order = orders.get(orderId); order.items.add(item); order.total += item.price * item.quantity; return order; } public Order find(String orderId) { return orders.get(orderId); }}Read the three files as one request path before you comment on any of them. A call comes into the resource, builds a line item and lands in the service. The findings, most serious first:
- The client sets the price.
pricearrives as a query parameter and goes straight into the total. Anyone can order a burger for one cent. The server must look the price up from the menu. - A GET changes data. Adding an item is a write, so it belongs on
POST /orders/{orderId}/itemswith a JSON body. Browsers prefetch GETs, proxies retry them and logs keep their full URLs. - Nothing is validated. A quantity of -5 subtracts from the total. A missing quantity silently becomes 0. An unknown item id is accepted, and an unknown order id throws a NullPointerException that surfaces as a 500.
- Missing orders return no error.
findhands back null, which the framework turns into 204 No Content. The caller should get a 404. - The map isn't safe across threads. The resource is a singleton, so two requests can update the same
HashMapand the sametotalat once and lose an item. - The total can drift. It is stored next to the items and updated by hand. Compute it from the items, or update both inside one lock or transaction.
If time is short, fix the first three and name the rest. The fixed resource takes a body, checks it and leaves pricing to the service:
@POST@Path("/{orderId}/items")@Consumes(MediaType.APPLICATION_JSON)public Response addItem(@PathParam("orderId") String orderId, @Valid AddItemRequest request) { Order order = orderService.find(orderId) .orElseThrow(() -> new NotFoundException("no order " + orderId)); Order updated = orderService.addItem(order, request.itemId, request.quantity); // price from the menu return Response.status(Response.Status.CREATED).entity(updated).build();}public class AddItemRequest { @NotBlank public String itemId; @Min(1) @Max(99) public int quantity; // no price field at all}Writing the corrected handler yourself is the fastest way to check you caught everything. The problem below asks for that handler in miniature.
Order Items Endpoint With Validation
Problem
OrderApi class. The constructor takes menu, a dict from item id to its price in cents. handle(method, path, body) serves one request and returns its status code. body is a dict or null.POST /orders creates an empty order and returns 201. Order ids are the strings "1", "2" and so on, in creation order. GET /orders/{id} returns 200 when the order exists. POST /orders/{id}/items adds a line and returns 201.An item body needs
item_id, a string that is on the menu, and quantity, an integer from 1 to 99. Otherwise return 400. The line is priced from the menu, and any price in the body is ignored.Check in this order. A path that isn't one of the three routes is 404. A known route with any other method is 405. An unknown order id is 404, before the body is looked at.
total(order_id) returns the order's total in cents, or -1 for an unknown order.- OrderApi({"burger": 1400, "fries": 500})
- handle("POST", "/orders", null)→ 201
- handle("POST", "/orders/1/items", {"item_id": "burger", "quantity": 1, "price": 1})→ 201
- total("1")→ 1400
The body tries to set a one-cent price. The server ignores it and charges the menu price.
Split the path on "/" and match the three routes by length. Inside each route, check the method, then the order id, then the body. Look the price up from the menu at the moment the line is added.
Order Items Endpoint With Validation
Click "Run" to execute your code
Reviewing a menu service that reads any file or URL (2025)
A senior candidate with six years of experience posted the whole code review from a Q4 2025 loop. It was a Dropwizard and Hibernate service for menu data, with a resource class, an entity, a data access class and a test. Its stated purpose was to gather restaurant menus "by any means necessary," and it loaded menus from whatever file path or URL a caller passed in.
The planted issues went past that. GET endpoints wrote data, HTML was built by gluing strings together, exceptions were caught and turned into null, a success flag was always true and the test reached out to the network. The practice service below is new code with the same kinds of problem.
// ---- MenuImportResource.java ----@Path("/menus")public class MenuImportResource { private final MenuDao menuDao; public MenuImportResource(MenuDao menuDao) { this.menuDao = menuDao; } @GET @Path("/import") @Produces(MediaType.APPLICATION_JSON) public ImportResult importMenu(@QueryParam("source") String source) { ImportResult result = new ImportResult(); result.success = true; String raw = MenuFetcher.read(source); Menu menu = MenuParser.parse(raw); menuDao.save(menu); result.menuId = menu.getId(); return result; } @GET @Path("/{menuId}/preview") @Produces(MediaType.TEXT_HTML) public String preview(@PathParam("menuId") long menuId) { Menu menu = menuDao.find(menuId); return "<h1>" + menu.getName() + "</h1>"; }}// ---- MenuFetcher.java ----public class MenuFetcher { public static String read(String source) { try { InputStream in = source.startsWith("http") ? new URL(source).openStream() : new FileInputStream(source); return new String(in.readAllBytes(), StandardCharsets.UTF_8); } catch (Exception ex) { return null; } }}// ---- MenuFetcherTest.java ----public class MenuFetcherTest { @Test public void readsMenu() { assertNotNull(MenuFetcher.read("https://menus.example.com/dinner.json")); }}Ranked by what a bad actor or a bad day could do:
- Any caller can read any file or URL.
source=/etc/passwdreads a server file, and a URL like the cloud metadata address at 169.254.169.254 can hand out credentials. Accept only https URLs on an allowlist of hosts, or take the menu as an upload. - A GET imports and saves. A link preview, a crawler or an image tag on another site can trigger an import. Make it a POST, and require a signed-in user allowed to change that restaurant's menus.
- Errors vanish.
readswallows every exception and returns null, soparsefails later with no cause in the logs. The success flag is set before any work and never cleared, so callers can't trust it either. - The preview is an injection hole. The menu name comes from an outside source and goes into HTML unescaped, so a name with a script tag runs in the viewer's browser. A missing menu throws instead of returning 404.
- The fetch can hang and leak. No connect or read timeout, no size limit, and the stream is never closed. Use try-with-resources and cap both time and bytes.
- The test needs the internet. It passes or fails with someone else's server and covers no failure path. Inject the fetcher and test the rejected sources and the error cases.
The first finding has the cheapest strong fix. Before anything is opened, check the source against a short list of hosts you trust, and refuse local paths outright. You'll write that check in the problem below.
What senior, staff and principal reviews push on
At Staff level the review leans into design. An April 2026 Staff candidate in India described a code design and review round on a restaurant codebase. Their write-up says the discussion covered caching to speed up the API, denormalizing the data model where it helped, targeted code improvements and API security. They did not get an offer, so treat it as a description of the round and not a pass recipe.
Have a view ready on each topic. For caching, say what you'd cache, for how long and what clears it. Menus are read far more than they're written, so a read-through cache cleared on every menu save is a good default. For denormalization, a read API for menus can serve a stored document per menu, while the normalized tables stay the source of truth. For security, cover who may call each endpoint, what a caller may change and how you'd rate limit imports.
A Principal candidate who posted in July 2025 had a peer code review of a REST controller that the interviewer brought along. The write-up gives no more detail than that. A senior candidate in Bengaluru also listed a code review among the April 2026 questions. Expect the same exercise at every level, with the follow-ups getting more architectural as the level rises.
What lands with senior reviewers
- Tie each finding to a failure a restaurant would notice
- Propose the fix that changes the fewest files first
- Say which findings block a merge and which can wait
- Name the test you would add for each bug
What costs candidates
- Reading the files top to bottom and commenting line by line
- Opening with naming and formatting
- Rewriting the whole service before ranking anything
- Calling something insecure without the request that exploits it
Older reviews (2021 and 2022)
In June 2022 an SDE II full-stack candidate had a code review in place of system design, and it became a refactoring exercise. They wrote that it "wasn't about making it efficient or best code practices but about refactoring based on OOPs." That candidate didn't get an offer and had never done a review round before. If your review drifts the same way, move repeated logic into classes with clear jobs and explain each move.
The oldest account comes from a 2021 interview, recalled in a 2022 thread, where a candidate did "a mock pr review and some coding." The 2022 Blind summary of what the round looks for, best practices, structure and shippable quality, still fits the 2025 and 2026 versions well.
How to spend the hour
Spend the first ten minutes reading without commenting. Find the entry points, usually the resource class, and trace one request from the annotation to the database and back. Ask what the service is for if the code doesn't say. You can't rank a bug by impact until you know who calls the endpoint and what they expect back.
Then sweep in order of damage. Security first: input that reaches a file system, a URL, a query or HTML, and endpoints anyone can call. Then wrong results, like prices, totals and lost writes under concurrency. After that, the API contract: methods, status codes and what happens to a missing record. Error handling and logging come next, then tests, with structure and naming last.
Say each finding in the same three parts. Name the line, give the request that breaks it, and give the fix. "This GET saves a menu, so a link preview can import one. Make it a POST behind auth." Keep a running ranked list on screen or paper, and in the last ten minutes walk the interviewers through the top three with fixes.
Common questions
What is the Toast code review interview?
An hour with an existing service, usually Java and several files long, with bugs planted in it. You find them, explain the impact of each, decide what to fix first and talk through the fixes. It is one of the onsite rounds, next to coding, system design and the hiring manager.
What language is the Toast code review in?
Java in every account that names one, including the Q4 2025 Dropwizard and Hibernate service. You can still pick JavaScript, Java, Python or Kotlin for the coding rounds. Read Java comfortably either way.
Do you write code in the code review round?
Mostly you talk, but expect to sketch fixes. The 2022 round that became an object-oriented refactor had the candidate restructuring the sample code. Practise writing the corrected handler, like the two problems above, so the fix comes quickly.
What bugs does Toast plant?
The ones candidates have named are a GET that writes, a payload the server trusts too much, missing input validation, file and URL reads from any path, swallowed exceptions and a test that hits the network. Senior and staff rounds add caching, data model and API security questions.
Key Takeaways
- ✓Toast lists code review as an official exercise, and candidates report it in loops from 2021 to 2026.
- ✓Expect an hour with a multi-file Java service. Ranking the bugs by impact is part of the stated bar.
- ✓Security and wrong results come first: trusted client prices, any-path file or URL reads, GETs that write.
- ✓Staff reviews move into caching, data model denormalization and API security, so have a view on each.
Toast interview guideKnow what Toast asks before you walk in.
24 coding · 3 system design · 17 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.