QA Resilience
Use this skill when reliability work is about failure behavior, overload protection, degraded mode, or resilience testing. The goal is not "add retries everywhere." The goal is predictable failure handling, clear ownership, and testable recovery behavior.
Quick Reference
| Symptom |
Start With |
| slow or hanging dependency |
deadline and timeout budget |
| transient dependency failure |
bounded retry with jitter and retry budget |
| sustained dependency failure |
circuit breaker and fallback |
| rate-limited dependency |
honor Retry-After, expose degraded behavior, and test quota paths intentionally |
| one bad host in a healthy pool |
outlier detection or endpoint ejection |
| queue or pool saturation |
bulkheads, concurrency limits, load shedding |
| non-critical feature outage |
graceful degradation or feature flag fallback |
| resilience validation |
deterministic fault injection before chaos |
When to Use This Skill
- retries, deadlines, hedging, breakers, bulkheads, and overload protection
- degraded-mode UX or API behavior
- service-mesh or gateway resilience policy
- chaos engineering, game days, DR drills, and fault injection
- release gates based on failure behavior, not only happy-path load tests
Route Elsewhere
Workflow
- Identify the critical user journeys and the dependencies that can break them.
- Define the contract per dependency:
- timeout or deadline budget
- retry ownership
- breaker or outlier policy
- concurrency and queue limits
- degraded behavior if the dependency is unavailable
- Decide where the policy lives:
- app code
- client library
- mesh or gateway
- Test in stages:
- deterministic fault injection
- staged chaos in non-production
- narrow prod canary or game day only with guardrails
- Define pass or fail signals:
- burn rate
- p95 or p99
- fallback rate
- breaker transitions
- shed volume
- recovery time
Pattern Rules
- retries happen at one layer only
- deadlines come before retries
- hedging is only for idempotent or cancellation-safe reads
- overload handling must shed early instead of collapsing late
- readiness and liveness must stay bounded and shallow
- resilience behaviors belong in targeted checks; do not let rate-limit or degraded-mode coverage leak into unrelated happy-path suites
- prod experiments require blast-radius limits, abort criteria, dashboards, and owners
Failure Modes to Validate
- timeouts and deadline propagation
- retry storms and duplicate side effects
- partial dependency outages
- slow downstreams and long-tail latency
- queue buildup and connection-pool exhaustion
- one-bad-host behavior inside a pool
- degraded-mode responses and stale-data fallbacks
- rate-limit handling,
Retry-After, and client backoff expectations
- visible state convergence after recovery or backend resets
- failover and failback behavior
- metastable failure: a self-sustaining feedback loop (retry amplification, cache-miss stampede, queue backlog, connection-pool churn) that does not self-resolve after the original trigger clears — see references/cascading-failure-prevention.md
Testing Ladder
Deterministic first
- inject latency, errors, timeouts, malformed payloads, and unavailable endpoints in controlled tests
- verify the intended control activates and the wrong controls do not
Chaos second
- start in non-production
- use a small blast radius and a fixed time window
- stop immediately on error-budget or customer-impact breach
DR and game days last
- validate RTO and RPO claims explicitly
- rehearse recovery ownership, not only technical failover
Operational Guardrails
- every experiment needs a stated hypothesis and steady-state metric
- every run should capture timestamps, targets, blast radius, and dashboard links
- telemetry fields for retries, breaker transitions, hedging, shedding, and fallback are part of the resilience contract
- releases should be gated on reliability behavior, not only resource usage
Anti-Patterns
- no timeouts
- retries at every hop
- fixed-interval or unbounded retries
- fixed per-call retry count with no system-wide retry budget (does not tighten as error rate rises)
- retries without idempotency
- hedging unsafe writes
- no bulkheads or queue bounds
- deep readiness or liveness checks
- silent degraded mode
- untested failover plans
- happy-path-only load testing
Scripts
| Script |
Purpose |
| scripts/resilience_checker.py |
Scores resilience pattern coverage and reports gaps |
Typical usage:
python scripts/resilience_checker.py assess --input data/sample-service-profile.json
python scripts/resilience_checker.py gaps --input data/sample-service-profile.json
python scripts/resilience_checker.py report --input data/sample-service-profile.json --output resilience-report.md
See scripts/README.md for the input format and scoring logic.
ASCII Flow
Resilience request
-> Identify failure mode: slow, transient, sustained, overloaded, or degraded
-> Set deadlines, retry budgets, isolation, and fallback ownership
-> Add telemetry for saturation, errors, latency, and degraded behavior
-> Validate with deterministic fault injection before chaos experiments
-> Gate release on recovery evidence, SLO impact, and rollback path
-> Document runbook actions and residual risk
Navigation
Foundation applied recipes
- references/reliability-theory-applied.md
- references/distributed-systems-applied.md
Core references
- references/circuit-breaker-patterns.md
- references/retry-patterns.md
- references/timeout-policies.md
- references/deadlines-hedging.md
- references/bulkhead-isolation.md
- references/load-shedding-backpressure.md
- references/gateway-mesh-resilience.md
- references/graceful-degradation.md
- references/health-check-patterns.md
- references/cascading-failure-prevention.md
- references/disaster-recovery-testing.md
Operational resources
- references/resilience-checklists.md
- references/chaos-engineering-guide.md
- references/chaos-tooling-recipes.md
- references/idempotency-key-design.md
- references/resilience-telemetry.md
- references/slo-as-code.md
- references/ai-llm-resilience-failure-modes.md
- assets/runbooks/resilience-runbook-template.md
- assets/testing/fault-injection-playbook.md
- assets/testing/template-resilience-test-plan.md
- data/sample-service-profile.json
Related Skills
Fact-Checking
- Known bugs, regressions, framework/compiler/runtime footguns, and version-specific crash or workaround guidance must be verified against current primary web sources before being treated as current fact.
- Verify current platform features, mesh capabilities, and vendor-specific behavior before final answers when the recommendation depends on a live product.
- Prefer primary docs for runtime or tooling specifics.
- If web access is unavailable, keep external product guidance marked as unverified.
Learnings Loop
Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
1---
2name: qa-resilience
3description: "Designs and tests distributed-system resilience. Use when adding retries, deadlines, hedging, circuit breakers, overload protection, chaos experiments, or SLO reliability gates."
4compatibility: Portable core. Works on Claude Code and Codex.
5version: "1.1"
6last_validated: 2026-07-11
7---
8
9# QA Resilience
10
11Use this skill when reliability work is about failure behavior, overload protection, degraded mode, or resilience testing. The goal is not "add retries everywhere." The goal is predictable failure handling, clear ownership, and testable recovery behavior.
12
13## Quick Reference
14
15| Symptom | Start With |
16|--------|------------|
17| slow or hanging dependency | deadline and timeout budget |
18| transient dependency failure | bounded retry with jitter and retry budget |
19| sustained dependency failure | circuit breaker and fallback |
20| rate-limited dependency | honor `Retry-After`, expose degraded behavior, and test quota paths intentionally |
21| one bad host in a healthy pool | outlier detection or endpoint ejection |
22| queue or pool saturation | bulkheads, concurrency limits, load shedding |
23| non-critical feature outage | graceful degradation or feature flag fallback |
24| resilience validation | deterministic fault injection before chaos |
25
26## When to Use This Skill
27
28- retries, deadlines, hedging, breakers, bulkheads, and overload protection
29- degraded-mode UX or API behavior
30- service-mesh or gateway resilience policy
31- chaos engineering, game days, DR drills, and fault injection
32- release gates based on failure behavior, not only happy-path load tests
33
34## Route Elsewhere
35
36- simple CRUD or single-process utilities -> ordinary error handling may be enough
37- frontend-only failure behavior -> [software-frontend](../software-frontend/SKILL.md)
38- service implementation details -> [software-backend](../software-backend/SKILL.md)
39- telemetry instrumentation -> [qa-observability](../qa-observability/SKILL.md)
40- broader platform and incident operating model -> [ops-devops-platform](../ops-devops-platform/SKILL.md)
41
42---
43
44## Workflow
45
461. Identify the critical user journeys and the dependencies that can break them.
472. Define the contract per dependency:
48 - timeout or deadline budget
49 - retry ownership
50 - breaker or outlier policy
51 - concurrency and queue limits
52 - degraded behavior if the dependency is unavailable
533. Decide where the policy lives:
54 - app code
55 - client library
56 - mesh or gateway
574. Test in stages:
58 - deterministic fault injection
59 - staged chaos in non-production
60 - narrow prod canary or game day only with guardrails
615. Define pass or fail signals:
62 - burn rate
63 - p95 or p99
64 - fallback rate
65 - breaker transitions
66 - shed volume
67 - recovery time
68
69---
70
71## Pattern Rules
72
73- retries happen at one layer only
74- deadlines come before retries
75- hedging is only for idempotent or cancellation-safe reads
76- overload handling must shed early instead of collapsing late
77- readiness and liveness must stay bounded and shallow
78- resilience behaviors belong in targeted checks; do not let rate-limit or degraded-mode coverage leak into unrelated happy-path suites
79- prod experiments require blast-radius limits, abort criteria, dashboards, and owners
80
81## Failure Modes to Validate
82
83- timeouts and deadline propagation
84- retry storms and duplicate side effects
85- partial dependency outages
86- slow downstreams and long-tail latency
87- queue buildup and connection-pool exhaustion
88- one-bad-host behavior inside a pool
89- degraded-mode responses and stale-data fallbacks
90- rate-limit handling, `Retry-After`, and client backoff expectations
91- visible state convergence after recovery or backend resets
92- failover and failback behavior
93- metastable failure: a self-sustaining feedback loop (retry amplification, cache-miss stampede, queue backlog, connection-pool churn) that does not self-resolve after the original trigger clears — see [references/cascading-failure-prevention.md](references/cascading-failure-prevention.md#metastable-failures--the-class-cascading-failure-fixes-do-not-cure)
94
95---
96
97## Testing Ladder
98
99### Deterministic first
100
101- inject latency, errors, timeouts, malformed payloads, and unavailable endpoints in controlled tests
102- verify the intended control activates and the wrong controls do not
103
104### Chaos second
105
106- start in non-production
107- use a small blast radius and a fixed time window
108- stop immediately on error-budget or customer-impact breach
109
110### DR and game days last
111
112- validate RTO and RPO claims explicitly
113- rehearse recovery ownership, not only technical failover
114
115---
116
117## Operational Guardrails
118
119- every experiment needs a stated hypothesis and steady-state metric
120- every run should capture timestamps, targets, blast radius, and dashboard links
121- telemetry fields for retries, breaker transitions, hedging, shedding, and fallback are part of the resilience contract
122- releases should be gated on reliability behavior, not only resource usage
123
124## Anti-Patterns
125
126- no timeouts
127- retries at every hop
128- fixed-interval or unbounded retries
129- fixed per-call retry count with no system-wide retry budget (does not tighten as error rate rises)
130- retries without idempotency
131- hedging unsafe writes
132- no bulkheads or queue bounds
133- deep readiness or liveness checks
134- silent degraded mode
135- untested failover plans
136- happy-path-only load testing
137
138---
139
140## Scripts
141
142| Script | Purpose |
143|--------|---------|
144| [scripts/resilience_checker.py](scripts/resilience_checker.py) | Scores resilience pattern coverage and reports gaps |
145
146Typical usage:
147
148```bash
149python scripts/resilience_checker.py assess --input data/sample-service-profile.json
150python scripts/resilience_checker.py gaps --input data/sample-service-profile.json
151python scripts/resilience_checker.py report --input data/sample-service-profile.json --output resilience-report.md
152```
153
154See [scripts/README.md](scripts/README.md) for the input format and scoring logic.
155
156## ASCII Flow
157
158```text
159Resilience request
160 -> Identify failure mode: slow, transient, sustained, overloaded, or degraded
161 -> Set deadlines, retry budgets, isolation, and fallback ownership
162 -> Add telemetry for saturation, errors, latency, and degraded behavior
163 -> Validate with deterministic fault injection before chaos experiments
164 -> Gate release on recovery evidence, SLO impact, and rollback path
165 -> Document runbook actions and residual risk
166```
167
168## Navigation
169
170### Foundation applied recipes
171
172- [references/reliability-theory-applied.md](references/reliability-theory-applied.md)
173- [references/distributed-systems-applied.md](references/distributed-systems-applied.md)
174
175### Core references
176
177- [references/circuit-breaker-patterns.md](references/circuit-breaker-patterns.md)
178- [references/retry-patterns.md](references/retry-patterns.md)
179- [references/timeout-policies.md](references/timeout-policies.md)
180- [references/deadlines-hedging.md](references/deadlines-hedging.md)
181- [references/bulkhead-isolation.md](references/bulkhead-isolation.md)
182- [references/load-shedding-backpressure.md](references/load-shedding-backpressure.md)
183- [references/gateway-mesh-resilience.md](references/gateway-mesh-resilience.md)
184- [references/graceful-degradation.md](references/graceful-degradation.md)
185- [references/health-check-patterns.md](references/health-check-patterns.md)
186- [references/cascading-failure-prevention.md](references/cascading-failure-prevention.md)
187- [references/disaster-recovery-testing.md](references/disaster-recovery-testing.md)
188
189### Operational resources
190
191- [references/resilience-checklists.md](references/resilience-checklists.md)
192- [references/chaos-engineering-guide.md](references/chaos-engineering-guide.md)
193- [references/chaos-tooling-recipes.md](references/chaos-tooling-recipes.md)
194- [references/idempotency-key-design.md](references/idempotency-key-design.md)
195- [references/resilience-telemetry.md](references/resilience-telemetry.md)
196- [references/slo-as-code.md](references/slo-as-code.md)
197- [references/ai-llm-resilience-failure-modes.md](references/ai-llm-resilience-failure-modes.md)
198- [assets/runbooks/resilience-runbook-template.md](assets/runbooks/resilience-runbook-template.md)
199- [assets/testing/fault-injection-playbook.md](assets/testing/fault-injection-playbook.md)
200- [assets/testing/template-resilience-test-plan.md](assets/testing/template-resilience-test-plan.md)
201- [data/sample-service-profile.json](data/sample-service-profile.json)
202
203## Related Skills
204
205- [ops-devops-platform](../ops-devops-platform/SKILL.md)
206- [software-backend](../software-backend/SKILL.md)
207- [software-architecture-design](../software-architecture-design/SKILL.md)
208- [qa-observability](../qa-observability/SKILL.md)
209- [qa-debugging](../qa-debugging/SKILL.md)
210- [software-security-appsec](../software-security-appsec/SKILL.md)
211- [data-sql-optimization](../data-sql-optimization/SKILL.md)
212- [dev-api-design](../dev-api-design/SKILL.md)
213
214## Fact-Checking
215
216- Known bugs, regressions, framework/compiler/runtime footguns, and version-specific crash or workaround guidance must be verified against current primary web sources before being treated as current fact.
217- Verify current platform features, mesh capabilities, and vendor-specific behavior before final answers when the recommendation depends on a live product.
218- Prefer primary docs for runtime or tooling specifics.
219- If web access is unavailable, keep external product guidance marked as unverified.
220
221## Learnings Loop
222
223Before applying this skill on a non-trivial task, read `learnings.consolidated.md` in this directory (and `learnings.md` if present).
224
225After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to `learnings.md` via `agents-skills-feedback-loop/scripts/append_learning.py`. Do not modify `SKILL.md` itself.
226