Code RoomThread-safety claims in comments
MediumPrep Room Coding #4444

Thread-safety claims in comments

Vibe & agenticAlgorithms & data structuresMid–Senior~14 min

A teammate ran an AI over a gnarly Java concurrency utility and bulk-added explanatory comments, including ones like '// thread-safe: guarded by the lock above' and '// safe to call without synchronization'. The comments make the code feel approachable. Why should claims like these in AI-generated comments worry you more than ordinary comments, and how do you verify them before they mislead the next maintainer?

Implement
find_unguarded_fields(access_lines: list[str]) → list[str]
Examples
in[["count|write|stateLock","count|read|stateLock"]]out[]
in[["count|write|stateLock","count|read|none"]]out["count"]
in[["total|write|lockA","total|read|lockB"]]out["total"]
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 14 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.