Code RoomTrunk-based with two agents
HardPrep Room Coding #4386

Trunk-based with two agents

Vibe & agenticAlgorithms & data structuresSenior–Staff~22 min

Your team practices trunk-based development on a Python service. You and a teammate are both using AI agents on overlapping areas of the codebase this sprint, integrating to main several times a day. Design the working agreement that lets two AI-assisted engineers commit fast to the same trunk without their agents' changes colliding or undoing each other. What's different about coordinating agent-driven work vs. two humans hand-coding?

Implement
find_trunk_collisions(edits: list[str], max_divergence_hours: int) → list[str]
Examples
in[["alice|payments|1","bob|payments|9","alice|billing|2"],4]out["payments"]
in[["alice|payments|1","bob|payments|3"],4]out[]
in[["alice|payments|1","alice|payments|20","bob|search|2"],4]out[]
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 22 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.