Code RoomTamper-evident audit log
HardPrep Room Coding #4275

Tamper-evident audit log

Vibe & agenticAlgorithms & data structuresSenior–Staff~28 min

You're building a tamper-evident audit-log service from scratch in Rust with an AI agent: it records security-relevant events (who did what, when) for compliance, must be append-only, queryable, and resistant to after-the-fact editing. Describe the build plan: the storage and integrity model, the write path, querying, and acceptance criteria. What does a careless 'log all the admin actions to a table' prompt fundamentally miss about an AUDIT log specifically?

Implement
verify_audit_chain(record_digests: list[int], stored_links: list[int]) → int
Examples
in[[5,12,7],[5,167,5184]]out-1
in[[5,12,7],[5,999,5184]]out1
in[[5,12],[5,167,5184]]out2
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 28 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.