Graceful shutdown with background workers
You ask an AI agent to 'add graceful shutdown to our Go HTTP service.' It wires `signal.Notify` and calls `server.Shutdown(ctx)` with a 5s timeout — looks textbook. In a load test, in-flight requests get cut and a background worker pool keeps running after the process is 'done.' You re-prompt 'make shutdown actually wait'; it bumps the timeout to 30s. It doesn't see the second component that needs draining. How do you re-steer to a correct shutdown?
plan_shutdown_drain(components: list[str], drain_ms: list[int], budget_ms: int) → list[str][["http","workers","metrics","db"],[2000,15000,500,300],25000]out["http=drained","workers=drained","metrics=drained","db=drained"][["http","workers","metrics","db"],[2000,15000,500,300],5000]out["http=drained","workers=cut","metrics=abandoned","db=abandoned"][["http"],[2000],5000]out["http=drained"]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.