feat: finalize production cleanup with structured agent responses and project governance
This commit is contained in:
@@ -49,6 +49,10 @@ class FakeJobManager:
|
||||
"objective": objective,
|
||||
"model": selected_model,
|
||||
"status": "running",
|
||||
"result": "Running",
|
||||
"response": {"return": "Running", "data": None},
|
||||
"return": "Running",
|
||||
"data": None,
|
||||
"usage": {
|
||||
"input_tokens": 10,
|
||||
"cached_input_tokens": 2,
|
||||
@@ -145,6 +149,8 @@ def test_create_job_returns_only_job_id_and_defaults_model(tmp_path: Path, monke
|
||||
status_res = client.get(f"/api/jobs/{job_id}/status", headers=headers)
|
||||
assert status_res.status_code == 200
|
||||
assert status_res.json()["job_id"] == job_id
|
||||
assert status_res.json()["response"]["return"] == "Running"
|
||||
assert "data" in status_res.json()["response"]
|
||||
|
||||
|
||||
def test_cancel_endpoint_and_events(tmp_path: Path, monkeypatch: Any) -> None:
|
||||
@@ -164,6 +170,8 @@ def test_cancel_endpoint_and_events(tmp_path: Path, monkeypatch: Any) -> None:
|
||||
|
||||
status_after = client.get(f"/api/jobs/{job_id}", headers=headers).json()
|
||||
assert status_after["status"] == "cancelling"
|
||||
assert status_after["return"] == "Running"
|
||||
assert status_after["data"] is None
|
||||
|
||||
|
||||
def test_ui_toggle(tmp_path: Path, monkeypatch: Any) -> None:
|
||||
@@ -178,4 +186,3 @@ def test_ui_toggle(tmp_path: Path, monkeypatch: Any) -> None:
|
||||
root_disabled = client_disabled.get("/")
|
||||
assert root_disabled.status_code == 200
|
||||
assert root_disabled.json()["ui_disabled"] is True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user