AO
Back

AI-Assisted Debugging OA: The Movie Database App

Also reported as Movie DB · Movie Watchlist Debugging

OAAsync OALast reported September 2026Medium Frequency
Reconstruction, not the original

This movie database backend is a reconstruction written by AceOffer, not Amazon's repository. Candidates report the six failing watch-list tests, the search rules and the kinds of bugs (unsaved changes, missing existence checks, wrong status codes, a query that is not lower-cased), and this program reproduces them in Python; the code, data, README status codes and messages, and the exact bugs are ours. Amazon's repo is a full-stack app in the stack you choose.

Problem Overview

Amazon's online assessment ends its coding section with a 60-minute debugging task in an existing repository, and one of the repos candidates keep reporting is a movie database web app. You choose a stack at the start (reports name Spring Boot and Python; the Java version reported was a different variant of the app), read the task description and the failing tests, and fix the code until the tests pass. The built-in AI assistant can help you find code but will not make the fix. Reports describe two features with failing tests, and this page has one graded part for each:

Part 1 — Watch lists: the six failing tests. One candidate lists the six failing tests of the watch-list version: add a movie to a watch list, add a movie the list already has, delete a movie, add many movies and then delete them one by one, add to a watch list that does not exist, and delete from one. They advise checking whether each endpoint returns the correct status code, checks that the movie and the list exist, and saves the new movie to the database.

Part 2 — Movie search. In another version the search finds nothing. One candidate gives its rules: partial match, on the title, the stars or all of them, ignoring case, sorted by popularity, and only published movies. Another traced their failure to a query term that was never lower-cased while the stored values were.

This page is a stand-in. The code is a small Python backend written for AceOffer that reproduces the six reported watch-list tests, the reported search rules and the kinds of bugs candidates describe. The README's exact status codes and messages, the tie-break, the data and the particular bugs are ours; the solution says which bugs follow a report and which do not. Amazon's repo is a full-stack app with many more files, in the stack you choose.

The README (given at the top of the code). add_movie returns 201 with the saved list, remove_movie and get_watchlist return 200. Errors, checked in this order: a missing list is 404 Watch list not found (every handler); in add_movie a missing movie is 404 Movie not found and a movie the list already has is 409 Movie already in watch list; in remove_movie a movie the list does not have is 404 Movie not in watch list. Search returns 200 with the matching titles, most popular first, equal popularity ordered by title A to Z. Every error body is {"error": <message>}.

How the tests call it. Each test builds db = seed_db() and calls a handler through request(handler, *args), which turns a crash into a 500: get_watchlist(db, list_id), add_movie(db, list_id, movie_id), remove_movie(db, list_id, movie_id) and search_movies(db, query, field), where field is "title", "stars" or "all". A Response has status and body.

Other versions of this repo (not built here): the home page's movie recommendations not showing; a custom movie list that will not take a movie; an actor site where users follow actors and should be notified when a followed actor gets a new movie, whose tests did not cover every bug the task described; and a Django report, likely the same app though it does not name it, with filters by genre, director and writer, rating and year bounds, and sort tie-breakers.

What Reports Emphasize

Common mistakes: Fixing the logic but returning the wrong status code, or changing an object without saving it to the database; both are named in reports of this repo. Patching one failing test at a time instead of grouping failures by endpoint, since several tests often share one cause. Trusting the tests to cover every described bug, which one Java version's did not.

Time: candidates call it not hard but slow. One Spring Boot candidate finished only the first two of six tests; another, new to Spring Boot, spent 45 minutes and found the time tight.

Outcomes reported: one candidate who did not pass every test went straight to the onsite; one who passed the OA on the Java actor-site version advises clicking through every described bug in the UI; one who passed none of the tests believes they failed.

Practice

Write your own against 15 test cases, or read the worked solution — approach, complexity, and code that runs.

Prepping for Amazon with friends?

Send them this page. It is free to read, no account needed.

More Amazon Questions

Free preview

Every question in the Amazon catalog gets this depth

What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 57 Amazon questions, refreshed monthly from new candidate reports.

$59/mo — or $50/mo with the 3-month pass · cancel anytime
Amazon · OA · Reported 9× across candidate reports
Is this helpful?