Code RoomBinary protocol parser trust
HardPrep Room Coding #4024

Binary protocol parser trust

Vibe & agenticNetworking & APIsSenior–Staff~20 min

An agent wrote a C++ parser for a binary network protocol from the RFC. It compiles, parses your captured sample packets, and looks faithful to the spec. You don't fully understand the wire format and the parser handles attacker-controlled bytes. How do you verify it before it touches untrusted network input?

Implement
parse_frame_lengths(byte_stream: list[int]) → list[int]
Examples
in[[3,1,2,3,0,2,9,9]]out[3,0,2]
in[[4,1,2]]out[-1]
in[[]]out[]
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 20 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.