agentic-qe 1.1.0 → 1.3.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-coverage-analyzer.md +8 -0
- package/.claude/agents/qe-flaky-test-hunter.md +9 -1
- package/.claude/agents/qe-test-generator.md +7 -0
- package/.claude/agents/reasoning/agent.md +816 -0
- package/.claude/agents/reasoning/goal-planner.md +73 -0
- package/.claude/settings.json +64 -25
- package/.claude/skills/README.md +124 -0
- package/.claude/skills/accessibility-testing/SKILL.md +777 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
- package/.claude/skills/agentdb-learning/SKILL.md +545 -0
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
- package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
- package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
- package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
- package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
- package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +109 -0
- package/.claude/skills/code-review-quality/SKILL.md +683 -0
- package/.claude/skills/compatibility-testing/SKILL.md +101 -0
- package/.claude/skills/compliance-testing/SKILL.md +162 -0
- package/.claude/skills/consultancy-practices/SKILL.md +540 -0
- package/.claude/skills/context-driven-testing/SKILL.md +466 -0
- package/.claude/skills/contract-testing/SKILL.md +193 -0
- package/.claude/skills/database-testing/SKILL.md +243 -0
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
- package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
- package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
- package/.claude/skills/github-code-review/SKILL.md +1140 -0
- package/.claude/skills/github-multi-repo/SKILL.md +874 -0
- package/.claude/skills/github-project-management/SKILL.md +1277 -0
- package/.claude/skills/github-release-management/SKILL.md +1081 -0
- package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
- package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
- package/.claude/skills/hooks-automation/SKILL.md +1201 -0
- package/.claude/skills/localization-testing/SKILL.md +115 -0
- package/.claude/skills/mobile-testing/SKILL.md +548 -0
- package/.claude/skills/mutation-testing/SKILL.md +129 -0
- package/.claude/skills/pair-programming/SKILL.md +1202 -0
- package/.claude/skills/performance-analysis/SKILL.md +563 -0
- package/.claude/skills/performance-testing/SKILL.md +662 -0
- package/.claude/skills/quality-metrics/SKILL.md +592 -0
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
- package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
- package/.claude/skills/regression-testing/SKILL.md +1045 -0
- package/.claude/skills/risk-based-testing/SKILL.md +721 -0
- package/.claude/skills/security-testing/SKILL.md +651 -0
- package/.claude/skills/shift-left-testing/SKILL.md +535 -0
- package/.claude/skills/shift-right-testing/SKILL.md +591 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
- package/.claude/skills/stream-chain/SKILL.md +563 -0
- package/.claude/skills/swarm-advanced/SKILL.md +973 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
- package/.claude/skills/technical-writing/SKILL.md +235 -0
- package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
- package/.claude/skills/test-data-management/SKILL.md +1067 -0
- package/.claude/skills/test-design-techniques/SKILL.md +160 -0
- package/.claude/skills/test-environment-management/SKILL.md +204 -0
- package/.claude/skills/test-reporting-analytics/SKILL.md +143 -0
- package/.claude/skills/verification-quality/SKILL.md +649 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +148 -0
- package/.claude/skills/xp-practices/SKILL.md +671 -0
- package/.claude/statusline-command.sh +176 -0
- package/CHANGELOG.md +623 -6
- package/README.md +101 -5
- package/config/improvement-loop.config.ts +323 -0
- package/config/neural-agent.config.ts +197 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
- package/dist/adapters/MemoryStoreAdapter.js +16 -16
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
- package/dist/agents/BaseAgent.d.ts +69 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +387 -5
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts +13 -2
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +112 -12
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.js +13 -13
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.d.ts +28 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +160 -4
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
- package/dist/agents/FleetCommanderAgent.js +4 -3
- package/dist/agents/FleetCommanderAgent.js.map +1 -1
- package/dist/agents/LearningAgent.d.ts +14 -5
- package/dist/agents/LearningAgent.d.ts.map +1 -1
- package/dist/agents/LearningAgent.js +36 -16
- package/dist/agents/LearningAgent.js.map +1 -1
- package/dist/agents/NeuralAgentExtension.d.ts +117 -0
- package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
- package/dist/agents/NeuralAgentExtension.js +288 -0
- package/dist/agents/NeuralAgentExtension.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
- package/dist/agents/PerformanceTesterAgent.js +11 -9
- package/dist/agents/PerformanceTesterAgent.js.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.js +14 -13
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.js +39 -38
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
- package/dist/agents/QualityGateAgent.d.ts.map +1 -1
- package/dist/agents/QualityGateAgent.js +7 -6
- package/dist/agents/QualityGateAgent.js.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +22 -21
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.js +1 -1
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
- package/dist/agents/SecurityScannerAgent.js +8 -7
- package/dist/agents/SecurityScannerAgent.js.map +1 -1
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
- package/dist/agents/TestDataArchitectAgent.js +12 -11
- package/dist/agents/TestDataArchitectAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
- package/dist/agents/TestExecutorAgent.js +18 -19
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/TestGeneratorAgent.d.ts +15 -4
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
- package/dist/agents/TestGeneratorAgent.js +172 -49
- package/dist/agents/TestGeneratorAgent.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
- package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
- package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.js +346 -0
- package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
- package/dist/cli/commands/agent/benchmark.d.ts.map +1 -1
- package/dist/cli/commands/agent/benchmark.js +2 -1
- package/dist/cli/commands/agent/benchmark.js.map +1 -1
- package/dist/cli/commands/agent/index.d.ts +5 -0
- package/dist/cli/commands/agent/index.d.ts.map +1 -1
- package/dist/cli/commands/agent/index.js +11 -6
- package/dist/cli/commands/agent/index.js.map +1 -1
- package/dist/cli/commands/agent/kill.d.ts +13 -0
- package/dist/cli/commands/agent/kill.d.ts.map +1 -0
- package/dist/cli/commands/agent/kill.js +65 -0
- package/dist/cli/commands/agent/kill.js.map +1 -0
- package/dist/cli/commands/agent/list.d.ts +19 -0
- package/dist/cli/commands/agent/list.d.ts.map +1 -0
- package/dist/cli/commands/agent/list.js +92 -0
- package/dist/cli/commands/agent/list.js.map +1 -0
- package/dist/cli/commands/agent/logs.d.ts +14 -0
- package/dist/cli/commands/agent/logs.d.ts.map +1 -0
- package/dist/cli/commands/agent/logs.js +77 -0
- package/dist/cli/commands/agent/logs.js.map +1 -0
- package/dist/cli/commands/agent/metrics.d.ts +21 -0
- package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
- package/dist/cli/commands/agent/metrics.js +87 -0
- package/dist/cli/commands/agent/metrics.js.map +1 -0
- package/dist/cli/commands/agent/spawn.d.ts +28 -0
- package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
- package/dist/cli/commands/agent/spawn.js +84 -0
- package/dist/cli/commands/agent/spawn.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +2 -1
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/config/list.d.ts.map +1 -1
- package/dist/cli/commands/config/list.js +2 -1
- package/dist/cli/commands/config/list.js.map +1 -1
- package/dist/cli/commands/config/set.d.ts +7 -0
- package/dist/cli/commands/config/set.d.ts.map +1 -1
- package/dist/cli/commands/config/set.js +35 -4
- package/dist/cli/commands/config/set.js.map +1 -1
- package/dist/cli/commands/fleet/logs.d.ts.map +1 -1
- package/dist/cli/commands/fleet/logs.js +2 -1
- package/dist/cli/commands/fleet/logs.js.map +1 -1
- package/dist/cli/commands/fleet/metrics.d.ts.map +1 -1
- package/dist/cli/commands/fleet/metrics.js +2 -1
- package/dist/cli/commands/fleet/metrics.js.map +1 -1
- package/dist/cli/commands/fleet/monitor.d.ts.map +1 -1
- package/dist/cli/commands/fleet/monitor.js +7 -5
- package/dist/cli/commands/fleet/monitor.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +2 -1
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/improve/index.d.ts.map +1 -1
- package/dist/cli/commands/improve/index.js +12 -11
- package/dist/cli/commands/improve/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +24 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +503 -11
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts.map +1 -1
- package/dist/cli/commands/learn/index.js +13 -12
- package/dist/cli/commands/learn/index.js.map +1 -1
- package/dist/cli/commands/monitor/alerts.d.ts.map +1 -1
- package/dist/cli/commands/monitor/alerts.js +2 -1
- package/dist/cli/commands/monitor/alerts.js.map +1 -1
- package/dist/cli/commands/patterns/index.d.ts.map +1 -1
- package/dist/cli/commands/patterns/index.js +20 -19
- package/dist/cli/commands/patterns/index.js.map +1 -1
- package/dist/cli/commands/quality/decision.d.ts.map +1 -1
- package/dist/cli/commands/quality/decision.js +9 -7
- package/dist/cli/commands/quality/decision.js.map +1 -1
- package/dist/cli/commands/quality/gate.d.ts.map +1 -1
- package/dist/cli/commands/quality/gate.js +10 -8
- package/dist/cli/commands/quality/gate.js.map +1 -1
- package/dist/cli/commands/quality/policy.d.ts.map +1 -1
- package/dist/cli/commands/quality/policy.js +10 -8
- package/dist/cli/commands/quality/policy.js.map +1 -1
- package/dist/cli/commands/quality/risk.d.ts.map +1 -1
- package/dist/cli/commands/quality/risk.js +5 -3
- package/dist/cli/commands/quality/risk.js.map +1 -1
- package/dist/cli/commands/quality/validate.d.ts.map +1 -1
- package/dist/cli/commands/quality/validate.js +10 -8
- package/dist/cli/commands/quality/validate.js.map +1 -1
- package/dist/cli/commands/quantization.d.ts +6 -0
- package/dist/cli/commands/quantization.d.ts.map +1 -0
- package/dist/cli/commands/quantization.js +188 -0
- package/dist/cli/commands/quantization.js.map +1 -0
- package/dist/cli/commands/routing/index.d.ts +0 -6
- package/dist/cli/commands/routing/index.d.ts.map +1 -1
- package/dist/cli/commands/routing/index.js +17 -16
- package/dist/cli/commands/routing/index.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/skills/index.d.ts +51 -0
- package/dist/cli/commands/skills/index.d.ts.map +1 -0
- package/dist/cli/commands/skills/index.js +365 -0
- package/dist/cli/commands/skills/index.js.map +1 -0
- package/dist/cli/commands/test/debug.d.ts.map +1 -1
- package/dist/cli/commands/test/debug.js +2 -1
- package/dist/cli/commands/test/debug.js.map +1 -1
- package/dist/cli/commands/test/mutate.d.ts.map +1 -1
- package/dist/cli/commands/test/mutate.js +2 -1
- package/dist/cli/commands/test/mutate.js.map +1 -1
- package/dist/cli/commands/test/parallel.d.ts.map +1 -1
- package/dist/cli/commands/test/parallel.js +6 -4
- package/dist/cli/commands/test/parallel.js.map +1 -1
- package/dist/cli/commands/test/profile.d.ts.map +1 -1
- package/dist/cli/commands/test/profile.js +3 -2
- package/dist/cli/commands/test/profile.js.map +1 -1
- package/dist/cli/commands/test/queue.d.ts.map +1 -1
- package/dist/cli/commands/test/queue.js +2 -1
- package/dist/cli/commands/test/queue.js.map +1 -1
- package/dist/cli/commands/test/retry.d.ts.map +1 -1
- package/dist/cli/commands/test/retry.js +6 -4
- package/dist/cli/commands/test/retry.js.map +1 -1
- package/dist/cli/commands/test/trace.d.ts.map +1 -1
- package/dist/cli/commands/test/trace.js +2 -1
- package/dist/cli/commands/test/trace.js.map +1 -1
- package/dist/cli/commands/test/watch.d.ts.map +1 -1
- package/dist/cli/commands/test/watch.js +3 -2
- package/dist/cli/commands/test/watch.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +2 -1
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/index-working.js +9 -8
- package/dist/cli/index-working.js.map +1 -1
- package/dist/cli/index.js +97 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/core/EventBus.d.ts +38 -0
- package/dist/core/EventBus.d.ts.map +1 -1
- package/dist/core/EventBus.js +176 -31
- package/dist/core/EventBus.js.map +1 -1
- package/dist/core/FleetManager.d.ts +35 -1
- package/dist/core/FleetManager.d.ts.map +1 -1
- package/dist/core/FleetManager.js +121 -45
- package/dist/core/FleetManager.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +19 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/MemoryManager.js +25 -1
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
- package/dist/core/coordination/OODACoordination.js +2 -1
- package/dist/core/coordination/OODACoordination.js.map +1 -1
- package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
- package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingCache.js +239 -0
- package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
- package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
- package/dist/core/embeddings/index.d.ts +15 -0
- package/dist/core/embeddings/index.d.ts.map +1 -0
- package/dist/core/embeddings/index.js +22 -0
- package/dist/core/embeddings/index.js.map +1 -0
- package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
- package/dist/core/memory/AgentDBIntegration.js +75 -0
- package/dist/core/memory/AgentDBIntegration.js.map +1 -0
- package/dist/core/memory/AgentDBManager.d.ts +200 -0
- package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
- package/dist/core/memory/AgentDBManager.js +246 -0
- package/dist/core/memory/AgentDBManager.js.map +1 -0
- package/dist/core/memory/AgentDBService.d.ts +160 -0
- package/dist/core/memory/AgentDBService.d.ts.map +1 -0
- package/dist/core/memory/AgentDBService.js +450 -0
- package/dist/core/memory/AgentDBService.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.js +231 -0
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.js +77 -0
- package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +75 -3
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +240 -55
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/index.d.ts +4 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +9 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/neural/NeuralTrainer.d.ts +137 -0
- package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
- package/dist/core/neural/NeuralTrainer.js +544 -0
- package/dist/core/neural/NeuralTrainer.js.map +1 -0
- package/dist/core/neural/index.d.ts +8 -0
- package/dist/core/neural/index.d.ts.map +1 -0
- package/dist/core/neural/index.js +24 -0
- package/dist/core/neural/index.js.map +1 -0
- package/dist/core/neural/types.d.ts +216 -0
- package/dist/core/neural/types.d.ts.map +1 -0
- package/dist/core/neural/types.js +8 -0
- package/dist/core/neural/types.js.map +1 -0
- package/dist/core/quantization/QuantizationManager.d.ts +83 -0
- package/dist/core/quantization/QuantizationManager.d.ts.map +1 -0
- package/dist/core/quantization/QuantizationManager.js +264 -0
- package/dist/core/quantization/QuantizationManager.js.map +1 -0
- package/dist/core/quantization/index.d.ts +5 -0
- package/dist/core/quantization/index.d.ts.map +1 -0
- package/dist/core/quantization/index.js +9 -0
- package/dist/core/quantization/index.js.map +1 -0
- package/dist/core/security/CertificateValidator.d.ts +130 -0
- package/dist/core/security/CertificateValidator.d.ts.map +1 -0
- package/dist/core/security/CertificateValidator.js +376 -0
- package/dist/core/security/CertificateValidator.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +62 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +381 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
- package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
- package/dist/core/transport/SecureQUICTransport.js +253 -0
- package/dist/core/transport/SecureQUICTransport.js.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.js +423 -0
- package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
- package/dist/learning/FlakyPredictionModel.d.ts +11 -1
- package/dist/learning/FlakyPredictionModel.d.ts.map +1 -1
- package/dist/learning/FlakyPredictionModel.js +82 -35
- package/dist/learning/FlakyPredictionModel.js.map +1 -1
- package/dist/learning/FlakyTestDetector.d.ts +9 -0
- package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
- package/dist/learning/FlakyTestDetector.js +28 -6
- package/dist/learning/FlakyTestDetector.js.map +1 -1
- package/dist/learning/ImprovementLoop.d.ts +16 -2
- package/dist/learning/ImprovementLoop.d.ts.map +1 -1
- package/dist/learning/ImprovementLoop.js +67 -8
- package/dist/learning/ImprovementLoop.js.map +1 -1
- package/dist/learning/ImprovementWorker.d.ts +83 -0
- package/dist/learning/ImprovementWorker.d.ts.map +1 -0
- package/dist/learning/ImprovementWorker.js +164 -0
- package/dist/learning/ImprovementWorker.js.map +1 -0
- package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
- package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
- package/dist/learning/NeuralPatternMatcher.js +702 -0
- package/dist/learning/NeuralPatternMatcher.js.map +1 -0
- package/dist/learning/NeuralTrainer.d.ts +209 -0
- package/dist/learning/NeuralTrainer.d.ts.map +1 -0
- package/dist/learning/NeuralTrainer.js +478 -0
- package/dist/learning/NeuralTrainer.js.map +1 -0
- package/dist/learning/index.d.ts +13 -7
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +27 -11
- package/dist/learning/index.js.map +1 -1
- package/dist/learning/types.d.ts +1 -0
- package/dist/learning/types.d.ts.map +1 -1
- package/dist/learning/types.js +16 -0
- package/dist/learning/types.js.map +1 -1
- package/dist/mcp/MCPToolRegistry.d.ts +34 -0
- package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
- package/dist/mcp/MCPToolRegistry.js +48 -0
- package/dist/mcp/MCPToolRegistry.js.map +1 -0
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +3 -3
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/advanced/mutation-test-execute.js +5 -4
- package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
- package/dist/mcp/handlers/agent-spawn.js +2 -1
- package/dist/mcp/handlers/agent-spawn.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +9 -8
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +6 -5
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +5 -4
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +8 -7
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +7 -6
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js +18 -21
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/base-handler.js +2 -9
- package/dist/mcp/handlers/base-handler.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +4 -3
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +6 -5
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.js +2 -1
- package/dist/mcp/handlers/coordination/event-emit.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js +2 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +2 -1
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-status.js +31 -30
- package/dist/mcp/handlers/fleet-status.js.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.js +3 -2
- package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js +2 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -1
- package/dist/mcp/handlers/optimize-tests.js +33 -32
- package/dist/mcp/handlers/optimize-tests.js.map +1 -1
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -1
- package/dist/mcp/handlers/predict-defects.js +46 -45
- package/dist/mcp/handlers/predict-defects.js.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js +24 -23
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.js +10 -9
- package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js +10 -9
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.js +7 -6
- package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -1
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/quality-analyze.js +53 -52
- package/dist/mcp/handlers/quality-analyze.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +19 -18
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.js +7 -6
- package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js +2 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.js +3 -2
- package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -1
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/test-execute.js +11 -10
- package/dist/mcp/handlers/test-execute.js.map +1 -1
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -1
- package/dist/mcp/handlers/test-generate.js +4 -3
- package/dist/mcp/handlers/test-generate.js.map +1 -1
- package/dist/mcp/server.d.ts +4 -4
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +9 -2
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js +10 -9
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.d.ts.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.js +2 -1
- package/dist/mcp/streaming/StreamingMCPTool.js.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.js +6 -5
- package/dist/mcp/streaming/TestExecuteStreamHandler.js.map +1 -1
- package/dist/reasoning/TestTemplateCreator.d.ts +10 -2
- package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -1
- package/dist/reasoning/TestTemplateCreator.js +81 -21
- package/dist/reasoning/TestTemplateCreator.js.map +1 -1
- package/dist/transport/QUICTransport.d.ts +340 -0
- package/dist/transport/QUICTransport.d.ts.map +1 -0
- package/dist/transport/QUICTransport.js +814 -0
- package/dist/transport/QUICTransport.js.map +1 -0
- package/dist/transport/UDPTransport.d.ts +348 -0
- package/dist/transport/UDPTransport.d.ts.map +1 -0
- package/dist/transport/UDPTransport.js +820 -0
- package/dist/transport/UDPTransport.js.map +1 -0
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/index.d.ts +37 -0
- 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/pattern.types.d.ts +39 -3
- package/dist/types/pattern.types.d.ts.map +1 -1
- package/dist/types/quic.d.ts +339 -0
- package/dist/types/quic.d.ts.map +1 -0
- package/dist/types/quic.js +48 -0
- package/dist/types/quic.js.map +1 -0
- package/dist/utils/Config.js +3 -3
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/Database.d.ts +14 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +51 -4
- package/dist/utils/Database.js.map +1 -1
- package/dist/utils/Logger.d.ts.map +1 -1
- package/dist/utils/Logger.js +111 -26
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ProcessExit.d.ts +23 -0
- package/dist/utils/ProcessExit.d.ts.map +1 -0
- package/dist/utils/ProcessExit.js +40 -0
- package/dist/utils/ProcessExit.js.map +1 -0
- package/dist/utils/SecureRandom.d.ts +171 -0
- package/dist/utils/SecureRandom.d.ts.map +1 -0
- package/dist/utils/SecureRandom.js +229 -0
- package/dist/utils/SecureRandom.js.map +1 -0
- package/dist/utils/SecureUrlValidator.d.ts +167 -0
- package/dist/utils/SecureUrlValidator.d.ts.map +1 -0
- package/dist/utils/SecureUrlValidator.js +306 -0
- package/dist/utils/SecureUrlValidator.js.map +1 -0
- package/dist/utils/SecureValidation.d.ts +131 -0
- package/dist/utils/SecureValidation.d.ts.map +1 -0
- package/dist/utils/SecureValidation.js +265 -0
- package/dist/utils/SecureValidation.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +5 -4
- package/dist/utils/validation.js.map +1 -1
- package/package.json +31 -8
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shift-right-testing
|
|
3
|
+
description: Testing in production with feature flags, canary deployments, synthetic monitoring, and chaos engineering. Use when validating real-world behavior, implementing safe deployments, or ensuring production resilience.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: testing-methodologies
|
|
6
|
+
tags: [shift-right, testing-in-production, feature-flags, canary-deployment, synthetic-monitoring, chaos-engineering, production-testing]
|
|
7
|
+
difficulty: advanced
|
|
8
|
+
estimated_time: 75 minutes
|
|
9
|
+
author: agentic-qe
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Shift-Right Testing
|
|
13
|
+
|
|
14
|
+
## Core Principle
|
|
15
|
+
|
|
16
|
+
**Production is different. Test where it matters most.**
|
|
17
|
+
|
|
18
|
+
Shift-right testing moves testing activities into production environments to validate real-world behavior, user experience, and system resilience under actual conditions.
|
|
19
|
+
|
|
20
|
+
## What is Shift-Right Testing?
|
|
21
|
+
|
|
22
|
+
**Shift-Right:** Moving testing activities later (right on timeline) into production environments.
|
|
23
|
+
|
|
24
|
+
**Why Test in Production?**
|
|
25
|
+
|
|
26
|
+
Pre-production testing can't replicate:
|
|
27
|
+
- Real user traffic patterns
|
|
28
|
+
- Actual data volumes and variety
|
|
29
|
+
- Production dependencies and integrations
|
|
30
|
+
- Real network conditions and latency
|
|
31
|
+
- Unpredictable load and edge cases
|
|
32
|
+
- Geographic distribution
|
|
33
|
+
- Third-party service behavior
|
|
34
|
+
|
|
35
|
+
**Shift-Right solves this by:**
|
|
36
|
+
- Validating deployments safely
|
|
37
|
+
- Detecting regressions immediately
|
|
38
|
+
- Monitoring real user experience
|
|
39
|
+
- Testing with production data (safely)
|
|
40
|
+
- Validating system resilience
|
|
41
|
+
|
|
42
|
+
**Timeline:**
|
|
43
|
+
```
|
|
44
|
+
Requirements → Design → Code → Deploy → Monitor
|
|
45
|
+
↓ ↓
|
|
46
|
+
Test Test (production)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Shift-Right Techniques
|
|
52
|
+
|
|
53
|
+
### 1. Feature Flags (Progressive Rollout)
|
|
54
|
+
|
|
55
|
+
**Concept:** Deploy code to production but control who sees it.
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
import { FeatureFlags } from './feature-flags';
|
|
59
|
+
|
|
60
|
+
// New feature behind flag
|
|
61
|
+
if (FeatureFlags.isEnabled('new-checkout-flow', user)) {
|
|
62
|
+
return <NewCheckout />; // New code (for selected users)
|
|
63
|
+
} else {
|
|
64
|
+
return <OldCheckout />; // Existing code (fallback)
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Rollout Strategy:**
|
|
69
|
+
```
|
|
70
|
+
1% → Monitor metrics for 1 hour
|
|
71
|
+
↓ (if healthy)
|
|
72
|
+
10% → A/B test performance vs old version
|
|
73
|
+
↓ (if successful)
|
|
74
|
+
50% → Validate at scale, monitor errors
|
|
75
|
+
↓ (if stable)
|
|
76
|
+
100% → Full rollout complete
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Benefits:**
|
|
80
|
+
- Test in production safely
|
|
81
|
+
- Instant rollback (disable flag)
|
|
82
|
+
- A/B testing built-in
|
|
83
|
+
- Gradual risk exposure
|
|
84
|
+
- Dark launches (test without users seeing)
|
|
85
|
+
|
|
86
|
+
**Implementation with LaunchDarkly:**
|
|
87
|
+
```javascript
|
|
88
|
+
import * as ld from 'launchdarkly-node-server-sdk';
|
|
89
|
+
|
|
90
|
+
const client = ld.init(process.env.LD_SDK_KEY);
|
|
91
|
+
|
|
92
|
+
// Check if feature enabled for user
|
|
93
|
+
const showNewFeature = await client.variation(
|
|
94
|
+
'new-checkout-flow',
|
|
95
|
+
{ key: user.id, email: user.email },
|
|
96
|
+
false // default value
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
if (showNewFeature) {
|
|
100
|
+
// New code path
|
|
101
|
+
} else {
|
|
102
|
+
// Old code path
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Targeting Rules:**
|
|
107
|
+
```yaml
|
|
108
|
+
feature: new-checkout-flow
|
|
109
|
+
variations:
|
|
110
|
+
- on: true
|
|
111
|
+
- off: false
|
|
112
|
+
targeting:
|
|
113
|
+
- rule: Internal employees
|
|
114
|
+
serve: on
|
|
115
|
+
match: email ends with "@company.com"
|
|
116
|
+
|
|
117
|
+
- rule: Beta testers
|
|
118
|
+
serve: on
|
|
119
|
+
match: user in segment "beta-users"
|
|
120
|
+
|
|
121
|
+
- rule: Percentage rollout
|
|
122
|
+
serve: on
|
|
123
|
+
match: 10% of users (by user ID hash)
|
|
124
|
+
|
|
125
|
+
default: off
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### 2. Canary Deployments
|
|
131
|
+
|
|
132
|
+
**Concept:** Deploy new version to small percentage of infrastructure, monitor, then gradually increase.
|
|
133
|
+
|
|
134
|
+
**Manual Canary with Kubernetes:**
|
|
135
|
+
```bash
|
|
136
|
+
# Deploy new version to 5% of pods
|
|
137
|
+
kubectl set image deployment/api api=v2.0 --record
|
|
138
|
+
|
|
139
|
+
# Monitor for 10 minutes
|
|
140
|
+
./monitor-metrics.sh --deployment=api --duration=10m \
|
|
141
|
+
--metrics="error_rate,latency_p95,cpu_usage"
|
|
142
|
+
|
|
143
|
+
# If healthy, scale up gradually
|
|
144
|
+
kubectl scale deployment/api-v2 --replicas=20 # 10%
|
|
145
|
+
./monitor-metrics.sh --duration=10m
|
|
146
|
+
|
|
147
|
+
kubectl scale deployment/api-v2 --replicas=100 # 50%
|
|
148
|
+
./monitor-metrics.sh --duration=10m
|
|
149
|
+
|
|
150
|
+
kubectl scale deployment/api-v2 --replicas=200 # 100%
|
|
151
|
+
kubectl scale deployment/api-v1 --replicas=0 # Remove old
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Automated Canary with Flagger:**
|
|
155
|
+
```yaml
|
|
156
|
+
apiVersion: flagger.app/v1beta1
|
|
157
|
+
kind: Canary
|
|
158
|
+
metadata:
|
|
159
|
+
name: api-canary
|
|
160
|
+
spec:
|
|
161
|
+
targetRef:
|
|
162
|
+
apiVersion: apps/v1
|
|
163
|
+
kind: Deployment
|
|
164
|
+
name: api
|
|
165
|
+
|
|
166
|
+
# Canary analysis configuration
|
|
167
|
+
analysis:
|
|
168
|
+
interval: 1m # Check every minute
|
|
169
|
+
threshold: 10 # Fail after 10 failed checks
|
|
170
|
+
maxWeight: 50 # Max 50% canary traffic
|
|
171
|
+
stepWeight: 10 # Increase by 10% each step
|
|
172
|
+
|
|
173
|
+
# Success metrics (must pass)
|
|
174
|
+
metrics:
|
|
175
|
+
- name: request-success-rate
|
|
176
|
+
thresholdRange:
|
|
177
|
+
min: 99 # 99%+ success rate required
|
|
178
|
+
|
|
179
|
+
- name: request-duration-p95
|
|
180
|
+
thresholdRange:
|
|
181
|
+
max: 500 # p95 latency < 500ms
|
|
182
|
+
|
|
183
|
+
- name: error-rate
|
|
184
|
+
thresholdRange:
|
|
185
|
+
max: 1 # < 1% errors
|
|
186
|
+
|
|
187
|
+
# Webhook notifications
|
|
188
|
+
webhooks:
|
|
189
|
+
- name: slack-notification
|
|
190
|
+
url: https://hooks.slack.com/services/YOUR/WEBHOOK
|
|
191
|
+
type: post-rollout
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Automated Process:**
|
|
195
|
+
1. Deploy v2 to 10% of traffic
|
|
196
|
+
2. Monitor success rate, latency, errors
|
|
197
|
+
3. If metrics healthy → increase to 20%
|
|
198
|
+
4. Continue until 100% or failure detected
|
|
199
|
+
5. On failure → automatic rollback to v1
|
|
200
|
+
|
|
201
|
+
**Benefits:**
|
|
202
|
+
- Real production validation
|
|
203
|
+
- Gradual risk mitigation
|
|
204
|
+
- Automatic rollback on failures
|
|
205
|
+
- Minimal blast radius (5-10% impact)
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### 3. Synthetic Monitoring (Active Testing)
|
|
210
|
+
|
|
211
|
+
**Concept:** Continuously run automated tests against production to detect issues before users do.
|
|
212
|
+
|
|
213
|
+
**Playwright Synthetic Monitor:**
|
|
214
|
+
```javascript
|
|
215
|
+
// synthetic-monitor.js
|
|
216
|
+
import { chromium } from 'playwright';
|
|
217
|
+
|
|
218
|
+
async function runCheckoutFlowMonitor() {
|
|
219
|
+
const browser = await chromium.launch();
|
|
220
|
+
const page = await browser.newPage();
|
|
221
|
+
const start = Date.now();
|
|
222
|
+
|
|
223
|
+
try {
|
|
224
|
+
// Critical user journey: Add to cart → Checkout
|
|
225
|
+
await page.goto('https://example.com');
|
|
226
|
+
await page.click('[data-test=add-to-cart]');
|
|
227
|
+
await page.click('[data-test=checkout]');
|
|
228
|
+
await page.fill('[data-test=email]', 'synthetic@monitor.test');
|
|
229
|
+
await page.fill('[data-test=card]', '4242424242424242'); // Test mode
|
|
230
|
+
|
|
231
|
+
// Don't actually complete purchase (test mode stops here)
|
|
232
|
+
|
|
233
|
+
const duration = Date.now() - start;
|
|
234
|
+
|
|
235
|
+
// Report success metric
|
|
236
|
+
await reportMetric('checkout-flow', {
|
|
237
|
+
success: true,
|
|
238
|
+
duration,
|
|
239
|
+
timestamp: new Date()
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
console.log(`✅ Checkout flow healthy (${duration}ms)`);
|
|
243
|
+
|
|
244
|
+
} catch (error) {
|
|
245
|
+
// Alert on failure
|
|
246
|
+
await reportMetric('checkout-flow', {
|
|
247
|
+
success: false,
|
|
248
|
+
error: error.message,
|
|
249
|
+
timestamp: new Date()
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
await alertOncall({
|
|
253
|
+
severity: 'critical',
|
|
254
|
+
message: 'Checkout flow failed in production',
|
|
255
|
+
error: error.message
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
console.error(`❌ Checkout flow failed: ${error.message}`);
|
|
259
|
+
} finally {
|
|
260
|
+
await browser.close();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Run every 5 minutes
|
|
265
|
+
setInterval(runCheckoutFlowMonitor, 5 * 60 * 1000);
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Datadog Synthetic Monitoring:**
|
|
269
|
+
```yaml
|
|
270
|
+
# synthetics.yaml
|
|
271
|
+
tests:
|
|
272
|
+
- name: "API Health Check"
|
|
273
|
+
type: api
|
|
274
|
+
request:
|
|
275
|
+
url: "https://api.example.com/health"
|
|
276
|
+
method: GET
|
|
277
|
+
assertions:
|
|
278
|
+
- type: statusCode
|
|
279
|
+
operator: is
|
|
280
|
+
target: 200
|
|
281
|
+
- type: responseTime
|
|
282
|
+
operator: lessThan
|
|
283
|
+
target: 500
|
|
284
|
+
locations: ["us-east-1", "eu-west-1", "ap-southeast-1"]
|
|
285
|
+
frequency: 300 # 5 minutes
|
|
286
|
+
|
|
287
|
+
- name: "Checkout Flow E2E"
|
|
288
|
+
type: browser
|
|
289
|
+
steps:
|
|
290
|
+
- type: navigateTo
|
|
291
|
+
url: "https://example.com"
|
|
292
|
+
- type: click
|
|
293
|
+
selector: "[data-test=add-to-cart]"
|
|
294
|
+
- type: click
|
|
295
|
+
selector: "[data-test=checkout]"
|
|
296
|
+
assertions:
|
|
297
|
+
- type: element
|
|
298
|
+
selector: "[data-test=checkout-success]"
|
|
299
|
+
operator: isVisible
|
|
300
|
+
frequency: 600 # 10 minutes
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Benefits:**
|
|
304
|
+
- Proactive issue detection
|
|
305
|
+
- User experience validation
|
|
306
|
+
- SLA monitoring
|
|
307
|
+
- Geographic validation (test from multiple regions)
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
### 4. Chaos Engineering (Resilience Testing)
|
|
312
|
+
|
|
313
|
+
**Concept:** Intentionally introduce failures in production to validate system resilience.
|
|
314
|
+
|
|
315
|
+
**Principles (Netflix Chaos Monkey):**
|
|
316
|
+
1. Define steady state (normal system behavior)
|
|
317
|
+
2. Hypothesize steady state continues during chaos
|
|
318
|
+
3. Introduce real-world failures
|
|
319
|
+
4. Try to disprove hypothesis
|
|
320
|
+
5. Minimize blast radius
|
|
321
|
+
|
|
322
|
+
**Example: Instance Failure Test**
|
|
323
|
+
```javascript
|
|
324
|
+
import { ChaosMonkey } from './chaos';
|
|
325
|
+
|
|
326
|
+
async function testInstanceResilience() {
|
|
327
|
+
// 1. Baseline: Record normal behavior
|
|
328
|
+
const baseline = await collectMetrics('api', '5m');
|
|
329
|
+
console.log(`Baseline: ${baseline.successRate}% success, ${baseline.latencyP95}ms p95`);
|
|
330
|
+
|
|
331
|
+
// 2. Hypothesis: System handles 1 instance failure gracefully
|
|
332
|
+
console.log('Hypothesis: Killing 1 instance won\'t impact users');
|
|
333
|
+
|
|
334
|
+
// 3. Introduce chaos (kill random instance)
|
|
335
|
+
await ChaosMonkey.killRandomInstance({
|
|
336
|
+
service: 'api',
|
|
337
|
+
count: 1, // Kill 1 instance
|
|
338
|
+
duration: '5m'
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// 4. Measure impact
|
|
342
|
+
const chaosMetrics = await collectMetrics('api', '5m');
|
|
343
|
+
console.log(`During chaos: ${chaosMetrics.successRate}% success, ${chaosMetrics.latencyP95}ms p95`);
|
|
344
|
+
|
|
345
|
+
// 5. Verify hypothesis
|
|
346
|
+
const successRateDrop = baseline.successRate - chaosMetrics.successRate;
|
|
347
|
+
const latencyIncrease = chaosMetrics.latencyP95 - baseline.latencyP95;
|
|
348
|
+
|
|
349
|
+
if (successRateDrop < 0.1 && latencyIncrease < 50) {
|
|
350
|
+
console.log('✅ System is resilient to instance failures');
|
|
351
|
+
} else {
|
|
352
|
+
console.log('❌ System not resilient. Add redundancy!');
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// Run weekly during low traffic
|
|
357
|
+
schedule.weekly('Sunday 3am', testInstanceResilience);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Common Chaos Experiments:**
|
|
361
|
+
|
|
362
|
+
**a) Instance Failures**
|
|
363
|
+
```javascript
|
|
364
|
+
// Kill random instances (10% of fleet)
|
|
365
|
+
await ChaosMonkey.killRandomInstance({
|
|
366
|
+
service: 'api',
|
|
367
|
+
percentage: 10,
|
|
368
|
+
duration: '10m'
|
|
369
|
+
});
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**b) Network Latency**
|
|
373
|
+
```javascript
|
|
374
|
+
// Inject 500ms latency to database calls
|
|
375
|
+
await ChaosMonkey.injectLatency({
|
|
376
|
+
service: 'database',
|
|
377
|
+
latency: '500ms',
|
|
378
|
+
percentage: 20 // 20% of requests
|
|
379
|
+
});
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**c) Dependency Failures**
|
|
383
|
+
```javascript
|
|
384
|
+
// Simulate payment gateway outage
|
|
385
|
+
await ChaosMonkey.blockService({
|
|
386
|
+
service: 'payment-gateway',
|
|
387
|
+
duration: '5m'
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// Verify: Graceful degradation? Retry logic working?
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**d) Resource Exhaustion**
|
|
394
|
+
```javascript
|
|
395
|
+
// Stress test: High CPU load
|
|
396
|
+
await ChaosMonkey.stressCPU({
|
|
397
|
+
service: 'api',
|
|
398
|
+
percentage: 80, // 80% CPU usage
|
|
399
|
+
duration: '10m'
|
|
400
|
+
});
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Chaos Testing Tools:**
|
|
404
|
+
- Chaos Monkey (Netflix) - Random instance termination
|
|
405
|
+
- Chaos Toolkit - Programmable chaos experiments
|
|
406
|
+
- Gremlin - Chaos engineering platform
|
|
407
|
+
- Litmus Chaos - Kubernetes chaos engineering
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
### 5. A/B Testing (Hypothesis Validation)
|
|
412
|
+
|
|
413
|
+
**Concept:** Test two versions in production to determine which performs better.
|
|
414
|
+
|
|
415
|
+
```javascript
|
|
416
|
+
import { ABTest } from './ab-testing';
|
|
417
|
+
|
|
418
|
+
// Define A/B test
|
|
419
|
+
const checkoutTest = ABTest.create({
|
|
420
|
+
name: 'checkout-redesign',
|
|
421
|
+
hypothesis: 'New checkout flow increases conversion by 10%',
|
|
422
|
+
|
|
423
|
+
variants: {
|
|
424
|
+
control: {
|
|
425
|
+
weight: 50, // 50% of traffic
|
|
426
|
+
implementation: () => <OldCheckout />
|
|
427
|
+
},
|
|
428
|
+
treatment: {
|
|
429
|
+
weight: 50, // 50% of traffic
|
|
430
|
+
implementation: () => <NewCheckout />
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
metrics: {
|
|
435
|
+
primary: 'conversion_rate', // Primary success metric
|
|
436
|
+
secondary: ['cart_abandonment', 'time_to_purchase']
|
|
437
|
+
},
|
|
438
|
+
|
|
439
|
+
sample_size: 10000, // Users needed for statistical significance
|
|
440
|
+
confidence: 0.95 // 95% confidence level
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
// Render based on variant
|
|
444
|
+
function CheckoutPage({ user }) {
|
|
445
|
+
const variant = checkoutTest.getVariant(user.id);
|
|
446
|
+
const Checkout = variant.implementation;
|
|
447
|
+
|
|
448
|
+
// Track metrics
|
|
449
|
+
useEffect(() => {
|
|
450
|
+
checkoutTest.trackImpression(user.id, variant.name);
|
|
451
|
+
}, []);
|
|
452
|
+
|
|
453
|
+
return <Checkout onComplete={() => {
|
|
454
|
+
checkoutTest.trackConversion(user.id, variant.name);
|
|
455
|
+
}} />;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// Analyze results after sufficient data
|
|
459
|
+
async function analyzeTest() {
|
|
460
|
+
const results = await checkoutTest.analyze();
|
|
461
|
+
|
|
462
|
+
console.log(`Control conversion: ${results.control.conversionRate}%`);
|
|
463
|
+
console.log(`Treatment conversion: ${results.treatment.conversionRate}%`);
|
|
464
|
+
console.log(`Lift: ${results.lift}%`);
|
|
465
|
+
console.log(`P-value: ${results.pValue}`);
|
|
466
|
+
console.log(`Statistical significance: ${results.significant ? 'YES' : 'NO'}`);
|
|
467
|
+
|
|
468
|
+
if (results.significant && results.lift > 0) {
|
|
469
|
+
console.log('✅ Treatment wins! Rolling out to 100%');
|
|
470
|
+
await rolloutToProduction('treatment');
|
|
471
|
+
} else {
|
|
472
|
+
console.log('❌ No significant improvement. Keeping control.');
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## Shift-Right Best Practices
|
|
480
|
+
|
|
481
|
+
### 1. Minimize Blast Radius
|
|
482
|
+
|
|
483
|
+
**Always limit exposure:**
|
|
484
|
+
- Feature flags: 1% → 10% → 50% → 100%
|
|
485
|
+
- Canary: 5% → 10% → 25% → 50% → 100%
|
|
486
|
+
- Geographic: 1 region → 2 regions → All regions
|
|
487
|
+
|
|
488
|
+
### 2. Automate Rollback
|
|
489
|
+
|
|
490
|
+
**Never rely on manual rollback:**
|
|
491
|
+
```javascript
|
|
492
|
+
// Automatic rollback on error rate spike
|
|
493
|
+
if (errorRate > 1% || latencyP95 > 500) {
|
|
494
|
+
await rollback();
|
|
495
|
+
await alert('Automatic rollback triggered');
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### 3. Monitor Everything
|
|
500
|
+
|
|
501
|
+
**Key Metrics:**
|
|
502
|
+
- Success/error rates
|
|
503
|
+
- Latency (p50, p95, p99)
|
|
504
|
+
- CPU/memory usage
|
|
505
|
+
- User-facing metrics (conversion, engagement)
|
|
506
|
+
|
|
507
|
+
### 4. Test During Low Traffic
|
|
508
|
+
|
|
509
|
+
**Chaos engineering schedule:**
|
|
510
|
+
- Weekday mornings: Low traffic
|
|
511
|
+
- Sunday 3am: Minimal users
|
|
512
|
+
- Avoid holidays, sales events
|
|
513
|
+
|
|
514
|
+
### 5. Have a Kill Switch
|
|
515
|
+
|
|
516
|
+
**Emergency stop for everything:**
|
|
517
|
+
```javascript
|
|
518
|
+
// Global kill switch (stops all experiments)
|
|
519
|
+
if (FeatureFlags.isEnabled('global-kill-switch')) {
|
|
520
|
+
return <SafeMode />; // Fallback to known-good state
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Shift-Right Metrics
|
|
527
|
+
|
|
528
|
+
**1. Mean Time to Detect (MTTD)**
|
|
529
|
+
```
|
|
530
|
+
Time from issue occurrence to detection
|
|
531
|
+
|
|
532
|
+
Target: < 5 minutes (synthetic monitoring)
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**2. Mean Time to Recover (MTTR)**
|
|
536
|
+
```
|
|
537
|
+
Time from detection to resolution
|
|
538
|
+
|
|
539
|
+
Target: < 15 minutes (with automatic rollback)
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**3. Blast Radius**
|
|
543
|
+
```
|
|
544
|
+
Percentage of users impacted by failure
|
|
545
|
+
|
|
546
|
+
Target: < 10% (canary deployment)
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
**4. False Positive Rate**
|
|
550
|
+
```
|
|
551
|
+
Alerts that weren't real issues
|
|
552
|
+
|
|
553
|
+
Target: < 5%
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
## Related Skills
|
|
559
|
+
|
|
560
|
+
**Testing Methodologies:**
|
|
561
|
+
- [shift-left-testing](../shift-left-testing/) - Testing BEFORE production (complement)
|
|
562
|
+
- [chaos-engineering-resilience](../chaos-engineering-resilience/) - Detailed chaos testing
|
|
563
|
+
- [regression-testing](../regression-testing/)
|
|
564
|
+
|
|
565
|
+
**Infrastructure:**
|
|
566
|
+
- [test-environment-management](../test-environment-management/)
|
|
567
|
+
- [performance-testing](../performance-testing/)
|
|
568
|
+
|
|
569
|
+
**Monitoring:**
|
|
570
|
+
- [test-reporting-analytics](../test-reporting-analytics/)
|
|
571
|
+
- [production-intelligence](../production-intelligence/) (agent)
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Remember
|
|
576
|
+
|
|
577
|
+
**Production is the ultimate test environment.**
|
|
578
|
+
|
|
579
|
+
**Shift-Right complements Shift-Left:**
|
|
580
|
+
- **Shift-Left**: Catch bugs early (cheap)
|
|
581
|
+
- **Shift-Right**: Validate real-world behavior (accurate)
|
|
582
|
+
|
|
583
|
+
**Best Practices:**
|
|
584
|
+
1. Use feature flags for safe deployments
|
|
585
|
+
2. Canary deploy with automatic rollback
|
|
586
|
+
3. Synthetic monitoring for proactive detection
|
|
587
|
+
4. Chaos engineering for resilience
|
|
588
|
+
5. Always minimize blast radius
|
|
589
|
+
6. Monitor everything, alert intelligently
|
|
590
|
+
|
|
591
|
+
**With Agents:** `qe-production-intelligence` monitors production metrics and converts real usage patterns into tests. `qe-chaos-engineer` orchestrates safe chaos experiments with automatic rollback. Together, they enable comprehensive shift-right testing with minimal risk.
|