Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A sentinel has been wrapped twice. Which check preserves the caller contract?" on CodeWiki (https://codewiki.com/practice/mcq/go/checkpoint-2/checkpoint-2-error-match/).
Context (verbatim from the page):
"""
A sentinel has been wrapped twice. Which check preserves the caller contract?
Call `errors.Is(err, sentinel)`.
Compare the outer error directly with `err == sentinel`.
Search `err.Error()` for the sentinel message.
"""
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 Go. Where you are unsure, say so.