Code RoomSelf-healing CI cost
HardPrep Room Coding #4503

Self-healing CI cost

Vibe & agenticAlgorithms & data structuresSenior–Staff~20 min

A teammate built a CI step where an autonomous agent attempts to auto-fix failing tests on every PR, looping up to 20 times running the full suite each iteration. It works, but builds now take 25 minutes and the monthly token bill tripled. Leadership loves the 'self-healing CI' demo. As the senior on the team, how do you judge whether this agent loop is worth its cost and latency, and what would you change?

Implement
right_size_agent_loop(fix_iterations: list[int], max_iterations: int, gate_on_failure: bool) → list[int]
Examples
in[[0,0,3,1,20],20,false]out[26,3,0]
in[[0,0,3,1,20],3,true]out[7,2,1]
in[[5],3,true]out[3,0,1]
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.