Code RoomUnsafe Rust code review
HardPrep Room Coding #4182

Unsafe Rust code review

Vibe & agenticAlgorithms & data structuresSenior–Staff~20 min

Your team is mostly a Python shop, but you need a small, hot data-plane component rewritten in Rust for throughput, and an AI agent produces a working version using unsafe blocks and a lock-free ring buffer. It compiles, passes your benchmarks, and the agent explains the unsafe code confidently. Nobody on the team writes Rust well enough to audit `unsafe` memory safety. Do you ship it, and how do you reason about the risk of merging AI-generated code in a language your team can't review?

Implement
assess_unsafe_merge(unsafe_blocks: int, qualified_reviewers: int, sanitizers_run: list[str], fuzz_hours: int) → str
Examples
in[3,0,["asan","miri","tsan"],24]out"rewrite_in_safe_rust"
in[3,1,["asan","miri"],24]out"run_sanitizers"
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.