Code RoomLambda audit log persistence
MediumPrep Room Coding #4417

Lambda audit log persistence

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

An AI assistant wrote this AWS Lambda (Node.js) handler to build a per-request audit trail. It passed a single-invocation test. Identify the bug, when it bites in production, and how you'd catch it.

Implement
count_leaked_trail_entries(user_ids: list[str], module_scope: bool) → list[int]
Examples
in[["u1","u2","u3"],true]out[0,1,2]
in[["u1","u2","u3"],false]out[0,0,0]
in[[],true]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 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.