Checksum overflow wraps validation
An AI wrote this Go code to verify a packet's trailing checksum before processing it. It accepts every valid packet in tests but also lets corrupted ones through. Find the validation bug, the packet that slips past, and the fix.
Implement
verify_packet(packet: list[int]) → boolExamples
in
[[1,2,3,10,6]]outtruein
[[3,2,1,10,6]]outfalsein
[[0,0]]outtrueWhat a strong answer looks like
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.
0:00 of about 18 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.