[eric] backend: unused imports and dead helpers swept

This commit is contained in:
ciregenz
2026-07-28 11:06:41 -07:00
parent c57af2e6e1
commit 4228cf5d00
9 changed files with 4 additions and 14 deletions
@@ -34,7 +34,7 @@ def p_recent_topics(limit: int = MAX_TOPICS) -> List[str]:
)
topics: List[str] = []
seen = set()
for _sid, d in data:
for _, d in data:
name = (d.get("name") or "").strip()
low = name.lower()
if low in P_SKIP_NAMES or low in seen:
-5
View File
@@ -49,8 +49,3 @@ def respond_to_ui_request(session_id: str, component_id: str, response: Dict[str
pending.response = response
pending.event.set()
return True
@typechecked
def has_pending_ui_request(session_id: str, component_id: str) -> bool:
return (session_id, component_id) in p_pending
+1 -1
View File
@@ -13,7 +13,7 @@ import re
import sys
import time
from contextlib import asynccontextmanager
from typing import AsyncIterator, List, Optional
from typing import AsyncIterator, List
from pydantic import BaseModel, ConfigDict, Field
from typeguard import typechecked
@@ -4,7 +4,6 @@ exists. output.files is frozen at creation (v1); the agent edits land on disk
imported app reverted every edited file (new files survived since they were never
in the snapshot). With a workspace, disk is the single source of truth; only true
flat apps (no workspace) still carry the inline copy."""
import os
import uuid
import pytest
-2
View File
@@ -4,10 +4,8 @@ evidence so a zero-config user never boots a router with nothing to route."""
import asyncio
import json
import os
from unittest.mock import patch
import pytest
import backend.apps.nine_router.process as proc
from backend.apps.settings.models import AppSettings
+1 -1
View File
@@ -6,7 +6,7 @@ import asyncio
import json
import subprocess
import sys
from typing import Dict, List, Optional
from typing import Dict, List
from pytest import MonkeyPatch, raises
+1 -1
View File
@@ -4,7 +4,7 @@ subscription lanes, and results are cached so a double boot-fetch can't double-s
import asyncio
import json
from typing import Dict, List, Optional
from typing import Dict, List
import backend.apps.nine_router.subscription_health as sh
-1
View File
@@ -3,7 +3,6 @@ FULL_TOOLS list that prunes dead preset built-ins WITHOUT dropping anything Open
manifest MUST keep every built-in in effective_allowed's source set + ToolSearch (so deferred MCP
loading survives); MCP tools ride mcp_servers, not this list."""
import os
from backend.apps.agents.manager.prompt.tool_catalog import (
FULL_TOOLS,
-1
View File
@@ -6,7 +6,6 @@ clients backwards, and an open session in the history map had its terminal frame
import asyncio
import pytest
from fastapi.testclient import TestClient
from backend.apps.agents.core.ws_manager import ws_manager, slim_status_data