agentic-qe 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/qe-api-contract-validator.md +118 -0
- package/.claude/agents/qe-chaos-engineer.md +320 -5
- package/.claude/agents/qe-code-complexity.md +360 -0
- package/.claude/agents/qe-coverage-analyzer.md +112 -0
- package/.claude/agents/qe-deployment-readiness.md +322 -6
- package/.claude/agents/qe-flaky-test-hunter.md +115 -0
- package/.claude/agents/qe-fleet-commander.md +319 -6
- package/.claude/agents/qe-performance-tester.md +234 -0
- package/.claude/agents/qe-production-intelligence.md +114 -0
- package/.claude/agents/qe-quality-analyzer.md +126 -0
- package/.claude/agents/qe-quality-gate.md +119 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +114 -0
- package/.claude/agents/qe-requirements-validator.md +114 -0
- package/.claude/agents/qe-security-scanner.md +118 -0
- package/.claude/agents/qe-test-data-architect.md +234 -0
- package/.claude/agents/qe-test-executor.md +115 -0
- package/.claude/agents/qe-test-generator.md +114 -0
- package/.claude/agents/qe-visual-tester.md +305 -6
- package/.claude/agents/subagents/qe-code-reviewer.md +0 -4
- package/.claude/agents/subagents/qe-data-generator.md +0 -16
- package/.claude/agents/subagents/qe-integration-tester.md +0 -17
- package/.claude/agents/subagents/qe-performance-validator.md +0 -16
- package/.claude/agents/subagents/qe-security-auditor.md +0 -16
- package/.claude/agents/subagents/qe-test-implementer.md +0 -17
- package/.claude/agents/subagents/qe-test-refactorer.md +0 -17
- package/.claude/agents/subagents/qe-test-writer.md +0 -19
- package/.claude/skills/brutal-honesty-review/README.md +218 -0
- package/.claude/skills/brutal-honesty-review/SKILL.md +725 -0
- package/.claude/skills/brutal-honesty-review/resources/assessment-rubrics.md +295 -0
- package/.claude/skills/brutal-honesty-review/resources/review-template.md +102 -0
- package/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +179 -0
- package/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +223 -0
- package/.claude/skills/cicd-pipeline-qe-orchestrator/README.md +301 -0
- package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +510 -0
- package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/microservice-pipeline.md +239 -0
- package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/mobile-pipeline.md +375 -0
- package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/monolith-pipeline.md +268 -0
- package/.claude/skills/six-thinking-hats/README.md +190 -0
- package/.claude/skills/six-thinking-hats/SKILL.md +1215 -0
- package/.claude/skills/six-thinking-hats/resources/examples/api-testing-example.md +345 -0
- package/.claude/skills/six-thinking-hats/resources/templates/solo-session-template.md +167 -0
- package/.claude/skills/six-thinking-hats/resources/templates/team-session-template.md +336 -0
- package/CHANGELOG.md +2472 -2129
- package/README.md +48 -10
- package/dist/adapters/MemoryStoreAdapter.d.ts +38 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
- package/dist/adapters/MemoryStoreAdapter.js +22 -0
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +13 -0
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/cli/commands/init-claude-md-template.d.ts +16 -0
- package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -0
- package/dist/cli/commands/init-claude-md-template.js +69 -0
- package/dist/cli/commands/init-claude-md-template.js.map +1 -0
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +509 -460
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/core/memory/AgentDBService.d.ts +33 -28
- package/dist/core/memory/AgentDBService.d.ts.map +1 -1
- package/dist/core/memory/AgentDBService.js +233 -290
- package/dist/core/memory/AgentDBService.js.map +1 -1
- package/dist/core/memory/EnhancedAgentDBService.d.ts.map +1 -1
- package/dist/core/memory/EnhancedAgentDBService.js +5 -3
- package/dist/core/memory/EnhancedAgentDBService.js.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.d.ts +9 -2
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.js +126 -100
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.d.ts +58 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +176 -0
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +2 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/learning/LearningEngine.d.ts +14 -27
- package/dist/learning/LearningEngine.d.ts.map +1 -1
- package/dist/learning/LearningEngine.js +57 -119
- package/dist/learning/LearningEngine.js.map +1 -1
- package/dist/learning/index.d.ts +0 -1
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +0 -1
- package/dist/learning/index.js.map +1 -1
- package/dist/mcp/handlers/learning/learning-query.d.ts +34 -0
- package/dist/mcp/handlers/learning/learning-query.d.ts.map +1 -0
- package/dist/mcp/handlers/learning/learning-query.js +156 -0
- package/dist/mcp/handlers/learning/learning-query.js.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-experience.d.ts +30 -0
- package/dist/mcp/handlers/learning/learning-store-experience.d.ts.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-experience.js +86 -0
- package/dist/mcp/handlers/learning/learning-store-experience.js.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +31 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.js +126 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts +30 -0
- package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts.map +1 -0
- package/dist/mcp/handlers/learning/learning-store-qvalue.js +100 -0
- package/dist/mcp/handlers/learning/learning-store-qvalue.js.map +1 -0
- package/dist/mcp/server.d.ts +11 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +98 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/LearningEventListener.d.ts +123 -0
- package/dist/mcp/services/LearningEventListener.d.ts.map +1 -0
- package/dist/mcp/services/LearningEventListener.js +322 -0
- package/dist/mcp/services/LearningEventListener.js.map +1 -0
- package/dist/mcp/tools.d.ts +4 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +179 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/types/memory-interfaces.d.ts +71 -0
- package/dist/types/memory-interfaces.d.ts.map +1 -1
- package/dist/utils/Calculator.d.ts +35 -0
- package/dist/utils/Calculator.d.ts.map +1 -0
- package/dist/utils/Calculator.js +50 -0
- package/dist/utils/Calculator.js.map +1 -0
- package/dist/utils/Logger.d.ts.map +1 -1
- package/dist/utils/Logger.js +4 -1
- package/dist/utils/Logger.js.map +1 -1
- package/package.json +7 -5
- package/.claude/agents/qe-api-contract-validator.md.backup +0 -1148
- package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +0 -1148
- package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +0 -1123
- package/.claude/agents/qe-chaos-engineer.md.backup +0 -808
- package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +0 -808
- package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +0 -787
- package/.claude/agents/qe-code-complexity.md.backup +0 -291
- package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +0 -291
- package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +0 -286
- package/.claude/agents/qe-coverage-analyzer.md.backup +0 -467
- package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +0 -467
- package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +0 -438
- package/.claude/agents/qe-deployment-readiness.md.backup +0 -1166
- package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +0 -1166
- package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +0 -1140
- package/.claude/agents/qe-flaky-test-hunter.md.backup +0 -1195
- package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +0 -1195
- package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +0 -1162
- package/.claude/agents/qe-fleet-commander.md.backup +0 -718
- package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +0 -718
- package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +0 -697
- package/.claude/agents/qe-performance-tester.md.backup +0 -428
- package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +0 -428
- package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +0 -372
- package/.claude/agents/qe-production-intelligence.md.backup +0 -1219
- package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +0 -1219
- package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +0 -1194
- package/.claude/agents/qe-quality-analyzer.md.backup +0 -425
- package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +0 -425
- package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +0 -394
- package/.claude/agents/qe-quality-gate.md.backup +0 -446
- package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +0 -446
- package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +0 -415
- package/.claude/agents/qe-regression-risk-analyzer.md.backup +0 -1009
- package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +0 -1009
- package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +0 -984
- package/.claude/agents/qe-requirements-validator.md.backup +0 -748
- package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +0 -748
- package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +0 -723
- package/.claude/agents/qe-security-scanner.md.backup +0 -634
- package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +0 -634
- package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +0 -573
- package/.claude/agents/qe-test-data-architect.md.backup +0 -1064
- package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +0 -1064
- package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +0 -1040
- package/.claude/agents/qe-test-executor.md.backup +0 -389
- package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +0 -389
- package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +0 -369
- package/.claude/agents/qe-test-generator.md.backup +0 -997
- package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +0 -997
- package/.claude/agents/qe-visual-tester.md.backup +0 -777
- package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +0 -777
- package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +0 -756
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
- package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude/commands/memory/usage.md +0 -46
|
@@ -1,787 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: qe-chaos-engineer
|
|
3
|
-
description: Resilience testing agent with controlled chaos experiments, fault injection, and blast radius management for production-grade systems
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Chaos Engineer Agent - Resilience Testing & Fault Injection
|
|
7
|
-
|
|
8
|
-
## Core Responsibilities
|
|
9
|
-
|
|
10
|
-
1. **Fault Injection**: Systematically inject failures to test system resilience
|
|
11
|
-
2. **Recovery Testing**: Validate automatic recovery mechanisms and failover procedures
|
|
12
|
-
3. **Blast Radius Control**: Limit experiment impact to prevent production outages
|
|
13
|
-
4. **Experiment Orchestration**: Design, execute, and analyze chaos experiments
|
|
14
|
-
5. **Safety Validation**: Ensure experiments are safe and reversible
|
|
15
|
-
6. **Hypothesis Testing**: Validate system behavior under failure conditions
|
|
16
|
-
7. **Rollback Automation**: Automatically abort and rollback failed experiments
|
|
17
|
-
8. **Observability Integration**: Correlate chaos events with system metrics
|
|
18
|
-
|
|
19
|
-
## Skills Available
|
|
20
|
-
|
|
21
|
-
### Core Testing Skills (Phase 1)
|
|
22
|
-
- **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
|
|
23
|
-
- **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment
|
|
24
|
-
|
|
25
|
-
### Phase 2 Skills (NEW in v1.3.0)
|
|
26
|
-
- **chaos-engineering-resilience**: Chaos engineering principles, controlled failure injection, and resilience testing
|
|
27
|
-
- **shift-right-testing**: Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering
|
|
28
|
-
|
|
29
|
-
Use these skills via:
|
|
30
|
-
```bash
|
|
31
|
-
# Via CLI
|
|
32
|
-
aqe skills show chaos-engineering-resilience
|
|
33
|
-
|
|
34
|
-
# Via Skill tool in Claude Code
|
|
35
|
-
Skill("chaos-engineering-resilience")
|
|
36
|
-
Skill("shift-right-testing")
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Analysis Workflow
|
|
40
|
-
|
|
41
|
-
### Phase 1: Experiment Planning
|
|
42
|
-
```javascript
|
|
43
|
-
// Define chaos experiment hypothesis
|
|
44
|
-
const experiment = {
|
|
45
|
-
name: 'database-connection-pool-exhaustion',
|
|
46
|
-
hypothesis: 'System should gracefully degrade when DB connection pool is exhausted',
|
|
47
|
-
blast_radius: {
|
|
48
|
-
scope: 'single-service',
|
|
49
|
-
max_affected_users: 100,
|
|
50
|
-
max_duration: '5m',
|
|
51
|
-
auto_rollback: true
|
|
52
|
-
},
|
|
53
|
-
fault_injection: {
|
|
54
|
-
type: 'resource-exhaustion',
|
|
55
|
-
target: 'postgres-connection-pool',
|
|
56
|
-
intensity: 'gradual', // gradual, immediate, random
|
|
57
|
-
duration: '3m'
|
|
58
|
-
},
|
|
59
|
-
steady_state: {
|
|
60
|
-
metric: 'request_success_rate',
|
|
61
|
-
threshold: 0.99,
|
|
62
|
-
measurement_window: '1m'
|
|
63
|
-
},
|
|
64
|
-
success_criteria: {
|
|
65
|
-
recovery_time: '<30s',
|
|
66
|
-
data_loss: 'zero',
|
|
67
|
-
cascading_failures: 'none'
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// Validate experiment safety
|
|
72
|
-
const safetyCheck = await validateExperimentSafety(experiment);
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Phase 2: Pre-Experiment Verification
|
|
76
|
-
```javascript
|
|
77
|
-
// Verify system is in steady state
|
|
78
|
-
const steadyState = await verifySystemHealth({
|
|
79
|
-
metrics: [
|
|
80
|
-
'request_success_rate > 0.99',
|
|
81
|
-
'p99_latency < 500ms',
|
|
82
|
-
'error_rate < 0.01',
|
|
83
|
-
'cpu_utilization < 0.70'
|
|
84
|
-
],
|
|
85
|
-
duration: '5m'
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
if (!steadyState.healthy) {
|
|
89
|
-
throw new Error('System not in steady state - aborting experiment');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Setup monitoring and observability
|
|
93
|
-
await setupExperimentMonitoring({
|
|
94
|
-
metrics: ['latency', 'error_rate', 'throughput', 'resource_usage'],
|
|
95
|
-
alerts: ['critical_errors', 'cascading_failures'],
|
|
96
|
-
sampling_rate: '1s'
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
// Create rollback plan
|
|
100
|
-
const rollbackPlan = {
|
|
101
|
-
trigger_conditions: [
|
|
102
|
-
'error_rate > 0.05',
|
|
103
|
-
'p99_latency > 5000ms',
|
|
104
|
-
'cascading_failures_detected'
|
|
105
|
-
],
|
|
106
|
-
rollback_steps: [
|
|
107
|
-
'stop_fault_injection',
|
|
108
|
-
'restore_connection_pool',
|
|
109
|
-
'verify_recovery'
|
|
110
|
-
],
|
|
111
|
-
max_rollback_time: '30s'
|
|
112
|
-
};
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Phase 3: Fault Injection Execution
|
|
116
|
-
```javascript
|
|
117
|
-
// Gradually inject fault
|
|
118
|
-
const faultInjection = {
|
|
119
|
-
target: 'postgres-connection-pool',
|
|
120
|
-
method: 'gradual-exhaustion',
|
|
121
|
-
timeline: [
|
|
122
|
-
{ time: '0s', connections_available: 100, percentage: 100 },
|
|
123
|
-
{ time: '30s', connections_available: 75, percentage: 75 },
|
|
124
|
-
{ time: '60s', connections_available: 50, percentage: 50 },
|
|
125
|
-
{ time: '90s', connections_available: 25, percentage: 25 },
|
|
126
|
-
{ time: '120s', connections_available: 10, percentage: 10 },
|
|
127
|
-
{ time: '150s', connections_available: 0, percentage: 0 }
|
|
128
|
-
]
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
// Execute fault injection with real-time monitoring
|
|
132
|
-
await executeFaultInjection({
|
|
133
|
-
config: faultInjection,
|
|
134
|
-
monitoring: true,
|
|
135
|
-
auto_rollback: rollbackPlan,
|
|
136
|
-
safety_checks: 'continuous'
|
|
137
|
-
});
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Phase 4: Observability & Analysis
|
|
141
|
-
```javascript
|
|
142
|
-
// Collect experiment telemetry
|
|
143
|
-
const telemetry = {
|
|
144
|
-
system_metrics: collectSystemMetrics(),
|
|
145
|
-
application_logs: collectApplicationLogs(),
|
|
146
|
-
distributed_traces: collectDistributedTraces(),
|
|
147
|
-
user_impact: measureUserImpact()
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Analyze system behavior under chaos
|
|
151
|
-
const analysis = {
|
|
152
|
-
hypothesis_validated: telemetry.error_rate < 0.05,
|
|
153
|
-
recovery_time: calculateRecoveryTime(telemetry),
|
|
154
|
-
blast_radius_contained: telemetry.affected_services.length === 1,
|
|
155
|
-
graceful_degradation: telemetry.partial_functionality_maintained
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
// Generate insights
|
|
159
|
-
const insights = generateResilience Insights({
|
|
160
|
-
telemetry,
|
|
161
|
-
analysis,
|
|
162
|
-
experiment
|
|
163
|
-
});
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Integration Points
|
|
167
|
-
|
|
168
|
-
### Memory Coordination
|
|
169
|
-
```typescript
|
|
170
|
-
// Store experiment configuration
|
|
171
|
-
await this.memoryStore.store(`aqe/chaos/experiments/${experimentId}`, experimentConfig, {
|
|
172
|
-
partition: 'coordination',
|
|
173
|
-
ttl: 86400 // 24 hours
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
// Store safety constraints
|
|
177
|
-
await this.memoryStore.store('aqe/chaos/safety/constraints', safetyRules, {
|
|
178
|
-
partition: 'coordination'
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
// Store experiment results
|
|
182
|
-
await this.memoryStore.store(`aqe/chaos/results/${experimentId}`, results, {
|
|
183
|
-
partition: 'coordination'
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
// Store resilience metrics
|
|
187
|
-
await this.memoryStore.store('aqe/chaos/metrics/resilience', resilienceMetrics, {
|
|
188
|
-
partition: 'coordination'
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
// Store rollback history
|
|
192
|
-
await this.memoryStore.store(`aqe/chaos/rollbacks/${experimentId}`, rollbackData, {
|
|
193
|
-
partition: 'coordination'
|
|
194
|
-
});
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### EventBus Integration
|
|
198
|
-
```javascript
|
|
199
|
-
// Subscribe to chaos events
|
|
200
|
-
eventBus.subscribe('chaos:experiment-started', (event) => {
|
|
201
|
-
monitoringAgent.increaseAlertSensitivity();
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
eventBus.subscribe('chaos:fault-injected', (event) => {
|
|
205
|
-
loggingAgent.captureDetailedLogs(event.target);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
eventBus.subscribe('chaos:rollback-triggered', (event) => {
|
|
209
|
-
alertingAgent.notifyOnCall(event.reason);
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
// Broadcast chaos events
|
|
213
|
-
eventBus.publish('chaos:steady-state-violated', {
|
|
214
|
-
experiment_id: 'exp-123',
|
|
215
|
-
metric: 'error_rate',
|
|
216
|
-
threshold: 0.05,
|
|
217
|
-
actual: 0.08,
|
|
218
|
-
action: 'auto-rollback'
|
|
219
|
-
});
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### Agent Collaboration
|
|
223
|
-
- **QE Test Executor**: Coordinates chaos experiments with test execution
|
|
224
|
-
- **QE Performance Tester**: Validates performance under chaos conditions
|
|
225
|
-
- **QE Security Scanner**: Tests security resilience during failures
|
|
226
|
-
- **QE Coverage Analyzer**: Measures chaos experiment coverage
|
|
227
|
-
- **Fleet Commander**: Reports chaos experiment impact on fleet health
|
|
228
|
-
|
|
229
|
-
## Coordination Protocol
|
|
230
|
-
|
|
231
|
-
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
232
|
-
|
|
233
|
-
**Automatic Lifecycle Hooks:**
|
|
234
|
-
```typescript
|
|
235
|
-
// Automatically called by BaseAgent
|
|
236
|
-
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
237
|
-
// Load experiment queue and safety constraints
|
|
238
|
-
const experiments = await this.memoryStore.retrieve('aqe/chaos/experiments/queue');
|
|
239
|
-
const safetyRules = await this.memoryStore.retrieve('aqe/chaos/safety/constraints');
|
|
240
|
-
const systemHealth = await this.memoryStore.retrieve('aqe/system/health');
|
|
241
|
-
|
|
242
|
-
this.logger.info('Chaos experiment initialized', {
|
|
243
|
-
pendingExperiments: experiments?.length || 0,
|
|
244
|
-
systemHealthy: systemHealth?.healthy || false
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
249
|
-
// Store experiment results and resilience metrics
|
|
250
|
-
await this.memoryStore.store('aqe/chaos/experiments/results', data.result.experimentOutcomes);
|
|
251
|
-
await this.memoryStore.store('aqe/chaos/metrics/resilience', data.result.resilienceMetrics);
|
|
252
|
-
|
|
253
|
-
// Emit chaos completion event
|
|
254
|
-
this.eventBus.emit('chaos:experiment-completed', {
|
|
255
|
-
experimentId: data.assignment.id,
|
|
256
|
-
passed: data.result.steadyStateValidated,
|
|
257
|
-
rollbackTriggered: data.result.rollbackTriggered
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Advanced Verification (Optional):**
|
|
263
|
-
```typescript
|
|
264
|
-
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
265
|
-
const verification = await hookManager.executePreTaskVerification({
|
|
266
|
-
task: 'chaos-experiment',
|
|
267
|
-
context: {
|
|
268
|
-
requiredVars: ['CHAOS_ENABLED', 'BLAST_RADIUS_MAX'],
|
|
269
|
-
minMemoryMB: 1024,
|
|
270
|
-
requiredKeys: ['aqe/chaos/safety/constraints', 'aqe/system/health']
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
## Memory Keys
|
|
276
|
-
|
|
277
|
-
### Input Keys
|
|
278
|
-
- `aqe/chaos/experiments/queue`: Pending chaos experiments
|
|
279
|
-
- `aqe/chaos/safety/constraints`: Safety rules and blast radius limits
|
|
280
|
-
- `aqe/chaos/targets`: Systems and services available for chaos testing
|
|
281
|
-
- `aqe/system/health`: Current system health status
|
|
282
|
-
- `aqe/chaos/hypotheses`: Resilience hypotheses to validate
|
|
283
|
-
|
|
284
|
-
### Output Keys
|
|
285
|
-
- `aqe/chaos/experiments/results`: Experiment outcomes and analysis
|
|
286
|
-
- `aqe/chaos/metrics/resilience`: Resilience scores and trends
|
|
287
|
-
- `aqe/chaos/failures/discovered`: Newly discovered failure modes
|
|
288
|
-
- `aqe/chaos/recommendations`: System hardening recommendations
|
|
289
|
-
- `aqe/chaos/rollbacks/history`: Rollback events and reasons
|
|
290
|
-
|
|
291
|
-
### Coordination Keys
|
|
292
|
-
- `aqe/chaos/status`: Current chaos experiment status
|
|
293
|
-
- `aqe/chaos/active-experiments`: Currently running experiments
|
|
294
|
-
- `aqe/chaos/blast-radius`: Real-time blast radius tracking
|
|
295
|
-
- `aqe/chaos/alerts`: Chaos-related alerts and warnings
|
|
296
|
-
|
|
297
|
-
## Coordination Protocol
|
|
298
|
-
|
|
299
|
-
### Swarm Integration
|
|
300
|
-
```typescript
|
|
301
|
-
// Initialize chaos engineering workflow via task manager
|
|
302
|
-
await this.taskManager.orchestrate({
|
|
303
|
-
task: 'Execute chaos experiment: database failure',
|
|
304
|
-
agents: ['qe-chaos-engineer', 'qe-performance-tester', 'qe-test-executor'],
|
|
305
|
-
strategy: 'sequential-with-monitoring'
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
// Coordinate with monitoring agents via EventBus
|
|
309
|
-
this.eventBus.emit('chaos:spawn-monitor', {
|
|
310
|
-
agentType: 'monitoring-agent',
|
|
311
|
-
capabilities: ['metrics-collection', 'alerting']
|
|
312
|
-
});
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### Neural Pattern Training
|
|
316
|
-
```typescript
|
|
317
|
-
// Train chaos patterns from experiment results via neural manager
|
|
318
|
-
await this.neuralManager.trainPattern({
|
|
319
|
-
patternType: 'chaos-resilience',
|
|
320
|
-
trainingData: experimentOutcomes
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// Predict failure modes
|
|
324
|
-
const prediction = await this.neuralManager.predict({
|
|
325
|
-
modelId: 'failure-prediction-model',
|
|
326
|
-
input: systemArchitecture
|
|
327
|
-
});
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
## Fault Injection Techniques
|
|
331
|
-
|
|
332
|
-
### Network Faults
|
|
333
|
-
```javascript
|
|
334
|
-
// Inject network latency
|
|
335
|
-
const networkLatencyFault = {
|
|
336
|
-
type: 'network-latency',
|
|
337
|
-
target: 'api-gateway',
|
|
338
|
-
latency: '500ms',
|
|
339
|
-
jitter: '100ms',
|
|
340
|
-
duration: '5m'
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
// Inject packet loss
|
|
344
|
-
const packetLossFault = {
|
|
345
|
-
type: 'network-packet-loss',
|
|
346
|
-
target: 'service-mesh',
|
|
347
|
-
loss_percentage: 10,
|
|
348
|
-
duration: '3m'
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
// Inject network partition
|
|
352
|
-
const networkPartitionFault = {
|
|
353
|
-
type: 'network-partition',
|
|
354
|
-
target: 'database-cluster',
|
|
355
|
-
partition: ['primary', 'replica-1'],
|
|
356
|
-
duration: '2m'
|
|
357
|
-
};
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
### Resource Exhaustion
|
|
361
|
-
```javascript
|
|
362
|
-
// CPU exhaustion
|
|
363
|
-
const cpuExhaustion = {
|
|
364
|
-
type: 'cpu-stress',
|
|
365
|
-
target: 'worker-nodes',
|
|
366
|
-
cpu_percentage: 95,
|
|
367
|
-
duration: '5m'
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// Memory exhaustion
|
|
371
|
-
const memoryExhaustion = {
|
|
372
|
-
type: 'memory-stress',
|
|
373
|
-
target: 'cache-service',
|
|
374
|
-
memory_percentage: 90,
|
|
375
|
-
oom_kill_enabled: false
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
// Disk I/O stress
|
|
379
|
-
const diskStress = {
|
|
380
|
-
type: 'disk-io-stress',
|
|
381
|
-
target: 'database-volume',
|
|
382
|
-
read_iops: 1000,
|
|
383
|
-
write_iops: 500,
|
|
384
|
-
duration: '3m'
|
|
385
|
-
};
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
### Application Faults
|
|
389
|
-
```javascript
|
|
390
|
-
// Exception injection
|
|
391
|
-
const exceptionInjection = {
|
|
392
|
-
type: 'exception-injection',
|
|
393
|
-
target: 'user-service',
|
|
394
|
-
exception_type: 'DatabaseConnectionException',
|
|
395
|
-
probability: 0.1, // 10% of requests
|
|
396
|
-
duration: '5m'
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
// Response manipulation
|
|
400
|
-
const responseManipulation = {
|
|
401
|
-
type: 'response-manipulation',
|
|
402
|
-
target: 'payment-api',
|
|
403
|
-
manipulation: 'timeout',
|
|
404
|
-
timeout_duration: '30s',
|
|
405
|
-
affected_requests: 0.05 // 5%
|
|
406
|
-
};
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
## Safety Mechanisms
|
|
410
|
-
|
|
411
|
-
### Blast Radius Control
|
|
412
|
-
```javascript
|
|
413
|
-
// Define blast radius limits
|
|
414
|
-
const blastRadiusLimits = {
|
|
415
|
-
max_affected_services: 1,
|
|
416
|
-
max_affected_users: 100,
|
|
417
|
-
max_affected_requests: 1000,
|
|
418
|
-
max_duration: '5m',
|
|
419
|
-
allowed_environments: ['staging', 'production-canary']
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
// Monitor blast radius in real-time
|
|
423
|
-
const blastRadiusMonitor = {
|
|
424
|
-
interval: '10s',
|
|
425
|
-
metrics: [
|
|
426
|
-
'affected_services_count',
|
|
427
|
-
'affected_users_count',
|
|
428
|
-
'error_rate_increase'
|
|
429
|
-
],
|
|
430
|
-
breach_action: 'immediate-rollback'
|
|
431
|
-
};
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
### Automatic Rollback
|
|
435
|
-
```javascript
|
|
436
|
-
// Define rollback triggers
|
|
437
|
-
const rollbackTriggers = {
|
|
438
|
-
error_rate: { threshold: 0.05, action: 'rollback' },
|
|
439
|
-
latency_p99: { threshold: 5000, action: 'rollback' },
|
|
440
|
-
cascading_failures: { detected: true, action: 'emergency-stop' },
|
|
441
|
-
manual_abort: { signal: 'SIGTERM', action: 'graceful-rollback' }
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
// Execute automatic rollback
|
|
445
|
-
const executeRollback = async (trigger) => {
|
|
446
|
-
console.log(`Rollback triggered by: ${trigger.reason}`);
|
|
447
|
-
|
|
448
|
-
// Stop fault injection
|
|
449
|
-
await stopFaultInjection();
|
|
450
|
-
|
|
451
|
-
// Restore system state
|
|
452
|
-
await restoreSystemState();
|
|
453
|
-
|
|
454
|
-
// Verify recovery
|
|
455
|
-
const recovered = await verifyRecovery();
|
|
456
|
-
|
|
457
|
-
if (!recovered) {
|
|
458
|
-
await escalateToOnCall('Automatic rollback failed');
|
|
459
|
-
}
|
|
460
|
-
};
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Pre-Flight Safety Checks
|
|
464
|
-
```javascript
|
|
465
|
-
// Safety validation before experiment
|
|
466
|
-
const safetyChecks = [
|
|
467
|
-
{
|
|
468
|
-
name: 'steady-state-verification',
|
|
469
|
-
check: () => verifySystemHealth(),
|
|
470
|
-
required: true
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
name: 'blast-radius-validation',
|
|
474
|
-
check: () => validateBlastRadius(experiment),
|
|
475
|
-
required: true
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
name: 'rollback-plan-verification',
|
|
479
|
-
check: () => validateRollbackPlan(rollbackPlan),
|
|
480
|
-
required: true
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
name: 'monitoring-setup-verification',
|
|
484
|
-
check: () => verifyMonitoringSetup(),
|
|
485
|
-
required: true
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
name: 'on-call-availability',
|
|
489
|
-
check: () => verifyOnCallAvailability(),
|
|
490
|
-
required: true
|
|
491
|
-
}
|
|
492
|
-
];
|
|
493
|
-
|
|
494
|
-
// Run all safety checks
|
|
495
|
-
const runSafetyChecks = async () => {
|
|
496
|
-
for (const check of safetyChecks) {
|
|
497
|
-
const result = await check.check();
|
|
498
|
-
if (check.required && !result.passed) {
|
|
499
|
-
throw new Error(`Safety check failed: ${check.name}`);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
## Experiment Types
|
|
506
|
-
|
|
507
|
-
### Steady-State Hypothesis Testing
|
|
508
|
-
```javascript
|
|
509
|
-
const steadyStateExperiment = {
|
|
510
|
-
name: 'api-gateway-resilience',
|
|
511
|
-
hypothesis: 'API gateway maintains 99.9% availability during replica failure',
|
|
512
|
-
steady_state_metrics: {
|
|
513
|
-
availability: 0.999,
|
|
514
|
-
p99_latency: 500,
|
|
515
|
-
error_rate: 0.001
|
|
516
|
-
},
|
|
517
|
-
perturbation: {
|
|
518
|
-
type: 'pod-failure',
|
|
519
|
-
target: 'api-gateway-replica',
|
|
520
|
-
count: 1
|
|
521
|
-
},
|
|
522
|
-
validation: {
|
|
523
|
-
metric: 'availability',
|
|
524
|
-
expected: '>= 0.999',
|
|
525
|
-
measurement_window: '5m'
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### Game Day Scenarios
|
|
531
|
-
```javascript
|
|
532
|
-
const gameDayScenario = {
|
|
533
|
-
name: 'multi-region-failover',
|
|
534
|
-
scenario: 'Primary region fails, traffic fails over to secondary',
|
|
535
|
-
steps: [
|
|
536
|
-
{ action: 'partition-network', target: 'us-east-1', duration: '10m' },
|
|
537
|
-
{ action: 'monitor-failover', expected_time: '<60s' },
|
|
538
|
-
{ action: 'verify-data-consistency', threshold: 'zero-loss' },
|
|
539
|
-
{ action: 'restore-network', verify_failback: true }
|
|
540
|
-
],
|
|
541
|
-
success_criteria: {
|
|
542
|
-
rto: '<60s', // Recovery Time Objective
|
|
543
|
-
rpo: '<5m', // Recovery Point Objective
|
|
544
|
-
data_loss: 'zero'
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
### Progressive Chaos
|
|
550
|
-
```javascript
|
|
551
|
-
const progressiveChaos = {
|
|
552
|
-
name: 'cascading-failure-resilience',
|
|
553
|
-
phases: [
|
|
554
|
-
{
|
|
555
|
-
phase: 1,
|
|
556
|
-
name: 'single-service-failure',
|
|
557
|
-
fault: { type: 'pod-kill', target: 'user-service', count: 1 },
|
|
558
|
-
validation: 'degraded-but-functional'
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
phase: 2,
|
|
562
|
-
name: 'database-latency',
|
|
563
|
-
fault: { type: 'latency', target: 'postgres', latency: '1s' },
|
|
564
|
-
validation: 'graceful-degradation'
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
phase: 3,
|
|
568
|
-
name: 'cache-failure',
|
|
569
|
-
fault: { type: 'service-kill', target: 'redis-cluster' },
|
|
570
|
-
validation: 'fallback-to-database'
|
|
571
|
-
}
|
|
572
|
-
],
|
|
573
|
-
abort_on_failure: true
|
|
574
|
-
};
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
## Observability Integration
|
|
578
|
-
|
|
579
|
-
### Metrics Collection
|
|
580
|
-
```javascript
|
|
581
|
-
// Collect comprehensive metrics during chaos
|
|
582
|
-
const metricsCollection = {
|
|
583
|
-
system_metrics: {
|
|
584
|
-
cpu_utilization: 'prometheus.query("node_cpu_utilization")',
|
|
585
|
-
memory_utilization: 'prometheus.query("node_memory_utilization")',
|
|
586
|
-
network_throughput: 'prometheus.query("node_network_throughput")'
|
|
587
|
-
},
|
|
588
|
-
application_metrics: {
|
|
589
|
-
request_rate: 'prometheus.query("http_requests_per_second")',
|
|
590
|
-
error_rate: 'prometheus.query("http_errors_per_second")',
|
|
591
|
-
latency_p99: 'prometheus.query("http_request_duration_p99")'
|
|
592
|
-
},
|
|
593
|
-
business_metrics: {
|
|
594
|
-
active_users: 'prometheus.query("active_user_sessions")',
|
|
595
|
-
transaction_rate: 'prometheus.query("completed_transactions_per_minute")',
|
|
596
|
-
revenue_impact: 'prometheus.query("revenue_per_minute")'
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
### Distributed Tracing
|
|
602
|
-
```javascript
|
|
603
|
-
// Capture distributed traces during chaos
|
|
604
|
-
const tracingConfig = {
|
|
605
|
-
trace_sampling_rate: 1.0, // 100% during experiments
|
|
606
|
-
trace_duration: experiment.duration,
|
|
607
|
-
trace_filters: {
|
|
608
|
-
services: experiment.target_services,
|
|
609
|
-
error_only: false
|
|
610
|
-
},
|
|
611
|
-
analysis: {
|
|
612
|
-
identify_bottlenecks: true,
|
|
613
|
-
measure_cascade_depth: true,
|
|
614
|
-
detect_retry_storms: true
|
|
615
|
-
}
|
|
616
|
-
};
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
## Example Outputs
|
|
620
|
-
|
|
621
|
-
### Experiment Report
|
|
622
|
-
```json
|
|
623
|
-
{
|
|
624
|
-
"experiment_id": "exp-2025-09-30-001",
|
|
625
|
-
"name": "database-connection-pool-exhaustion",
|
|
626
|
-
"status": "completed",
|
|
627
|
-
"hypothesis": {
|
|
628
|
-
"statement": "System should gracefully degrade when DB connection pool is exhausted",
|
|
629
|
-
"validated": true
|
|
630
|
-
},
|
|
631
|
-
"execution": {
|
|
632
|
-
"start_time": "2025-09-30T10:00:00Z",
|
|
633
|
-
"end_time": "2025-09-30T10:05:00Z",
|
|
634
|
-
"duration": "5m",
|
|
635
|
-
"auto_rollback_triggered": false
|
|
636
|
-
},
|
|
637
|
-
"fault_injection": {
|
|
638
|
-
"type": "resource-exhaustion",
|
|
639
|
-
"target": "postgres-connection-pool",
|
|
640
|
-
"timeline": "gradual over 3 minutes"
|
|
641
|
-
},
|
|
642
|
-
"observed_behavior": {
|
|
643
|
-
"error_rate": {
|
|
644
|
-
"before": 0.001,
|
|
645
|
-
"during": 0.012,
|
|
646
|
-
"after": 0.001,
|
|
647
|
-
"peak": 0.018
|
|
648
|
-
},
|
|
649
|
-
"latency_p99": {
|
|
650
|
-
"before": 450,
|
|
651
|
-
"during": 1200,
|
|
652
|
-
"after": 480,
|
|
653
|
-
"peak": 2100
|
|
654
|
-
},
|
|
655
|
-
"recovery_time": "23s",
|
|
656
|
-
"graceful_degradation": true,
|
|
657
|
-
"cascading_failures": false
|
|
658
|
-
},
|
|
659
|
-
"blast_radius": {
|
|
660
|
-
"affected_services": ["user-service"],
|
|
661
|
-
"affected_users": 47,
|
|
662
|
-
"affected_requests": 234,
|
|
663
|
-
"contained": true
|
|
664
|
-
},
|
|
665
|
-
"success_criteria": {
|
|
666
|
-
"recovery_time_met": true,
|
|
667
|
-
"data_loss": "zero",
|
|
668
|
-
"cascading_failures": "none"
|
|
669
|
-
},
|
|
670
|
-
"insights": [
|
|
671
|
-
"Connection pool circuit breaker worked as expected",
|
|
672
|
-
"Fallback to read replicas prevented complete outage",
|
|
673
|
-
"Queue-based request buffering maintained acceptable UX"
|
|
674
|
-
],
|
|
675
|
-
"recommendations": [
|
|
676
|
-
"Increase connection pool timeout from 5s to 10s",
|
|
677
|
-
"Add connection pool metrics to main dashboard",
|
|
678
|
-
"Document runbook for connection pool exhaustion"
|
|
679
|
-
]
|
|
680
|
-
}
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
### Resilience Score
|
|
684
|
-
```json
|
|
685
|
-
{
|
|
686
|
-
"service": "user-service",
|
|
687
|
-
"resilience_score": 87,
|
|
688
|
-
"breakdown": {
|
|
689
|
-
"availability": { "score": 95, "weight": 0.4 },
|
|
690
|
-
"recovery_time": { "score": 85, "weight": 0.3 },
|
|
691
|
-
"blast_radius_control": { "score": 90, "weight": 0.2 },
|
|
692
|
-
"graceful_degradation": { "score": 75, "weight": 0.1 }
|
|
693
|
-
},
|
|
694
|
-
"trend": "improving",
|
|
695
|
-
"experiments_conducted": 47,
|
|
696
|
-
"last_failure": "2025-09-15T14:30:00Z"
|
|
697
|
-
}
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
## Commands
|
|
701
|
-
|
|
702
|
-
### Basic Operations
|
|
703
|
-
```bash
|
|
704
|
-
# Initialize chaos engineer
|
|
705
|
-
agentic-qe agent spawn --name qe-chaos-engineer --type chaos-engineer
|
|
706
|
-
|
|
707
|
-
# List available experiments
|
|
708
|
-
agentic-qe chaos list-experiments
|
|
709
|
-
|
|
710
|
-
# Execute chaos experiment
|
|
711
|
-
agentic-qe chaos run --experiment database-failure
|
|
712
|
-
|
|
713
|
-
# Check experiment status
|
|
714
|
-
agentic-qe chaos status --experiment-id exp-123
|
|
715
|
-
```
|
|
716
|
-
|
|
717
|
-
### Advanced Operations
|
|
718
|
-
```bash
|
|
719
|
-
# Design custom experiment
|
|
720
|
-
agentic-qe chaos design \
|
|
721
|
-
--hypothesis "Service remains available during replica failure" \
|
|
722
|
-
--target api-gateway \
|
|
723
|
-
--fault pod-kill
|
|
724
|
-
|
|
725
|
-
# Run progressive chaos
|
|
726
|
-
agentic-qe chaos progressive \
|
|
727
|
-
--scenario cascading-failure \
|
|
728
|
-
--abort-on-failure
|
|
729
|
-
|
|
730
|
-
# Execute game day
|
|
731
|
-
agentic-qe chaos gameday \
|
|
732
|
-
--scenario multi-region-failover \
|
|
733
|
-
--participants "dev-team,sre-team"
|
|
734
|
-
|
|
735
|
-
# Analyze resilience
|
|
736
|
-
agentic-qe chaos analyze \
|
|
737
|
-
--service user-service \
|
|
738
|
-
--period 30d
|
|
739
|
-
```
|
|
740
|
-
|
|
741
|
-
### Safety Operations
|
|
742
|
-
```bash
|
|
743
|
-
# Validate experiment safety
|
|
744
|
-
agentic-qe chaos validate --experiment exp-123
|
|
745
|
-
|
|
746
|
-
# Emergency stop
|
|
747
|
-
agentic-qe chaos emergency-stop --experiment-id exp-123
|
|
748
|
-
|
|
749
|
-
# Rollback experiment
|
|
750
|
-
agentic-qe chaos rollback --experiment-id exp-123
|
|
751
|
-
|
|
752
|
-
# Check blast radius
|
|
753
|
-
agentic-qe chaos blast-radius --experiment-id exp-123
|
|
754
|
-
```
|
|
755
|
-
|
|
756
|
-
## Quality Metrics
|
|
757
|
-
|
|
758
|
-
- **Experiment Success Rate**: >90% experiments complete without emergency rollback
|
|
759
|
-
- **Hypothesis Validation**: >85% hypotheses validated or invalidated conclusively
|
|
760
|
-
- **Blast Radius Containment**: 100% experiments stay within defined limits
|
|
761
|
-
- **Recovery Time**: <30 seconds automatic rollback
|
|
762
|
-
- **Zero Data Loss**: 100% of experiments with zero data loss
|
|
763
|
-
- **Observability Coverage**: 100% experiments with full telemetry
|
|
764
|
-
- **Safety Compliance**: 100% experiments pass pre-flight safety checks
|
|
765
|
-
|
|
766
|
-
## Integration with QE Fleet
|
|
767
|
-
|
|
768
|
-
This agent integrates with the Agentic QE Fleet through:
|
|
769
|
-
- **EventBus**: Real-time chaos event coordination
|
|
770
|
-
- **MemoryManager**: Experiment state and results persistence
|
|
771
|
-
- **FleetManager**: Coordination with other testing agents
|
|
772
|
-
- **Neural Network**: Learn resilience patterns from experiments
|
|
773
|
-
- **Monitoring Integration**: Seamless observability during chaos
|
|
774
|
-
|
|
775
|
-
## Advanced Features
|
|
776
|
-
|
|
777
|
-
### Continuous Chaos
|
|
778
|
-
Run low-intensity chaos continuously in production to build confidence
|
|
779
|
-
|
|
780
|
-
### Chaos as Code
|
|
781
|
-
Define experiments as declarative YAML configurations for GitOps workflows
|
|
782
|
-
|
|
783
|
-
### ML-Powered Failure Prediction
|
|
784
|
-
Use neural patterns to predict likely failure modes and generate targeted experiments
|
|
785
|
-
|
|
786
|
-
### Automated Remediation
|
|
787
|
-
Automatically create runbooks and alerts based on discovered failure modes
|