Files
agents/sdk/python/tests/test_status_utils.py
zeekayandGitHub 5b5cf9e9db feat: merge AgentField control plane + SDKs as Hanzo Agents (#1)
Transforms hanzoai/agents from a marketplace config repo into a full
agent orchestration platform by merging the AgentField infrastructure:

- Go control plane (K8s-like agent orchestration, service mesh, DAG workflows)
- Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC)
- TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows)
- Go SDK (idiomatic agent builder + client)
- React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI)
- Docker/K8s/Helm deployment configs
- Examples: hello world, deep research, RAG, simulation, benchmarks
- Functional test suite across Python/Go/TypeScript

All references rebranded: AgentField → Hanzo Agents
- Module: github.com/hanzoai/agents/control-plane
- Python: hanzo_agents
- TypeScript: @hanzo/agents
- Go: github.com/hanzoai/agents/sdk/go
- Env vars: HANZO_AGENTS_*
- Config: hanzo-agents.yaml

Previous marketplace configs moved to config/ directory.
2026-02-09 18:53:09 -08:00

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)