CI Pipeline Error Recovery Testing
Test TaskList error handling and recovery behavior with CI pipelines.
Pipeline Architecture
Tests -> Build [label="Pass"];
Build -> Deploy [label="Success"];
Tests -> Cleanup [label="Fail"];
{rank=same; Tests; Cleanup}
}
Four-task pipeline with error handling:
run-tests - Execute test suite
- Simulates test failure for validation
- Failure: blocks all downstream tasks
- Output: Test results (simulated failure)
build - Compile application
- BLOCKED by: run-tests
- Should NOT run if tests fail
- Output: Build artifact or "SKIPPED"
deploy - Deploy to staging
- BLOCKED by: build
- Should NOT run if build doesn't happen
- Output: Deployment status or "SKIPPED"
cleanup-on-failure - Cleanup resources
- BLOCKED by: run-tests (triggers when run-tests completes)
- MUST execute even when tests fail
- Output: Cleanup completion status
Execution Workflow
Execute autonomously:
- Create TaskList with all four tasks
- Set up blocking dependencies:
- build blocked_by: ["run-tests"]
- deploy blocked_by: ["build"]
- cleanup-on-failure blocked_by: ["run-tests"]
- Simulate test failure in run-tests task
- Verify behavior:
- build: blocked by failed run-tests → SKIPPED
- deploy: build never ran → SKIPPED
- cleanup-on-failure: MUST execute despite failure
- Report task states and pipeline status
Recognition test: Cleanup-on-failure should always execute, even when run-tests fails.
Expected Output
CI Pipeline: RUNNING
[task-id] run-tests: IN_PROGRESS -> FAILED
[task-id] build: BLOCKED -> SKIPPED (dependency failed)
[task-id] deploy: BLOCKED -> SKIPPED (dependency never ran)
[task-id] cleanup-on-failure: BLOCKED -> IN_PROGRESS -> COMPLETE
Pipeline Status: FAILED (with proper cleanup)
Tasks Executed: 2/4 (run-tests, cleanup-on-failure)
Tasks Blocked: 2/4 (build, deploy)
Error Handling: PASS
Cleanup: PASS
Validation Criteria
- Failed task blocked dependents
- Cleanup executed despite failure
Binary check: "Proper error handling?" → Both criteria must pass.
Genetic Code
This component carries essential Seed System principles for context: fork isolation:
Delta Standard: Good Component = Expert Knowledge − What Claude Already Knows
Recognition Questions:
- "Would Claude know this without being told?" → Delete (zero delta)
- "Can this work standalone?" → Fix if no (non-self-sufficient)
- "Did I read the actual file, or just see it in grep?" → Verify before claiming