SKILL.md
Integration Testing Discipline
The Core Principle
OBSERVE FIRST. FIX IN BATCHES. NEVER FIX DURING ACTIVE E2E RUNS.
When running integration tests or E2E validation, your job is to CAPTURE ALL failures first, then fix them systematically. Making code changes during a running test invalidates that test run.
The Four Principles
Principle 1: Don't Fix During Observation Runs
DO: Let the E2E run complete (or fail with a real error), capture ALL failure points, then fix everything as a coordinated batch.
DON'T: See one failure, fix it immediately, and continue the same E2E run.
Why: Code changes during E2E runs invalidate the running test. You lose the ability to trust that run's results.
Example:
❌ WRONG:
1. E2E run finds validation error
2. Fix validation immediately
3. Continue same E2E run
4. Find auth error
5. Fix auth immediately
6. Continue same E2E run
→ Result: Can't trust this run's success
✅ RIGHT:
1. E2E run finds validation error — RECORD IT
2. E2E run finds auth error — RECORD IT
3. E2E run completes — STOP OBSERVING
4. Fix validation AND auth as a batch
5. Start fresh E2E run to validate fixes
→ Result: Clean validation of coordinated fixes
Principle 2: Long-Running Processes Are Normal
DO: Check for actual error signals: non-zero exit codes, error messages in logs, process death, hung processes.
DON'T: Declare "stuck" or "failed" based on wall clock time alone.
Expected Durations:
- Container setup: 60-90 seconds
- Simple spec (1 endpoint): ~13 minutes
- Medium spec (4 CRUD endpoints): ~25 minutes
- Complex spec (8+ endpoints): ~40 minutes
- Each convergence iteration: 5-8 minutes
Example:
