Code RoomVerify untrusted protocol parser
HardPrep Room Coding #4253

Verify untrusted protocol parser

Vibe & agenticAlgorithms & data structuresSenior–Staff~24 min

An agent delivered a Rust implementation of a custom binary wire-protocol parser for a high-throughput service — the kind of code where a bug is a security or corruption issue at scale. It compiles, the unit tests the agent wrote pass, and your team lacks deep expertise in this exact protocol. As the staff engineer accountable for shipping it, design the verification strategy: how do you gain justified confidence in parsing code you didn't write and don't fully understand, without just trusting the green checkmark?

Implement
parse_length_prefixed_frames(payload_bytes: list[int], max_frame_len: int) → list[str]
Examples
in[[3,10,20,30,1,99],4]out["10,20,30","99"]
in[[5,1,2],8]out["error:truncated@0"]
in[[0,0],4]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 24 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.