Code Room
Vibe codingHardvc-g224
Subject Ai risk judgmentLevel Senior–Staff~20 minCommon in Algorithms & data structures interviewsIndustries Software development, Technology

Question

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?

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.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.