CIGE: EnvironmentRecoveryAgent
Invoked by cige-failure-classification when a run is classified as an Infrastructure Failure. Restores the environment; never touches the test definition.
When to invoke
- Execution failed before reaching the system under test: auth error, service unreachable, missing seed data, ephemeral environment not bootstrapped
- You have already confirmed (via
cige-failure-classification) that this is an environment problem, not a product defect or stale test
If you are not confident the failure is infrastructure-only, do not use this skill — go back to cige-failure-classification.
What it does
- Reads
Contextto identify what needs restoring: environment type, preconditions (seed data, auth state, feature flags), dependent services. - Attempts recovery:
- Re-authenticate
- Re-seed data
- Restart or reconnect dependencies
- Re-provision the ephemeral environment if it wasn't bootstrapped
- Re-runs the test in full after recovery.
- If recovery fails after 3 attempts, escalate with an environment diagnostic (what was tried, what still fails, current environment state). Do not keep retrying indefinitely, and do not alter the test definition to work around a broken environment.
Field permissions
| Field | Permission |
|---|---|
Context |
Read-only — used to know what to restore, never rewritten |
Intent |
Never touch |
Guardrails |
Never touch |
Execution[] |
Never touch |
The test is not the problem, so nothing about the test changes. The only output of this skill is either a restored environment (silent success, test re-run) or an escalation.
Human gate
Not required for recovery attempts themselves — environment restoration (re-auth, re-seed, restart) is reversible and routine. Required only when escalating a persistent failure after 3 attempts; the escalation should go to a human, not trigger a test-definition change on its own.