TCP packet framing corruption
You ask an AI to write a Go parser for a binary telecom protocol where each packet is a 4-byte big-endian length followed by that many bytes of payload, streamed over TCP. It writes a loop that does `conn.Read(buf)` once into a 4096-byte buffer and slices off the length, then the payload. It works against your test that sends one packet per write. In integration it corrupts frames: TCP coalesces and splits writes, so one `Read` returns 1.5 packets or half a length header. You re-prompt 'handle partial reads'; it adds a second `Read` but still assumes a header arrives whole. How do you re-steer?
decode_frames(chunks: list[str], max_frame_len: int) → list[str][["00","05hel","lo0003abc"],100]out["hello","abc"][["0005hel"],100]out[][["000"],100]out[]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.