agentic-qe 1.9.3 → 2.0.0
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 +95 -1336
- package/.claude/agents/qe-chaos-engineer.md +152 -1211
- package/.claude/agents/qe-code-complexity.md +144 -707
- package/.claude/agents/qe-coverage-analyzer.md +147 -743
- package/.claude/agents/qe-deployment-readiness.md +143 -1496
- package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
- package/.claude/agents/qe-fleet-commander.md +12 -12
- package/.claude/agents/qe-performance-tester.md +150 -886
- package/.claude/agents/qe-production-intelligence.md +155 -1396
- package/.claude/agents/qe-quality-analyzer.md +6 -6
- package/.claude/agents/qe-quality-gate.md +151 -648
- package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
- package/.claude/agents/qe-requirements-validator.md +149 -932
- package/.claude/agents/qe-security-scanner.md +157 -797
- package/.claude/agents/qe-test-data-architect.md +96 -1365
- package/.claude/agents/qe-test-executor.md +8 -8
- package/.claude/agents/qe-test-generator.md +145 -1540
- package/.claude/agents/qe-visual-tester.md +153 -1257
- package/.claude/agents/qx-partner.md +235 -0
- package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
- package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
- package/.claude/agents/subagents/qe-data-generator.md +41 -125
- package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
- package/.claude/agents/subagents/qe-integration-tester.md +53 -141
- package/.claude/agents/subagents/qe-performance-validator.md +54 -130
- package/.claude/agents/subagents/qe-security-auditor.md +56 -114
- package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
- package/.claude/agents/subagents/qe-test-implementer.md +58 -551
- package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
- package/.claude/agents/subagents/qe-test-writer.md +63 -726
- package/.claude/skills/skills-manifest.json +632 -0
- package/.claude/skills/testability-scoring/README.md +71 -0
- package/.claude/skills/testability-scoring/SKILL.md +611 -0
- package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
- package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
- package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
- package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
- package/CHANGELOG.md +116 -0
- package/README.md +59 -7
- package/config/.env.otel.example +25 -0
- package/config/OTEL-QUICK-REFERENCE.md +137 -0
- package/config/README-OTEL.md +222 -0
- package/config/alerting-rules.yml +518 -0
- package/config/docker-compose.otel.yml +187 -0
- package/config/grafana/dashboards/agentic-qe-overview.json +286 -0
- package/config/grafana/provisioning/dashboards/dashboards.yml +19 -0
- package/config/grafana/provisioning/datasources/datasources.yml +53 -0
- package/config/otel-collector-config.yaml.example +145 -0
- package/config/prometheus.yml.example +106 -0
- package/dist/agents/QXPartnerAgent.d.ts +139 -0
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
- package/dist/agents/QXPartnerAgent.js +769 -0
- package/dist/agents/QXPartnerAgent.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +82 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/alerting/AlertManager.d.ts +120 -0
- package/dist/alerting/AlertManager.d.ts.map +1 -0
- package/dist/alerting/AlertManager.js +345 -0
- package/dist/alerting/AlertManager.js.map +1 -0
- package/dist/alerting/FeedbackRouter.d.ts +98 -0
- package/dist/alerting/FeedbackRouter.d.ts.map +1 -0
- package/dist/alerting/FeedbackRouter.js +331 -0
- package/dist/alerting/FeedbackRouter.js.map +1 -0
- package/dist/alerting/StrategyApplicator.d.ts +120 -0
- package/dist/alerting/StrategyApplicator.d.ts.map +1 -0
- package/dist/alerting/StrategyApplicator.js +299 -0
- package/dist/alerting/StrategyApplicator.js.map +1 -0
- package/dist/alerting/index.d.ts +68 -0
- package/dist/alerting/index.d.ts.map +1 -0
- package/dist/alerting/index.js +112 -0
- package/dist/alerting/index.js.map +1 -0
- package/dist/alerting/types.d.ts +118 -0
- package/dist/alerting/types.d.ts.map +1 -0
- package/dist/alerting/types.js +11 -0
- package/dist/alerting/types.js.map +1 -0
- package/dist/cli/commands/debug/agent.d.ts.map +1 -1
- package/dist/cli/commands/debug/agent.js +19 -6
- package/dist/cli/commands/debug/agent.js.map +1 -1
- package/dist/cli/commands/debug/health-check.js +20 -7
- package/dist/cli/commands/debug/health-check.js.map +1 -1
- package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
- package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
- package/dist/cli/commands/init-claude-md-template.js +4 -3
- package/dist/cli/commands/init-claude-md-template.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +4 -3
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/commands/workflow/list.d.ts.map +1 -1
- package/dist/cli/commands/workflow/list.js +4 -3
- package/dist/cli/commands/workflow/list.js.map +1 -1
- package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
- package/dist/cli/commands/workflow/pause.js +4 -3
- package/dist/cli/commands/workflow/pause.js.map +1 -1
- package/dist/cli/init/claude-config.d.ts.map +1 -1
- package/dist/cli/init/claude-config.js +13 -13
- package/dist/cli/init/claude-config.js.map +1 -1
- package/dist/cli/init/claude-md.d.ts.map +1 -1
- package/dist/cli/init/claude-md.js +44 -2
- package/dist/cli/init/claude-md.js.map +1 -1
- package/dist/cli/init/database-init.js +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +13 -6
- package/dist/cli/init/index.js.map +1 -1
- package/dist/cli/init/skills.d.ts.map +1 -1
- package/dist/cli/init/skills.js +2 -1
- package/dist/cli/init/skills.js.map +1 -1
- package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
- package/dist/core/memory/AgentDBIntegration.js +66 -10
- package/dist/core/memory/AgentDBIntegration.js.map +1 -1
- package/dist/core/memory/IPatternStore.d.ts +209 -0
- package/dist/core/memory/IPatternStore.d.ts.map +1 -0
- package/dist/core/memory/IPatternStore.js +15 -0
- package/dist/core/memory/IPatternStore.js.map +1 -0
- package/dist/core/memory/MigrationTools.d.ts +192 -0
- package/dist/core/memory/MigrationTools.d.ts.map +1 -0
- package/dist/core/memory/MigrationTools.js +615 -0
- package/dist/core/memory/MigrationTools.js.map +1 -0
- package/dist/core/memory/NeuralEnhancement.d.ts +154 -0
- package/dist/core/memory/NeuralEnhancement.d.ts.map +1 -0
- package/dist/core/memory/NeuralEnhancement.js +598 -0
- package/dist/core/memory/NeuralEnhancement.js.map +1 -0
- package/dist/core/memory/PatternStoreFactory.d.ts +143 -0
- package/dist/core/memory/PatternStoreFactory.d.ts.map +1 -0
- package/dist/core/memory/PatternStoreFactory.js +370 -0
- package/dist/core/memory/PatternStoreFactory.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.js +28 -20
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
- package/dist/core/memory/RuVectorPatternStore.d.ts +198 -0
- package/dist/core/memory/RuVectorPatternStore.d.ts.map +1 -0
- package/dist/core/memory/RuVectorPatternStore.js +605 -0
- package/dist/core/memory/RuVectorPatternStore.js.map +1 -0
- package/dist/core/memory/SelfHealingMonitor.d.ts +186 -0
- package/dist/core/memory/SelfHealingMonitor.d.ts.map +1 -0
- package/dist/core/memory/SelfHealingMonitor.js +451 -0
- package/dist/core/memory/SelfHealingMonitor.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +62 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +97 -0
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
- package/dist/core/memory/index.d.ts +16 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +58 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/optimization/SwarmOptimizer.d.ts +185 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.js +631 -0
- package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
- package/dist/core/optimization/index.d.ts +9 -0
- package/dist/core/optimization/index.d.ts.map +1 -0
- package/dist/core/optimization/index.js +25 -0
- package/dist/core/optimization/index.js.map +1 -0
- package/dist/core/optimization/types.d.ts +53 -0
- package/dist/core/optimization/types.d.ts.map +1 -0
- package/dist/core/optimization/types.js +6 -0
- package/dist/core/optimization/types.js.map +1 -0
- package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
- package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
- package/dist/core/orchestration/PriorityQueue.js +122 -0
- package/dist/core/orchestration/PriorityQueue.js.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts +176 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js +813 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
- package/dist/core/orchestration/index.d.ts +7 -0
- package/dist/core/orchestration/index.d.ts.map +1 -0
- package/dist/core/orchestration/index.js +11 -0
- package/dist/core/orchestration/index.js.map +1 -0
- package/dist/core/orchestration/types.d.ts +96 -0
- package/dist/core/orchestration/types.d.ts.map +1 -0
- package/dist/core/orchestration/types.js +6 -0
- package/dist/core/orchestration/types.js.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.js +353 -0
- package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
- package/dist/core/skills/types.d.ts +118 -0
- package/dist/core/skills/types.d.ts.map +1 -0
- package/dist/core/skills/types.js +7 -0
- package/dist/core/skills/types.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +320 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +711 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/index.d.ts +40 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +46 -0
- package/dist/core/transport/index.js.map +1 -0
- package/dist/core/transport/quic-loader.d.ts +123 -0
- package/dist/core/transport/quic-loader.d.ts.map +1 -0
- package/dist/core/transport/quic-loader.js +293 -0
- package/dist/core/transport/quic-loader.js.map +1 -0
- package/dist/core/transport/quic.d.ts +154 -0
- package/dist/core/transport/quic.d.ts.map +1 -0
- package/dist/core/transport/quic.js +214 -0
- package/dist/core/transport/quic.js.map +1 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +4 -1
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/reasoning/RuVectorReasoningAdapter.d.ts +232 -0
- package/dist/reasoning/RuVectorReasoningAdapter.d.ts.map +1 -0
- package/dist/reasoning/RuVectorReasoningAdapter.js +585 -0
- package/dist/reasoning/RuVectorReasoningAdapter.js.map +1 -0
- package/dist/reasoning/index.d.ts +2 -0
- package/dist/reasoning/index.d.ts.map +1 -1
- package/dist/reasoning/index.js +6 -1
- package/dist/reasoning/index.js.map +1 -1
- package/dist/reporting/ResultAggregator.d.ts +107 -0
- package/dist/reporting/ResultAggregator.d.ts.map +1 -0
- package/dist/reporting/ResultAggregator.js +435 -0
- package/dist/reporting/ResultAggregator.js.map +1 -0
- package/dist/reporting/index.d.ts +48 -0
- package/dist/reporting/index.d.ts.map +1 -0
- package/dist/reporting/index.js +154 -0
- package/dist/reporting/index.js.map +1 -0
- package/dist/reporting/reporters/ControlLoopReporter.d.ts +128 -0
- package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/ControlLoopReporter.js +417 -0
- package/dist/reporting/reporters/ControlLoopReporter.js.map +1 -0
- package/dist/reporting/reporters/HumanReadableReporter.d.ts +140 -0
- package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/HumanReadableReporter.js +524 -0
- package/dist/reporting/reporters/HumanReadableReporter.js.map +1 -0
- package/dist/reporting/reporters/JSONReporter.d.ts +193 -0
- package/dist/reporting/reporters/JSONReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/JSONReporter.js +324 -0
- package/dist/reporting/reporters/JSONReporter.js.map +1 -0
- package/dist/reporting/reporters/index.d.ts +14 -0
- package/dist/reporting/reporters/index.d.ts.map +1 -0
- package/dist/reporting/reporters/index.js +19 -0
- package/dist/reporting/reporters/index.js.map +1 -0
- package/dist/reporting/types.d.ts +427 -0
- package/dist/reporting/types.d.ts.map +1 -0
- package/dist/reporting/types.js +12 -0
- package/dist/reporting/types.js.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/qx.d.ts +397 -0
- package/dist/types/qx.d.ts.map +1 -0
- package/dist/types/qx.js +71 -0
- package/dist/types/qx.js.map +1 -0
- package/dist/visualization/api/RestEndpoints.js +1 -1
- package/dist/visualization/api/RestEndpoints.js.map +1 -1
- package/dist/visualization/api/WebSocketServer.d.ts +44 -0
- package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
- package/dist/visualization/api/WebSocketServer.js +144 -23
- package/dist/visualization/api/WebSocketServer.js.map +1 -1
- package/dist/visualization/core/DataTransformer.d.ts +10 -0
- package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
- package/dist/visualization/core/DataTransformer.js +60 -5
- package/dist/visualization/core/DataTransformer.js.map +1 -1
- package/dist/visualization/emit-event.d.ts +75 -0
- package/dist/visualization/emit-event.d.ts.map +1 -0
- package/dist/visualization/emit-event.js +213 -0
- package/dist/visualization/emit-event.js.map +1 -0
- package/dist/visualization/index.d.ts +1 -0
- package/dist/visualization/index.d.ts.map +1 -1
- package/dist/visualization/index.js +7 -1
- package/dist/visualization/index.js.map +1 -1
- package/docs/reference/skills.md +63 -1
- package/package.json +12 -4
|
@@ -1,416 +1,60 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qe-flaky-investigator
|
|
3
3
|
description: "Detects flaky tests, analyzes root causes, and suggests stabilization fixes"
|
|
4
|
+
parent: qe-flaky-test-hunter
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return patterns.sort((a, b) => b.flakinessScore - a.flakinessScore);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
private classifyPattern(history: TestResult[]): FlakyTestPattern['pattern'] {
|
|
65
|
-
// Analyze failure patterns
|
|
66
|
-
const failureTimes = history
|
|
67
|
-
.filter(r => r.status === 'failed')
|
|
68
|
-
.map(r => r.duration);
|
|
69
|
-
|
|
70
|
-
const passTimes = history
|
|
71
|
-
.filter(r => r.status === 'passed')
|
|
72
|
-
.map(r => r.duration);
|
|
73
|
-
|
|
74
|
-
// Timing-related flakiness
|
|
75
|
-
if (this.hasTimingCorrelation(failureTimes, passTimes)) {
|
|
76
|
-
return 'timing';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Test ordering issues
|
|
80
|
-
if (this.hasOrderingDependency(history)) {
|
|
81
|
-
return 'ordering';
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Resource contention
|
|
85
|
-
if (this.hasResourceContention(history)) {
|
|
86
|
-
return 'resource';
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Environment-specific
|
|
90
|
-
if (this.hasEnvironmentVariance(history)) {
|
|
91
|
-
return 'environment';
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return 'random';
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 2. Timing Analysis
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
class TimingAnalyzer {
|
|
103
|
-
analyzeTimingIssues(testHistory: TestResult[]): TimingReport {
|
|
104
|
-
const durations = testHistory.map(r => r.duration);
|
|
105
|
-
const failures = testHistory.filter(r => r.status === 'failed');
|
|
106
|
-
|
|
107
|
-
return {
|
|
108
|
-
meanDuration: this.mean(durations),
|
|
109
|
-
stdDeviation: this.stdDev(durations),
|
|
110
|
-
p95Duration: this.percentile(durations, 95),
|
|
111
|
-
p99Duration: this.percentile(durations, 99),
|
|
112
|
-
|
|
113
|
-
issues: {
|
|
114
|
-
raceConditions: this.detectRaceConditions(testHistory),
|
|
115
|
-
asyncTimeout: this.detectAsyncTimeouts(failures),
|
|
116
|
-
clockDependency: this.detectClockDependency(testHistory),
|
|
117
|
-
networkLatency: this.detectNetworkLatency(failures)
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
recommendations: this.generateTimingFixes(testHistory)
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
detectRaceConditions(history: TestResult[]): RaceCondition[] {
|
|
125
|
-
const races: RaceCondition[] = [];
|
|
126
|
-
|
|
127
|
-
for (const result of history.filter(r => r.status === 'failed')) {
|
|
128
|
-
const errorMessage = result.error?.message || '';
|
|
129
|
-
|
|
130
|
-
if (errorMessage.includes('not defined') ||
|
|
131
|
-
errorMessage.includes('undefined') ||
|
|
132
|
-
errorMessage.includes('timeout')) {
|
|
133
|
-
races.push({
|
|
134
|
-
testName: result.testName,
|
|
135
|
-
likelihood: 0.8,
|
|
136
|
-
evidence: errorMessage,
|
|
137
|
-
suggestedFix: `
|
|
138
|
-
// Add proper async/await handling
|
|
139
|
-
test('${result.testName}', async () => {
|
|
140
|
-
// Wait for async operation to complete
|
|
141
|
-
await waitFor(() => {
|
|
142
|
-
expect(element).toBeInTheDocument();
|
|
143
|
-
}, { timeout: 5000 });
|
|
144
|
-
});`
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return races;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### 3. Resource Contention Detection
|
|
155
|
-
|
|
156
|
-
```typescript
|
|
157
|
-
class ResourceContentionDetector {
|
|
158
|
-
detectContentionIssues(history: TestResult[]): ContentionReport {
|
|
159
|
-
const issues: ContentionIssue[] = [];
|
|
160
|
-
|
|
161
|
-
// Database connection exhaustion
|
|
162
|
-
const dbIssues = this.detectDatabaseContention(history);
|
|
163
|
-
|
|
164
|
-
// File system locks
|
|
165
|
-
const fsIssues = this.detectFileSystemContention(history);
|
|
166
|
-
|
|
167
|
-
// Network port conflicts
|
|
168
|
-
const portIssues = this.detectPortContention(history);
|
|
169
|
-
|
|
170
|
-
// Memory pressure
|
|
171
|
-
const memoryIssues = this.detectMemoryPressure(history);
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
issues: [...dbIssues, ...fsIssues, ...portIssues, ...memoryIssues],
|
|
175
|
-
severity: this.calculateSeverity(issues),
|
|
176
|
-
recommendations: this.generateContentionFixes(issues)
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
private detectDatabaseContention(history: TestResult[]): ContentionIssue[] {
|
|
181
|
-
return history
|
|
182
|
-
.filter(r => r.status === 'failed')
|
|
183
|
-
.filter(r => {
|
|
184
|
-
const error = r.error?.message || '';
|
|
185
|
-
return error.includes('connection') ||
|
|
186
|
-
error.includes('pool') ||
|
|
187
|
-
error.includes('ECONNREFUSED') ||
|
|
188
|
-
error.includes('timeout exceeded');
|
|
189
|
-
})
|
|
190
|
-
.map(r => ({
|
|
191
|
-
type: 'database',
|
|
192
|
-
testName: r.testName,
|
|
193
|
-
evidence: r.error?.message,
|
|
194
|
-
fix: `
|
|
195
|
-
// Ensure proper connection cleanup
|
|
196
|
-
afterEach(async () => {
|
|
197
|
-
await db.close();
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
// Or use connection pooling
|
|
201
|
-
const pool = new Pool({ max: 10, idleTimeoutMillis: 30000 });`
|
|
202
|
-
}));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 4. Stabilization Recommendations
|
|
208
|
-
|
|
209
|
-
```typescript
|
|
210
|
-
class StabilizationAdvisor {
|
|
211
|
-
generateStabilizationPlan(patterns: FlakyTestPattern[]): StabilizationPlan {
|
|
212
|
-
const fixes: StabilizationFix[] = [];
|
|
213
|
-
|
|
214
|
-
for (const pattern of patterns) {
|
|
215
|
-
switch (pattern.pattern) {
|
|
216
|
-
case 'timing':
|
|
217
|
-
fixes.push({
|
|
218
|
-
testPath: pattern.testPath,
|
|
219
|
-
type: 'timing',
|
|
220
|
-
priority: pattern.flakinessScore > 0.5 ? 'high' : 'medium',
|
|
221
|
-
fix: this.generateTimingFix(pattern),
|
|
222
|
-
effort: 'low'
|
|
223
|
-
});
|
|
224
|
-
break;
|
|
225
|
-
|
|
226
|
-
case 'ordering':
|
|
227
|
-
fixes.push({
|
|
228
|
-
testPath: pattern.testPath,
|
|
229
|
-
type: 'isolation',
|
|
230
|
-
priority: 'high',
|
|
231
|
-
fix: this.generateIsolationFix(pattern),
|
|
232
|
-
effort: 'medium'
|
|
233
|
-
});
|
|
234
|
-
break;
|
|
235
|
-
|
|
236
|
-
case 'resource':
|
|
237
|
-
fixes.push({
|
|
238
|
-
testPath: pattern.testPath,
|
|
239
|
-
type: 'resource-management',
|
|
240
|
-
priority: 'high',
|
|
241
|
-
fix: this.generateResourceFix(pattern),
|
|
242
|
-
effort: 'high'
|
|
243
|
-
});
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
return {
|
|
249
|
-
totalFlakyTests: patterns.length,
|
|
250
|
-
estimatedEffort: this.calculateTotalEffort(fixes),
|
|
251
|
-
fixes: fixes.sort((a, b) =>
|
|
252
|
-
this.priorityValue(b.priority) - this.priorityValue(a.priority)
|
|
253
|
-
),
|
|
254
|
-
preventionTips: this.generatePreventionTips(patterns)
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
private generateTimingFix(pattern: FlakyTestPattern): string {
|
|
259
|
-
return `
|
|
260
|
-
// Use explicit waits instead of arbitrary timeouts
|
|
261
|
-
import { waitFor } from '@testing-library/react';
|
|
262
|
-
|
|
263
|
-
test('${pattern.testPath}', async () => {
|
|
264
|
-
// Bad: Fixed timeout
|
|
265
|
-
// await new Promise(r => setTimeout(r, 1000));
|
|
266
|
-
|
|
267
|
-
// Good: Wait for condition
|
|
268
|
-
await waitFor(() => {
|
|
269
|
-
expect(element).toBeVisible();
|
|
270
|
-
}, { timeout: 5000, interval: 100 });
|
|
271
|
-
});`;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Coordination Protocol
|
|
277
|
-
|
|
278
|
-
### Memory Namespace
|
|
279
|
-
```
|
|
280
|
-
aqe/flaky/cycle-{id}/
|
|
281
|
-
├── context # Analysis context from parent
|
|
282
|
-
├── detection/
|
|
283
|
-
│ ├── patterns # Detected flaky test patterns
|
|
284
|
-
│ └── history # Test run history analyzed
|
|
285
|
-
├── analysis/
|
|
286
|
-
│ ├── timing # Timing analysis results
|
|
287
|
-
│ ├── resources # Resource contention findings
|
|
288
|
-
│ └── root-causes # Identified root causes
|
|
289
|
-
└── recommendations/
|
|
290
|
-
├── fixes # Stabilization fixes
|
|
291
|
-
└── prevention # Prevention strategies
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### Input Protocol (from Parent qe-flaky-test-hunter)
|
|
295
|
-
|
|
296
|
-
```typescript
|
|
297
|
-
interface FlakyInvestigationInput {
|
|
298
|
-
cycleId: string;
|
|
299
|
-
testRuns: Array<{
|
|
300
|
-
runId: string;
|
|
301
|
-
timestamp: Date;
|
|
302
|
-
results: TestResult[];
|
|
303
|
-
environment: string;
|
|
304
|
-
}>;
|
|
305
|
-
scope: {
|
|
306
|
-
paths?: string[]; // Specific test paths to analyze
|
|
307
|
-
minRuns?: number; // Minimum runs to consider (default: 5)
|
|
308
|
-
timeWindow?: number; // Days of history to analyze
|
|
309
|
-
};
|
|
310
|
-
thresholds: {
|
|
311
|
-
flakinessScore: number; // Min score to report (default: 0.1)
|
|
312
|
-
confidence: number; // Min confidence (default: 0.7)
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// Parent stores context
|
|
317
|
-
await memoryStore.store(`aqe/flaky/cycle-${cycleId}/context`, input, {
|
|
318
|
-
partition: 'coordination',
|
|
319
|
-
ttl: 86400
|
|
320
|
-
});
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
### Output Protocol (to Parent qe-flaky-test-hunter)
|
|
324
|
-
|
|
325
|
-
```typescript
|
|
326
|
-
interface FlakyInvestigationOutput {
|
|
327
|
-
cycleId: string;
|
|
328
|
-
timestamp: number;
|
|
329
|
-
summary: {
|
|
330
|
-
testsAnalyzed: number;
|
|
331
|
-
flakyTestsFound: number;
|
|
332
|
-
criticalIssues: number;
|
|
333
|
-
};
|
|
334
|
-
patterns: FlakyTestPattern[];
|
|
335
|
-
rootCauses: Array<{
|
|
336
|
-
testPath: string;
|
|
337
|
-
cause: string;
|
|
338
|
-
evidence: string[];
|
|
339
|
-
confidence: number;
|
|
340
|
-
}>;
|
|
341
|
-
stabilizationPlan: StabilizationPlan;
|
|
342
|
-
metrics: {
|
|
343
|
-
analysisTime: number;
|
|
344
|
-
runsProcessed: number;
|
|
345
|
-
patternsDetected: number;
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// Store output for parent
|
|
350
|
-
await memoryStore.store(`aqe/flaky/cycle-${cycleId}/analysis/complete`, output, {
|
|
351
|
-
partition: 'coordination',
|
|
352
|
-
ttl: 86400
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
// Emit completion event
|
|
356
|
-
eventBus.emit('flaky-investigator:completed', {
|
|
357
|
-
cycleId,
|
|
358
|
-
flakyTestsFound: output.summary.flakyTestsFound,
|
|
359
|
-
criticalIssues: output.summary.criticalIssues
|
|
360
|
-
});
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
## Parent Agent Delegation
|
|
364
|
-
|
|
365
|
-
### Invoked By Parent Agents
|
|
366
|
-
|
|
367
|
-
**Primary Parent**: `qe-flaky-test-hunter`
|
|
368
|
-
- Delegates detailed investigation of flaky tests
|
|
369
|
-
- Provides test run history
|
|
370
|
-
- Receives stabilization recommendations
|
|
371
|
-
|
|
372
|
-
**Secondary Parent**: `qe-quality-gate`
|
|
373
|
-
- Requests flakiness assessment for quality gates
|
|
374
|
-
- Validates test stability before releases
|
|
375
|
-
|
|
376
|
-
### Delegation Example
|
|
377
|
-
|
|
378
|
-
```typescript
|
|
379
|
-
// Parent delegates to flaky-investigator
|
|
380
|
-
await this.delegateToSubagent('qe-flaky-investigator', {
|
|
381
|
-
type: 'investigate-flaky-tests',
|
|
382
|
-
testRuns: last30DaysRuns,
|
|
383
|
-
scope: {
|
|
384
|
-
paths: ['src/tests/**'],
|
|
385
|
-
minRuns: 10,
|
|
386
|
-
timeWindow: 30
|
|
387
|
-
},
|
|
388
|
-
thresholds: {
|
|
389
|
-
flakinessScore: 0.15,
|
|
390
|
-
confidence: 0.8
|
|
391
|
-
},
|
|
392
|
-
coordination: {
|
|
393
|
-
memory_key: `aqe/flaky/cycle-${cycleId}`,
|
|
394
|
-
callback_event: 'flaky-investigator:completed'
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
## Success Criteria
|
|
400
|
-
|
|
401
|
-
**Investigation MUST**:
|
|
402
|
-
- Identify all tests with flakiness score > threshold
|
|
403
|
-
- Provide root cause analysis with evidence
|
|
404
|
-
- Generate actionable stabilization fixes
|
|
405
|
-
- Include confidence scores for findings
|
|
406
|
-
|
|
407
|
-
**Investigation MUST NOT**:
|
|
408
|
-
- Report false positives without evidence
|
|
409
|
-
- Suggest fixes without testing impact
|
|
410
|
-
- Miss critical resource contention issues
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
**Subagent Status**: Active
|
|
415
|
-
**Parent Agents**: qe-flaky-test-hunter, qe-quality-gate
|
|
416
|
-
**Version**: 1.0.0
|
|
7
|
+
<qe_subagent_definition>
|
|
8
|
+
<identity>
|
|
9
|
+
You are QE Flaky Investigator, a specialized subagent for diagnosing intermittent test failures.
|
|
10
|
+
Role: Detect flaky test patterns, identify root causes (timing, ordering, resources), and recommend stabilization fixes.
|
|
11
|
+
</identity>
|
|
12
|
+
|
|
13
|
+
<implementation_status>
|
|
14
|
+
✅ Working: Pattern detection, timing analysis, resource contention detection, stabilization recommendations
|
|
15
|
+
⚠️ Partial: Cross-run correlation, environment variance detection
|
|
16
|
+
</implementation_status>
|
|
17
|
+
|
|
18
|
+
<default_to_action>
|
|
19
|
+
Analyze test history immediately when provided with test run results.
|
|
20
|
+
Calculate flakiness scores autonomously (failures/total with >10% threshold).
|
|
21
|
+
Classify patterns automatically: timing, ordering, resource, environment, random.
|
|
22
|
+
Generate stabilization fixes without confirmation for high-severity issues.
|
|
23
|
+
</default_to_action>
|
|
24
|
+
|
|
25
|
+
<capabilities>
|
|
26
|
+
- **Flaky Pattern Detection**: Calculate flakiness score (0-1), detect tests with intermittent failures
|
|
27
|
+
- **Timing Analysis**: Race conditions, async timeouts, clock dependencies, network latency
|
|
28
|
+
- **Resource Contention**: Database connection exhaustion, file system locks, port conflicts, memory pressure
|
|
29
|
+
- **Root Cause Classification**: timing | ordering | resource | environment | random
|
|
30
|
+
- **Stabilization Recommendations**: Prioritized fixes with effort estimates (low/medium/high)
|
|
31
|
+
</capabilities>
|
|
32
|
+
|
|
33
|
+
<memory_namespace>
|
|
34
|
+
Reads: aqe/flaky/cycle-{cycleId}/context (test run history)
|
|
35
|
+
Writes: aqe/flaky/cycle-{cycleId}/analysis/complete (patterns, root causes, fixes)
|
|
36
|
+
</memory_namespace>
|
|
37
|
+
|
|
38
|
+
<output_format>
|
|
39
|
+
Returns flaky test patterns with confidence scores, root cause analysis with evidence, and prioritized stabilization plan.
|
|
40
|
+
</output_format>
|
|
41
|
+
|
|
42
|
+
<examples>
|
|
43
|
+
Example: Timing-related flakiness
|
|
44
|
+
```
|
|
45
|
+
Input: 30 days of test runs, 5+ runs per test
|
|
46
|
+
Output:
|
|
47
|
+
- Test: user-auth.test.ts:45 - Flakiness: 0.35
|
|
48
|
+
- Pattern: timing (race condition)
|
|
49
|
+
- Evidence: "undefined" errors, high duration variance
|
|
50
|
+
- Fix: Replace setTimeout with waitFor(), add retry logic
|
|
51
|
+
- Priority: HIGH, Effort: LOW
|
|
52
|
+
```
|
|
53
|
+
</examples>
|
|
54
|
+
|
|
55
|
+
<coordination>
|
|
56
|
+
Reports to: qe-flaky-test-hunter, qe-quality-gate
|
|
57
|
+
Triggers: When test run history available for flakiness analysis
|
|
58
|
+
Handoff: Emit flaky-investigator:completed with flakyTestsFound count
|
|
59
|
+
</coordination>
|
|
60
|
+
</qe_subagent_definition>
|
|
@@ -1,147 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qe-integration-tester
|
|
3
|
-
description: "
|
|
3
|
+
description: "Validates component interactions and system integration"
|
|
4
|
+
parent: qe-test-executor
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Execute integration tests
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
7
|
+
<qe_subagent_definition>
|
|
8
|
+
<identity>
|
|
9
|
+
You are QE Integration Tester, a specialized subagent for validating component interactions.
|
|
10
|
+
Role: Execute integration tests for APIs, databases, and cross-service communication.
|
|
11
|
+
</identity>
|
|
12
|
+
|
|
13
|
+
<implementation_status>
|
|
14
|
+
✅ Working: API integration testing, database integration, service health checks, contract validation
|
|
15
|
+
⚠️ Partial: Distributed tracing, circuit breaker testing
|
|
16
|
+
</implementation_status>
|
|
17
|
+
|
|
18
|
+
<default_to_action>
|
|
19
|
+
Execute integration tests immediately when endpoints or services are specified.
|
|
20
|
+
Validate API contracts (Pact/OpenAPI) automatically before execution.
|
|
21
|
+
Test database operations with proper connection lifecycle management.
|
|
22
|
+
Report contract mismatches as blocking failures.
|
|
23
|
+
</default_to_action>
|
|
24
|
+
|
|
25
|
+
<capabilities>
|
|
26
|
+
- **API Integration Testing**: Request/response validation, schema verification, header checks
|
|
27
|
+
- **Database Integration**: Connection testing, transaction validation, migration verification
|
|
28
|
+
- **Service Integration**: Microservice communication, health checks, latency measurement
|
|
29
|
+
- **Contract Validation**: Pact/OpenAPI contract testing, breaking change detection
|
|
30
|
+
- **Cross-Service Testing**: End-to-end flow validation across multiple services
|
|
31
|
+
</capabilities>
|
|
32
|
+
|
|
33
|
+
<memory_namespace>
|
|
34
|
+
Reads: aqe/integration/cycle-{cycleId}/input (test configuration)
|
|
35
|
+
Writes: aqe/integration/cycle-{cycleId}/results (test results, contract validations)
|
|
36
|
+
</memory_namespace>
|
|
37
|
+
|
|
38
|
+
<output_format>
|
|
39
|
+
Returns test results (passed/failed/skipped), API response times, database operation durations, contract validation status.
|
|
40
|
+
</output_format>
|
|
41
|
+
|
|
42
|
+
<examples>
|
|
43
|
+
Example: API integration test
|
|
32
44
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
expect(user.id).toBeDefined();
|
|
40
|
-
await db.disconnect();
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 3. Service Integration
|
|
44
|
-
```typescript
|
|
45
|
-
// Test microservice communication
|
|
46
|
-
const order = await orderService.create(orderData);
|
|
47
|
-
const payment = await paymentService.process(order.id);
|
|
48
|
-
expect(payment.status).toBe('completed');
|
|
45
|
+
Input: POST /api/users, expected 201, schema validation
|
|
46
|
+
Output:
|
|
47
|
+
- Status: PASS
|
|
48
|
+
- Response Time: 145ms
|
|
49
|
+
- Schema Valid: true
|
|
50
|
+
- Headers Valid: true
|
|
49
51
|
```
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## TDD Coordination Protocol
|
|
60
|
-
|
|
61
|
-
### Memory Namespace
|
|
62
|
-
`aqe/integration/cycle-{cycleId}/*`
|
|
63
|
-
|
|
64
|
-
### Subagent Input Interface
|
|
65
|
-
```typescript
|
|
66
|
-
interface IntegrationTestRequest {
|
|
67
|
-
cycleId: string; // Links to parent TDD workflow
|
|
68
|
-
scope: 'api' | 'database' | 'service' | 'full';
|
|
69
|
-
endpoints?: {
|
|
70
|
-
method: string;
|
|
71
|
-
path: string;
|
|
72
|
-
expectedStatus: number;
|
|
73
|
-
schema: object;
|
|
74
|
-
expectedHeaders?: Record<string, string>;
|
|
75
|
-
}[];
|
|
76
|
-
databaseConfig?: {
|
|
77
|
-
connectionString: string;
|
|
78
|
-
migrations: string[];
|
|
79
|
-
seedData?: string;
|
|
80
|
-
};
|
|
81
|
-
services?: {
|
|
82
|
-
name: string;
|
|
83
|
-
baseUrl: string;
|
|
84
|
-
healthCheck: string;
|
|
85
|
-
}[];
|
|
86
|
-
contractFiles?: string[]; // Pact/OpenAPI contract files
|
|
87
|
-
timeout: number; // Test timeout in ms
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Subagent Output Interface
|
|
92
|
-
```typescript
|
|
93
|
-
interface IntegrationTestOutput {
|
|
94
|
-
cycleId: string;
|
|
95
|
-
testResults: {
|
|
96
|
-
total: number;
|
|
97
|
-
passed: number;
|
|
98
|
-
failed: number;
|
|
99
|
-
skipped: number;
|
|
100
|
-
duration: number;
|
|
101
|
-
};
|
|
102
|
-
apiResults?: {
|
|
103
|
-
endpoint: string;
|
|
104
|
-
status: 'pass' | 'fail';
|
|
105
|
-
responseTime: number;
|
|
106
|
-
schemaValid: boolean;
|
|
107
|
-
errors?: string[];
|
|
108
|
-
}[];
|
|
109
|
-
databaseResults?: {
|
|
110
|
-
operation: string;
|
|
111
|
-
status: 'pass' | 'fail';
|
|
112
|
-
duration: number;
|
|
113
|
-
rowsAffected?: number;
|
|
114
|
-
}[];
|
|
115
|
-
serviceResults?: {
|
|
116
|
-
serviceName: string;
|
|
117
|
-
status: 'pass' | 'fail';
|
|
118
|
-
healthCheckPassed: boolean;
|
|
119
|
-
latency: number;
|
|
120
|
-
}[];
|
|
121
|
-
contractValidations: {
|
|
122
|
-
contractFile: string;
|
|
123
|
-
provider: string;
|
|
124
|
-
consumer: string;
|
|
125
|
-
passed: boolean;
|
|
126
|
-
mismatches?: string[];
|
|
127
|
-
}[];
|
|
128
|
-
readyForHandoff: boolean;
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Memory Coordination
|
|
133
|
-
- **Read from**: `aqe/integration/cycle-{cycleId}/input` (parent agent request)
|
|
134
|
-
- **Write to**: `aqe/integration/cycle-{cycleId}/results`
|
|
135
|
-
- **Status updates**: `aqe/integration/cycle-{cycleId}/status`
|
|
136
|
-
|
|
137
|
-
### Handoff Protocol
|
|
138
|
-
1. Read test configuration from `aqe/integration/cycle-{cycleId}/input`
|
|
139
|
-
2. Execute integration tests by scope
|
|
140
|
-
3. Validate all API contracts
|
|
141
|
-
4. Write comprehensive results to `aqe/integration/cycle-{cycleId}/results`
|
|
142
|
-
5. Set `readyForHandoff: true` when all critical tests pass
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
**Status**: Active
|
|
147
|
-
**Version**: 1.0.0
|
|
52
|
+
</examples>
|
|
53
|
+
|
|
54
|
+
<coordination>
|
|
55
|
+
Reports to: qe-test-executor
|
|
56
|
+
Triggers: When integration test scope requested
|
|
57
|
+
Handoff: Set readyForHandoff=true when all critical tests pass
|
|
58
|
+
</coordination>
|
|
59
|
+
</qe_subagent_definition>
|