Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which recovery design handles uncertainty after a WebSocket connection drops during a side-effecting message?" on CodeWiki (https://codewiki.com/practice/mcq/foundations/checkpoint-4/checkpoint-4-websocket-recovery/).
Context (verbatim from the page):
"""
Which recovery design handles uncertainty after a WebSocket connection drops during a side-effecting message?
Use message IDs, acknowledgements, deduplication, resume cursors, and a bounded outbound queue.
Reconnect and resend every buffered message without identity or limits.
Assume a successful reconnect restores the old connection and its delivery state.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in CS foundations. Where you are unsure, say so.