Code RoomUDP datagram truncation
MediumPrep Room Coding #4286

UDP datagram truncation

Vibe & agenticNetworking & APIsMid–Senior~16 min

An AI wrote this C UDP receive loop for a telemetry collector. Large datagrams come through 'corrupted'. Find the bug, the datagram size that triggers it, and the fix.

Implement
recv_report(sizes: list[int], buf_size: int) → list[int]
Examples
in[[100,512,1472],512]out[1124,1,960,1472]
in[[64,128],512]out[192,0,0,128]
in[[1472],512]out[512,1,960,1472]
What 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 16 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.