--- title: Fix Bug With Regression Test description: Reproduce a bug, patch the root cause, add regression coverage, and validate --- # Fix Bug With Regression Test 1. Run Graphify query first to trace impacted route/controller/service/repository paths. 2. Identify the reported behavior and the expected behavior. 3. Trace the relevant code path and tests. 4. Add or update a focused regression test when practical. 5. Confirm the root cause before editing implementation code. 6. Make the smallest safe fix. 7. Run targeted tests first, then `npm run lint`, `npm test`, and `npm run build`. 8. Summarize root cause, fix, regression coverage, commands run, and remaining risks.