Skip to content
Merged

up #343

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions .github/workflows/codex-autofix.yml

This file was deleted.

79 changes: 0 additions & 79 deletions playwright.config.ts

This file was deleted.

17 changes: 0 additions & 17 deletions playwright.service.config.ts

This file was deleted.

17 changes: 10 additions & 7 deletions tests/test_error_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

from agentic_fleet.api.app import create_app

# Use shared constants for model names used in tests
MODEL_NAME = "agentic_fleet"

Copilot AI Nov 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant MODEL_NAME is set to "agentic_fleet", but based on the codebase, the actual valid workflow/entity ID is "magentic_fleet" (note: "magentic" not "agentic"). This will cause all tests using MODEL_NAME to fail with entity_not_found errors since the entity doesn't exist. Change to MODEL_NAME = "magentic_fleet".

Suggested change
MODEL_NAME = "agentic_fleet"
MODEL_NAME = "magentic_fleet"

Copilot uses AI. Check for mistakes.
INVALID_ENTITY_ID = "invalid_entity_id"


@pytest.mark.asyncio
async def test_invalid_entity_id() -> None:
Expand All @@ -16,7 +20,7 @@ async def test_invalid_entity_id() -> None:
resp = await client.post(
"/v1/responses",
json={
"model": "invalid_entity_id",
"model": INVALID_ENTITY_ID,
"input": "Test",
"stream": False,
},
Expand All @@ -25,7 +29,7 @@ async def test_invalid_entity_id() -> None:
data = resp.json()
assert "error" in data
assert data["error"]["code"] == "entity_not_found"
assert "invalid_entity_id" in data["error"]["message"]
assert INVALID_ENTITY_ID in data["error"]["message"]


@pytest.mark.asyncio
Expand All @@ -36,7 +40,7 @@ async def test_invalid_request_body() -> None:
resp = await client.post(
"/v1/responses",
json={
"model": "magentic_fleet",
"model": MODEL_NAME,
# Missing required "input" field
},
)
Expand All @@ -61,7 +65,7 @@ async def test_missing_required_fields() -> None:
resp = await client.post(
"/v1/responses",
json={
"model": "magentic_fleet",
"model": MODEL_NAME,
},
)
assert resp.status_code == 422
Expand All @@ -75,7 +79,7 @@ async def test_workflow_error_propagation() -> None:
resp = await client.post(
"/v1/responses",
json={
"model": "magentic_fleet",
"model": MODEL_NAME,
"input": "Test",
"stream": True,
},
Expand Down Expand Up @@ -103,14 +107,13 @@ async def test_malformed_sse_events() -> None:
resp = await client.post(
"/v1/responses",
json={
"model": "magentic_fleet",
"model": MODEL_NAME,
"input": "Test",
"stream": True,
},
)
assert resp.status_code == 200
# Server should handle stream properly
assert True


@pytest.mark.asyncio
Expand Down
Loading
Loading