Code RoomBash to Python semantics
MediumPrep Room Coding #4241

Bash to Python semantics

Vibe & agenticCode quality & reviewMid–Senior~16 min

You have a gnarly 300-line deployment Bash script and ask an AI agent to rewrite it in Python for maintainability. The Python version runs and does the right thing in a manual test. Before you trust it in CI/CD, what Bash-specific semantics is the agent most likely to have gotten subtly wrong?

Implement
simulate_deploy_exit(step_codes: list[int], abort_on_error: bool) → list[int]
Examples
in[[0,0,0],true]out[0,3,0]
in[[0,3,0,0],true]out[3,2,0]
in[[0,3,0,0],false]out[0,4,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 16 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.