feat(ai): enforce single-writer automation router
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m21s
CD Pipeline / build-and-deploy (push) Successful in 6m53s
CD Pipeline / post-deploy-checks (push) Successful in 1m55s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 49s

This commit is contained in:
ogt
2026-07-11 05:45:48 +08:00
parent 01605b4947
commit f453359e34
20 changed files with 1674 additions and 570 deletions

View File

@@ -193,6 +193,18 @@ class ApprovalExecutionService:
"""
from src.services.notifications import ExecutionStatus
if self._is_auto_approved_request(approval):
logger.error(
"auto_approved_direct_execution_blocked",
approval_id=str(getattr(approval, "id", "")),
incident_id=getattr(approval, "incident_id", None),
requested_by=getattr(approval, "requested_by", None),
required_executor="awoooi-ansible-executor-broker",
)
raise RuntimeError(
"auto_approved_direct_execution_disabled_use_single_writer_broker"
)
logger.info(
"background_execution_start",
approval_id=str(approval.id),