Why a Test Is Failing Workflow Prompt
Overview: Trace a failing test to determine whether code or test is wrong.
SOP Instructions
13 - WHY A TEST IS FAILING
This test is failing: [paste the test code and the exact error or output].
Before proposing any fix, explain in plain language what this test is actually verifying and why it exists.
Trace the exact code path the test exercises, step by step.
Then tell me whether the root cause is:
- a bug in the implementation code,
- or a bug/outdated assumption in the test itself.
Show me the specific evidence from the trace that supports your conclusion.
Only after that, propose the minimal fix required.