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