- Files
- src/auth/tests/auth.test.ts:45 Issue: Expected token to be valid, got undefined Cause: Missing await on async call Fix: Add await to line 45 Verify: Run test locally, push, confirm CI passes Estimate: 15m
- Files
- .github/workflows/ci.yml Issue: Integration tests timing out at 5m Cause: Added new tests, total time exceeds limit Fix: Increase timeout-minutes to 10 Verify: Rerun workflow, confirm completion Estimate: 10m
Error Summary
[Key error lines - exact text]
Root Cause
Type: [Classification] Location: [File/step] Cause: [Specific explanation]
Resolution Plan
Action: [Fix / Retry / Quarantine / Config Change]
[Specific fix with code/config]
Verification
- [ ] [Step to verify fix]
Prevention
[How to prevent this class of failure]
## Red Flags
- Same test fails randomly (flaky—fix or quarantine)
- CI takes >15 minutes (optimize pipeline)
- No local reproduction (environment drift)
- Retrying without understanding (hiding the problem)
- Multiple unrelated failures (systemic issue)
- **Lowering a quality gate to make CI pass** — NEVER do this. Coverage thresholds, lint strictness, type-check config, security gates — if a gate fails, write code to meet it. More tests, better code, actual fixes. Never move the goalpost. This is absolute and non-negotiable.
## Philosophy
> **"CI failures are features, not bugs. They caught an issue before users did."**
**Humble's wisdom**: Bring pain forward. The earlier you find issues, the cheaper they are to fix.
**Fowler's practice**: Integrate frequently. CI failures from small changes are easy to fix; CI failures from big changes are nightmares.
**Forsgren's metric**: Lead time matters. Fast CI resolution = fast delivery.
**Your goal**: Classify, fix, and prevent. Don't just make CI green—understand why it was red.
---
*Run this command when CI fails. Insert specific tasks into TODO.md, then remove temporary files.*