fix(agents): retry autonomous runtime deploy readback
This commit is contained in:
@@ -23,7 +23,8 @@ from src.services.report_generation_service import (
|
||||
|
||||
_SCHEMA_VERSION = "ai_agent_autonomous_runtime_control_v1"
|
||||
_RUNTIME_AUTHORITY = "current_owner_directive_controlled_ai_automation"
|
||||
_DEPLOY_READBACK_MARKER = "p2_416_d1n_autonomous_runtime_control_prod_readback_v1"
|
||||
_DEPLOY_READBACK_MARKER = "p2_416_d1n_autonomous_runtime_control_prod_readback_v2"
|
||||
_DEPLOY_ATTEMPT_NOTE = "cd_3660_failed_host_pressure_guard_retry"
|
||||
|
||||
|
||||
def _allowed_risk_levels() -> list[str]:
|
||||
@@ -139,6 +140,7 @@ def build_ai_agent_autonomous_runtime_control() -> dict[str, Any]:
|
||||
"status": "current_directive_control_plane_active",
|
||||
"runtime_authority": _RUNTIME_AUTHORITY,
|
||||
"deploy_readback_marker": _DEPLOY_READBACK_MARKER,
|
||||
"deploy_attempt_note": _DEPLOY_ATTEMPT_NOTE,
|
||||
"legacy_no_send_no_live_rules_overridden": True,
|
||||
"implementation_completion_percent": 88,
|
||||
"status_note": (
|
||||
@@ -250,6 +252,8 @@ def _validate_payload(payload: dict[str, Any]) -> None:
|
||||
raise ValueError(f"runtime_authority must be {_RUNTIME_AUTHORITY}")
|
||||
if status.get("deploy_readback_marker") != _DEPLOY_READBACK_MARKER:
|
||||
raise ValueError(f"deploy_readback_marker must be {_DEPLOY_READBACK_MARKER}")
|
||||
if status.get("deploy_attempt_note") != _DEPLOY_ATTEMPT_NOTE:
|
||||
raise ValueError(f"deploy_attempt_note must be {_DEPLOY_ATTEMPT_NOTE}")
|
||||
policy = payload.get("current_policy") or {}
|
||||
for key in (
|
||||
"low_risk_controlled_apply_allowed",
|
||||
|
||||
@@ -11,7 +11,10 @@ def test_ai_agent_autonomous_runtime_control_uses_current_owner_directive():
|
||||
"current_owner_directive_controlled_ai_automation"
|
||||
)
|
||||
assert data["program_status"]["deploy_readback_marker"] == (
|
||||
"p2_416_d1n_autonomous_runtime_control_prod_readback_v1"
|
||||
"p2_416_d1n_autonomous_runtime_control_prod_readback_v2"
|
||||
)
|
||||
assert data["program_status"]["deploy_attempt_note"] == (
|
||||
"cd_3660_failed_host_pressure_guard_retry"
|
||||
)
|
||||
assert data["program_status"]["legacy_no_send_no_live_rules_overridden"] is True
|
||||
assert data["program_status"]["implementation_completion_percent"] == 88
|
||||
|
||||
@@ -52,7 +52,10 @@ def test_get_ai_agent_autonomous_runtime_control_api():
|
||||
"current_owner_directive_controlled_ai_automation"
|
||||
)
|
||||
assert data["program_status"]["deploy_readback_marker"] == (
|
||||
"p2_416_d1n_autonomous_runtime_control_prod_readback_v1"
|
||||
"p2_416_d1n_autonomous_runtime_control_prod_readback_v2"
|
||||
)
|
||||
assert data["program_status"]["deploy_attempt_note"] == (
|
||||
"cd_3660_failed_host_pressure_guard_retry"
|
||||
)
|
||||
assert data["current_policy"]["owner_review_required_for_low_medium_high"] is False
|
||||
assert data["report_delivery"]["status"] == "telegram_gateway_delivery_enabled"
|
||||
|
||||
Reference in New Issue
Block a user