feat(web): add source-first Python autopilot and optimize provider waits
This commit is contained in:
@@ -49,16 +49,13 @@ def main() -> int:
|
||||
product = status["progress"].get("productMigration", {})
|
||||
product_pid = product.get("pid")
|
||||
product_alive = isinstance(product_pid, int) and (Path("/proc") / str(product_pid)).exists()
|
||||
product_complete = (
|
||||
product.get("workflowTotal", 0) > 0
|
||||
and product.get("workflowImplemented") == product.get("workflowTotal")
|
||||
and product.get("taskImplemented") == product.get("taskTotal")
|
||||
)
|
||||
product_complete = status.get("autopilot", {}).get("state") == "complete"
|
||||
status["myTools"]["productMigrationAlive"] = product_alive
|
||||
status["unattendedState"] = (
|
||||
"IMPLEMENTING" if product_alive and product.get("status") == "implementing"
|
||||
"WAITING_PROVIDER" if product_alive and product.get("status") == "waiting_provider"
|
||||
else "IMPLEMENTING" if product_alive and product.get("status") in {"implementing", "validating", "finalizing", "preflight", "retry_pending"}
|
||||
else "COMPLETE" if product_complete
|
||||
else "BLOCKED" if product.get("status") == "blocked"
|
||||
else "BLOCKED" if product.get("status") in {"blocked", "provider_blocked", "needs_reconcile", "planning_required", "budget_exhausted", "ready_to_publish"}
|
||||
else "PLANNING" if status.get("state") == "IDLE" and watchdog_alive and watchdog.get("status") == "waiting_for_source_batch"
|
||||
else status.get("state", "UNKNOWN")
|
||||
)
|
||||
@@ -112,9 +109,9 @@ def main() -> int:
|
||||
for line in format_progress(status["progress"], status["fastPath"]):
|
||||
print(line)
|
||||
if status.get("unattendedState") == "IMPLEMENTING":
|
||||
print(" message: IMPLEMENTING: one workflow task is being edited; verification is deferred to user operation.")
|
||||
print(" message: IMPLEMENTING: bounded source work and independent runtime acceptance are in progress.")
|
||||
elif status.get("unattendedState") == "COMPLETE":
|
||||
print(" message: COMPLETE: the Web workflow implementation backlog is closed; user-reported defects become focused follow-up tasks.")
|
||||
print(" message: COMPLETE: the supervisor accepted terminal runtime evidence and found no unverified source units.")
|
||||
elif status.get("unattendedState") == "PLANNING":
|
||||
print(" message: PLANNING: watchdog heartbeat is active; exact source gaps are queued without false coverage.")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user