Add execution engine and task lifecycle services

This commit is contained in:
2026-07-03 21:12:58 +03:00
parent ce2b263e52
commit 80715d81f6
11 changed files with 559 additions and 14 deletions
+19 -1
View File
@@ -28,10 +28,28 @@ def test_post_tasks_creates_planned_task() -> None:
payload = response.json()
assert response.status_code == 200
assert payload["status"] == "planned"
assert payload["status"] == "running"
assert payload["progress"]["total"] == 2
def test_cancel_endpoint_marks_task_cancelled() -> None:
client = TestClient(app)
created = client.post(
"/tasks",
json={
"project_id": "default",
"goal": "Cancel me",
"inputs": {},
"execution_mode": "agent_graph",
},
).json()
response = client.post(f"/tasks/{created['task_id']}/cancel", json={"reason": "stop"})
assert response.status_code == 200
assert response.json()["status"] == "cancelled"
def test_worker_registration_is_exposed_via_list_endpoint() -> None:
client = TestClient(app)