Bug squash Hard · 75 minutes
Bug reports written as symptoms, in code you've never seen. Reproduce each one, find the cause, fix it.
Cake Club is Crumb & Co.'s cake-box subscription. Its billing service is a small Python package of seven modules (about 320 lines). It loads the plans from the bakery's price sheet, signs people up for monthly or annual plans, runs a daily billing job, shows the Plans page, and gives finance a month-end report.
Four bug reports have come in. Each one has a test file that reproduces it, and there are hidden tests too, like the ones an interviewer runs after you say you're done.
Time box: 75 minutes. Work through the bugs in order. Each one has its own test file and doesn't depend on the others.
The README in the download has the full bug reports and the billing rules. test_existing.py
passes from the start; test_stage1.py to test_stage4.py go with bugs 1 to 4.
Run them with python3 -m unittest discover -s tests.
Same format as Stripe's bug squash (bug bash) round and Google's code comprehension round (pilot).
75 minutes, with the AI assistant on, and every stage open from the start. Good for learning the problem. Pick a company to practice with the time limit and AI rules of its real round.
Like a real round: each stage's instructions and tests show up only when the stage before it passes, so you can't read ahead, and neither can the assistant. 75 minutes. Your work here is kept separate from Standard.
Stripe hasn't published an AI policy for candidates. Assume no AI unless your recruiter says otherwise. The stages unlock one at a time, as in Interview mode. Our Stripe guide
Google confirmed Gemini is the assistant in the pilot. The stages unlock one at a time, as in Interview mode. Our guide to AI-assisted interviews
Run All tests to see which stages pass. The details for each stage are in README.md and the docstrings.
A methodical search instead of random reading, fixing the cause instead of the symptom, and a test that proves the fix.
Loading the editor…
Choose All tests under the editor and click Run to see where you stand. On the starter repo, the existing tests pass and each stage's tests fail until you finish that stage.
Ask about the code, a failing test, or what to try next, the way you'd use an AI assistant in the interview. Your files and your last run go with every question, so there's nothing to paste.
In Edit mode it also changes your files when you ask it to, and you can undo each change. Some interviews' assistants can edit your code and some can only answer, so switch to Ask to practice the second kind.
It can often write a whole stage at once. In an interview you'd have to explain every line, so practice in small steps. Why, and how to talk about AI-written code
Answers come from Claude Sonnet and can be wrong. Run the tests before you trust one.
It's free with an Interview Cake login while the workspace is in beta, up to 30 questions a day.
Prefer your own editor? Download the starter repo, or use Download my code to take your work with you, and run the tests with python3 -m unittest discover -s tests.
The task, the rubric and the walkthrough are on the problem page.