Question
You asked an AI assistant to add a `discount` parameter to your existing `calculatePrice(items)` function in JavaScript. It returned a new version of the function — but it's 30 lines where yours was 12, and it also reformatted everything and seems to have changed how tax is calculated. How do you verify it did what you asked and nothing you didn't, before accepting the change?
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.