feat(Deployment): Integrate Ansible deployment via PHP deployment pipeline

- Create AnsibleDeployStage using framework's Process module for secure command execution
- Integrate AnsibleDeployStage into DeploymentPipelineCommands for production deployments
- Add force_deploy flag support in Ansible playbook to override stale locks
- Use PHP deployment module as orchestrator (php console.php deploy:production)
- Fix ErrorAggregationInitializer to use Environment class instead of $_ENV superglobal

Architecture:
- BuildStage → AnsibleDeployStage → HealthCheckStage for production
- Process module provides timeout, error handling, and output capture
- Ansible playbook supports rollback via rollback-git-based.yml
- Zero-downtime deployments with health checks
This commit is contained in:
2025-10-26 14:08:07 +01:00
parent a90263d3be
commit 3b623e7afb
170 changed files with 19888 additions and 575 deletions

View File

@@ -72,4 +72,43 @@ interface PerformanceStorage
* Clear old prediction records (cleanup)
*/
public function clearOldPredictions(Duration $olderThan): int;
/**
* Get recent predictions (limit-based)
*
* @return array<array{
* model_name: string,
* version: string,
* prediction: mixed,
* actual: mixed,
* confidence: float,
* features: array,
* timestamp: \DateTimeImmutable,
* is_correct: ?bool
* }>
*/
public function getRecentPredictions(
string $modelName,
Version $version,
int $limit
): array;
/**
* Calculate accuracy from recent predictions
*/
public function calculateAccuracy(
string $modelName,
Version $version,
int $limit
): float;
/**
* Get confidence baseline
*
* @return array{avg_confidence: float, std_dev_confidence: float}|null
*/
public function getConfidenceBaseline(
string $modelName,
Version $version
): ?array;
}