Code RoomRegression test validity
HardPrep Room Coding #4400

Regression test validity

Vibe & agenticAlgorithms & data structuresSenior–Staff~18 min

You found a bug, then asked an AI agent to both fix it AND write a regression test for it. It returned a one-line fix and a passing test. The natural worry: an AI writing the test for its own fix may write a test that passes regardless of whether the fix is correct. How do you judge whether the regression test genuinely guards the bug?

Implement
classify_regression_tests(result_lines: list[str]) → list[str]
Examples
in[["test_zero_qty_discount|fail|pass"]]out["test_zero_qty_discount:guards"]
in[["test_zero_qty_discount|pass|pass","test_rounding|fail|pass"]]out["test_zero_qty_discount:vacuous","test_rounding:guards"]
in[["test_a|fail|fail","test_b|pass|fail"]]out["test_a:broken","test_b:inverted"]
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 18 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.