Code RoomDocstring describes unimplemented behavior
MediumPrep Room Coding #4432

Docstring describes unimplemented behavior

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

An AI assistant generated a docstring for this JavaScript function. Read the docstring against the code and identify where the docs describe intended-but-not-real behavior, plus how you'd catch this class of mismatch systematically.

Implement
charge_customer_result(status: str, charge_id: str, decline_code: str, amount_cents: int) → list[str]
Examples
in["succeeded","ch_123","",5000]out["ok","ch_123"]
in["failed","","card_declined",5000]out["declined","card_declined"]
in["succeeded","ch_9","",-100]out["error","invalid_amount"]
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.