Redirecting misdiagnosed async bugs
You ask an AI to write a TypeScript debounce hook for a search box. It returns a `useDebounce` that uses `setTimeout`/`clearTimeout` and works in the demo. In your app it fires a stale request: when the user types fast, an older in-flight fetch sometimes resolves after a newer one and overwrites the results. You tell it 'the results are wrong, fix the debounce' and it lowers the delay. The debounce was never the bug. How do you re-steer?
apply_search_responses(events: list[str]) → list[str][["fire ca","fire cat","resolve 1","resolve 0"]]out["cat"][["fire ca","resolve 0","fire cat","resolve 1"]]out["ca","cat"][["fire a","fire ab","fire abc","resolve 2","resolve 1","resolve 0"]]out["abc"]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 & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.