The annoying part is the built-in AI assistant only works on a single file at a time, so you can't just scan the whole repo and hope something jumps out.
Start by reproducing the bug and tracing the data flow from the frontend action (marking watched and rating) through the API to the recommendation service. Systematically check each component—UI state, API request/response, backend logic, and data storage—to isolate where the breakdown occurs. Then propose a fix and verify it end-to-end.
Pro tip: Demonstrate a hypothesis-driven approach: before diving into code, articulate your assumptions about where the bug might be and how you'll validate them. This shows structured problem-solving, which Amazon values highly.
Reproduce the issue by marking a movie as watched and submitting a rating, then observe that recommendations remain empty. Confirm the expected behavior and gather any error logs or network traces.
Follow the data from the frontend event through the API call to the backend service that generates recommendations. Identify each component involved and check for failures or misconfigurations.
Use debugging tools, logs, and unit tests to narrow down the failure. Check if the watched/rating data is persisted, if the recommendation service is triggered, and if the response is correctly rendered.
Once the root cause is identified, implement a targeted fix. Write or update tests to cover the scenario and verify that recommendations now appear correctly.
Test the fix end-to-end, including edge cases. Consider adding monitoring or alerts to detect similar issues in the future.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.