Code RoomPayment migration review gates
HardPrep Room Coding #4377

Payment migration review gates

Vibe & agenticAlgorithms & data structuresSenior–Staff~24 min

An AI agent is migrating a payments service from a synchronous charge flow to an idempotent, queue-based one in Java. The agent can produce a lot of correct-looking code fast. Decide where in this multi-step migration a human MUST review before the agent proceeds, and where you can let it run autonomously. Justify each gate by what's at stake if the agent is wrong there.

Implement
dedupe_charge_requests(request_lines: list[str], window_seconds: int) → list[str]
Examples
in[["order=A1;amount=1500;currency=USD;ts=100;trace=t1","order=A1;amount=1500;currency=USD;ts=101;trace=t2"],60]out["charge","duplicate"]
in[["order=B1;amount=1000;currency=USD;ts=10;trace=a","order=B1;amount=2000;currency=USD;ts=11;trace=b","order=B1;amount=1000;currency=EUR;ts=12;trace=c"],60]out["charge","charge","charge"]
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.