fix(agent): prioritize harbor ai loop blocker

This commit is contained in:
Your Name
2026-07-01 12:50:53 +08:00
parent ce5bcab8b5
commit 4b5f8ea537
3 changed files with 63 additions and 5 deletions

View File

@@ -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 (