docs(agent99): advance mainline to alert routing
This commit is contained in:
@@ -53,6 +53,7 @@ def load_latest_agent99_enterprise_ai_automation_work_items(
|
||||
priority_counts = {priority: 0 for priority in _VALID_PRIORITIES}
|
||||
status_counts = {status: 0 for status in _VALID_STATUSES}
|
||||
p0_ids: list[str] = []
|
||||
active_p0_ids: list[str] = []
|
||||
|
||||
for index, item in enumerate(work_items, start=1):
|
||||
if not isinstance(item, dict):
|
||||
@@ -78,6 +79,8 @@ def load_latest_agent99_enterprise_ai_automation_work_items(
|
||||
status_counts[item_status] += 1
|
||||
if priority == "P0":
|
||||
p0_ids.append(item_id)
|
||||
if item_status != "complete":
|
||||
active_p0_ids.append(item_id)
|
||||
missing = [field for field in required_p0_fields if item.get(field) is None]
|
||||
if missing:
|
||||
raise ValueError(f"{path}: {item_id} missing P0 fields: {missing}")
|
||||
@@ -88,12 +91,14 @@ def load_latest_agent99_enterprise_ai_automation_work_items(
|
||||
raise ValueError(f"{path}: work item order is not contiguous")
|
||||
|
||||
current_p0_id = current_p0.get("id")
|
||||
if current_p0_id not in p0_ids:
|
||||
raise ValueError(f"{path}: current_p0.id is not a P0 work item")
|
||||
if not p0_ids or p0_ids[0] != current_p0_id:
|
||||
raise ValueError(f"{path}: current_p0 must be the first ordered P0")
|
||||
if payload.get("next_execution_order") != p0_ids:
|
||||
raise ValueError(f"{path}: next_execution_order must equal ordered P0 ids")
|
||||
if current_p0_id not in active_p0_ids:
|
||||
raise ValueError(f"{path}: current_p0.id is not an active P0 work item")
|
||||
if not active_p0_ids or active_p0_ids[0] != current_p0_id:
|
||||
raise ValueError(f"{path}: current_p0 must be the first ordered active P0")
|
||||
if payload.get("next_execution_order") != active_p0_ids:
|
||||
raise ValueError(
|
||||
f"{path}: next_execution_order must equal ordered active P0 ids"
|
||||
)
|
||||
|
||||
_require_count(summary, "p0_count", priority_counts["P0"], path)
|
||||
_require_count(summary, "p1_count", priority_counts["P1"], path)
|
||||
|
||||
Reference in New Issue
Block a user