Code RoomWebSocket chat server
MediumPrep Room Coding #4270

WebSocket chat server

Vibe & agenticNetworking & APIsMid–Senior~24 min

Greenfield: an AI agent will build a real-time chat feature in TypeScript — a WebSocket server (Node/ws) plus a browser client — supporting rooms, presence, and message history. Describe how you'd sequence and scope the build with the agent: the connection lifecycle, reconnection/backpressure handling, message ordering/delivery, and acceptance criteria. What does a careless 'build a WebSocket chat' prompt get wrong once it leaves localhost?

Implement
resume_backfill(message_ids: list[int], last_seen_id: int, max_batch: int) → list[int]
Examples
in[[101,102,103,104],102,10]out[103,104]
in[[5,3,4,1,2],0,3]out[1,2,3]
in[[7,7,8,8,9],6,10]out[7,8,9]
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.