fix(agent): prioritize harbor ai loop blocker
This commit is contained in:
@@ -503,11 +503,6 @@ def apply_ai_loop_current_blocker_execution_queue(
|
||||
executor_readback: dict[str, Any],
|
||||
) -> None:
|
||||
"""Overlay the AI Loop current blocker queue onto the ordered work board."""
|
||||
if payload.get("status") != (
|
||||
"p0_006_blocked_harbor_registry_controlled_recovery_preflight"
|
||||
):
|
||||
return
|
||||
|
||||
context = _dict(executor_readback.get("agent_consumption_context"))
|
||||
queue = list(_list(context.get("current_blocker_execution_queue")))
|
||||
if not queue:
|
||||
@@ -515,6 +510,12 @@ def apply_ai_loop_current_blocker_execution_queue(
|
||||
|
||||
first_item = _dict(queue[0])
|
||||
blocker_id = str(first_item.get("blocker_id") or "")
|
||||
if not _ai_loop_current_blocker_can_override(
|
||||
status=str(payload.get("status") or ""),
|
||||
blocker_id=blocker_id,
|
||||
):
|
||||
return
|
||||
|
||||
controlled_recovery_package = str(
|
||||
first_item.get("controlled_recovery_package") or ""
|
||||
)
|
||||
@@ -801,6 +802,14 @@ def apply_ai_loop_current_blocker_execution_queue(
|
||||
)
|
||||
|
||||
|
||||
def _ai_loop_current_blocker_can_override(*, status: str, blocker_id: str) -> bool:
|
||||
if status == "p0_006_blocked_harbor_registry_controlled_recovery_preflight":
|
||||
return True
|
||||
if status == "p0_006_blocked_stockplatform_public_api_runtime_drift":
|
||||
return blocker_id.startswith("harbor_110_")
|
||||
return False
|
||||
|
||||
|
||||
def _harbor_registry_next_state(*, status: str, candidate_packaged: bool) -> str:
|
||||
if candidate_packaged and "upstream_502" in status:
|
||||
return (
|
||||
|
||||
@@ -491,6 +491,41 @@ def test_awoooi_priority_work_order_readback_overlays_live_stockplatform_drift()
|
||||
)
|
||||
|
||||
|
||||
def test_awoooi_priority_work_order_ai_loop_overrides_stockplatform_drift_for_harbor_110_blocker():
|
||||
payload = load_latest_awoooi_priority_work_order_readback()
|
||||
executor = load_latest_ai_agent_log_controlled_writeback_executor_readback()
|
||||
|
||||
apply_stockplatform_public_api_runtime_readback(
|
||||
payload,
|
||||
_stockplatform_runtime_blocked(),
|
||||
)
|
||||
apply_ai_loop_current_blocker_execution_queue(payload, executor)
|
||||
|
||||
state = payload["mainline_execution_state"]
|
||||
assert payload["status"] == (
|
||||
"p0_006_blocked_ai_loop_current_blocker_execution_queue"
|
||||
)
|
||||
assert state["active_p0_state"] == (
|
||||
"blocked_ai_loop_current_blocker_execution_queue"
|
||||
)
|
||||
assert state["next_executable_mainline_workplan_id"] == (
|
||||
"P0-006-AI-LOOP-CURRENT-BLOCKER-EXECUTION-QUEUE"
|
||||
)
|
||||
assert state["stockplatform_public_api_live_readback_state"] == "blocked"
|
||||
assert state["ai_loop_current_blocker_id"] == (
|
||||
"harbor_110_remote_ssh_publickey_auth_stalled"
|
||||
)
|
||||
assert state["ai_loop_current_blocker_control_path_blocker"] == (
|
||||
"remote_ssh_server_accepts_key_then_session_timeout"
|
||||
)
|
||||
assert payload["summary"]["ai_loop_current_blocker_id"] == (
|
||||
"harbor_110_remote_ssh_publickey_auth_stalled"
|
||||
)
|
||||
assert payload["next_execution_order"][0].startswith(
|
||||
"P0-006-AI-LOOP-CURRENT-BLOCKER-EXECUTION-QUEUE"
|
||||
)
|
||||
|
||||
|
||||
def test_awoooi_priority_work_order_readback_overlays_controlled_recovery_preflight():
|
||||
payload = load_latest_awoooi_priority_work_order_readback()
|
||||
runtime = _stockplatform_runtime_blocked()
|
||||
|
||||
Reference in New Issue
Block a user