mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
Consolidate all Hanzo agent infrastructure into one repo: - control-plane/: Go control plane server (was agents-new) - sdk/: Go, Python, TypeScript SDKs - deployments/: Docker, Kubernetes, Helm configs - Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest) - CI builds both SDK + control-plane images No more agentfield — everything is hanzoai/agent.
33 lines
931 B
Python
33 lines
931 B
Python
from hanzo_agents.status import normalize_status, is_terminal, TERMINAL_STATUSES
|
|
|
|
|
|
def test_status_normalization_all_values():
|
|
cases = {
|
|
" SUCCEEDED ": "succeeded",
|
|
"Success": "succeeded",
|
|
"COMPLETED": "succeeded",
|
|
"ok": "succeeded",
|
|
"FAILED": "failed",
|
|
"error": "failed",
|
|
"canceled": "cancelled",
|
|
"cancel": "cancelled",
|
|
"timed_out": "timeout",
|
|
"WAITING": "queued",
|
|
"in_progress": "running",
|
|
"": "unknown",
|
|
None: "unknown",
|
|
"mystery": "unknown",
|
|
}
|
|
|
|
for raw, expected in cases.items():
|
|
assert normalize_status(raw) == expected
|
|
|
|
|
|
def test_is_terminal_aligns_with_terminal_set():
|
|
for status in TERMINAL_STATUSES:
|
|
assert is_terminal(status)
|
|
|
|
non_terminals = ["pending", "queued", "running", "unknown", "mystery"]
|
|
for status in non_terminals:
|
|
assert not is_terminal(status)
|