mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-30 13:34:50 +02:00
[arnav] remove 6 dead HTTP endpoints
Verified each had no production caller (frontend, electron, or internal backend) — only test references kept them looking alive to coverage tools. Drops ~140 LOC of route handlers + helpers. - POST /api/outputs/vibe-code: never wired up; frontend has no vibe-code UI. Also drops VibeCodeRequest model and VIBE_CODE_SYSTEM_PROMPT. - GET /api/service/cost-breakdown: frontend Usage page reads /usage-summary, which already returns by_model/by_provider. - GET /api/service/status: zero callers; was placeholder. - GET /api/service/spool/count: debug-only, no UI surface. - GET /api/settings/default-system-prompt: frontend defines its own DEFAULT_SYSTEM_PROMPT in settingsSlice.ts and never fetches the backend constant. - POST /api/browser/command: sole caller (browser_mcp_server.py subprocess) was deleted in 8286cc1; browser_agent.py now calls ws_manager.send_browser_command directly in-process. Tests covering the removed endpoints are dropped along with the now-unused mock-anthropic helpers in test_api_outputs.py.
This commit is contained in:
@@ -8,7 +8,6 @@ Tests:
|
||||
succeeds; DELETE removes it.
|
||||
- POST /sessions/{id}/edit_message validates input.
|
||||
- PATCH /sessions/{id} updates allowed fields (name, system_prompt).
|
||||
- GET /sessions/{id}/branches returns the default 'main' branch.
|
||||
- GET /history returns paginated results.
|
||||
"""
|
||||
|
||||
@@ -127,20 +126,6 @@ def test_patch_session_updates_name(client, stub_agent_loop):
|
||||
assert fetched["model"] == "sonnet" # not changed by the PATCH
|
||||
|
||||
|
||||
def test_get_branches_returns_main(client, stub_agent_loop):
|
||||
launch = client.post(
|
||||
"/api/agents/launch",
|
||||
json={"name": "B", "model": "sonnet", "mode": "agent"},
|
||||
)
|
||||
session_id = launch.json()["session_id"]
|
||||
|
||||
resp = client.get(f"/api/agents/sessions/{session_id}/branches")
|
||||
assert resp.status_code == 200
|
||||
body = resp.json()
|
||||
assert body["active_branch_id"] == "main"
|
||||
assert "main" in body["branches"]
|
||||
|
||||
|
||||
def test_history_endpoint_returns_paginated_shape(client):
|
||||
"""`/history` is the search-and-resume endpoint. Even with no
|
||||
saved sessions it should return the paginated wrapper without
|
||||
|
||||
Reference in New Issue
Block a user