feat(iwooos): show controlled cd lane live metric proof
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 42s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 42s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
This commit is contained in:
@@ -14,6 +14,7 @@ from src.services.ai_agent_log_controlled_writeback_executor_readback import (
|
||||
)
|
||||
from src.services.awoooi_priority_work_order_readback import (
|
||||
apply_ai_loop_current_blocker_execution_queue,
|
||||
apply_controlled_cd_lane_live_metric_readback,
|
||||
apply_harbor_registry_controlled_recovery_preflight,
|
||||
apply_stockplatform_public_api_controlled_recovery_preflight,
|
||||
apply_stockplatform_public_api_runtime_readback,
|
||||
@@ -104,6 +105,11 @@ def test_awoooi_priority_work_order_readback_endpoint_returns_snapshot(
|
||||
"load_latest_harbor_registry_controlled_recovery_preflight",
|
||||
_harbor_registry_ready,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
agents,
|
||||
"load_controlled_cd_lane_live_metric_readback",
|
||||
_controlled_cd_lane_live_metrics,
|
||||
)
|
||||
app = FastAPI()
|
||||
app.include_router(router, prefix="/api/v1")
|
||||
client = TestClient(app)
|
||||
@@ -124,6 +130,28 @@ def test_awoooi_priority_work_order_readback_endpoint_returns_snapshot(
|
||||
data["mainline_execution_state"]["ai_loop_current_blocker_registry_v2_ready"]
|
||||
is True
|
||||
)
|
||||
assert (
|
||||
data["mainline_execution_state"][
|
||||
"controlled_cd_lane_live_enforcer_metric_present"
|
||||
]
|
||||
is True
|
||||
)
|
||||
assert (
|
||||
data["mainline_execution_state"][
|
||||
"controlled_cd_lane_live_enforcer_last_run_fresh"
|
||||
]
|
||||
is True
|
||||
)
|
||||
assert (
|
||||
data["mainline_execution_state"][
|
||||
"controlled_cd_lane_live_controlled_drain_active_allowed"
|
||||
]
|
||||
is False
|
||||
)
|
||||
assert data["summary"]["controlled_cd_lane_live_metric_status"] == (
|
||||
"controlled_cd_lane_live_metric_readback_ready"
|
||||
)
|
||||
assert data["summary"]["controlled_cd_lane_live_metric_metadata_only"] is True
|
||||
assert data["mainline_execution_state"][
|
||||
"ai_loop_current_blocker_deploy_marker_readback_required"
|
||||
] is False
|
||||
@@ -158,6 +186,11 @@ def test_awoooi_priority_work_order_readback_endpoint_redacts_ai_loop_queue(
|
||||
"load_latest_harbor_registry_controlled_recovery_preflight",
|
||||
_harbor_registry_upstream_502,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
agents,
|
||||
"load_controlled_cd_lane_live_metric_readback",
|
||||
_controlled_cd_lane_live_metrics,
|
||||
)
|
||||
app = FastAPI()
|
||||
app.include_router(router, prefix="/api/v1")
|
||||
client = TestClient(app)
|
||||
@@ -929,6 +962,33 @@ def _stockplatform_runtime_ready() -> dict:
|
||||
}
|
||||
|
||||
|
||||
def _controlled_cd_lane_live_metrics() -> dict:
|
||||
return {
|
||||
"schema_version": "controlled_cd_lane_live_metric_readback_v1",
|
||||
"status": "controlled_cd_lane_live_metric_readback_ready",
|
||||
"source": "node_exporter_text_metrics",
|
||||
"metadata_only": True,
|
||||
"active_blockers": [
|
||||
"controlled_cd_lane_active_not_allowed_yet",
|
||||
"controlled_cd_lane_staging_not_allowed_yet",
|
||||
],
|
||||
"readback": {
|
||||
"enforcer_metric_present": True,
|
||||
"enforcer_last_run_timestamp": 1782961969.0,
|
||||
"enforcer_last_run_fresh": True,
|
||||
"enforcer_apply_performed": 1,
|
||||
"active_job_containers": 0,
|
||||
"lane_process_count": 0,
|
||||
"root_restore_sources_left": 0,
|
||||
"controlled_drain_active_allowed": False,
|
||||
"controlled_drain_staging_allowed": False,
|
||||
"host_load5_per_core": 0.64,
|
||||
"gitea_actions_active_container_count": 0,
|
||||
"gitea_actions_active_process_count": 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _stockplatform_runtime_blocked() -> dict:
|
||||
return {
|
||||
"schema_version": "stockplatform_public_api_runtime_readback_v1",
|
||||
|
||||
Reference in New Issue
Block a user