Code RoomRegulated code provenance
HardPrep Room Coding #4631

Regulated code provenance

Vibe & agenticAlgorithms & data structuresSenior–Staff~20 min

You work on a payments service under regulatory and audit requirements. You used an AI agent to generate part of a Java module that computes interchange fee splits and a chunk of the test suite. Legal and your compliance lead have started asking how AI is being used in code that touches money. You need to advise on a disclosure and provenance norm for AI-generated code in regulated paths. What do you recommend, and where is the line between sensible governance and theater?

Implement
split_interchange_fee(total_cents: int, share_bps: list[int]) → list[int]
Examples
in[1000,[5000,3000,2000]]out[500,300,200]
in[1001,[3333,3333,3334]]out[334,333,334]
in[0,[10000]]out[0]
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 20 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.