Summary
src/backend/routers/agents.py carries 15 ruff F401 unused-import errors. This is pre-existing platform debt — origin/dev has 16, so recent work (e.g. the #307 heartbeat layer) is debt-neutral and did not introduce them. Surfaced during the #307 engineering review; filing as a separate cleanup so it doesn't ride along in a feature PR.
The errors (ruff check --output-format=concise)
src/backend/routers/agents.py:14:8 F401 `docker` imported but unused
src/backend/routers/agents.py:16:21 F401 `pathlib.Path` imported but unused
src/backend/routers/agents.py:25:5 F401 `services.docker_service.docker_client` imported but unused
src/backend/routers/agents.py:30:39 F401 `services.docker_utils.container_reload` imported but unused
src/backend/routers/agents.py:31:5 F401 `services.docker_utils.volume_get` imported but unused
src/backend/routers/agents.py:31:17 F401 `services.docker_utils.volume_remove` imported but unused
src/backend/routers/agents.py:33:22 F401 `services.git_service` imported but unused
src/backend/routers/agents.py:34:47 F401 `services.image_generation_prompts.AVATAR_EMOTIONS` imported but unused
src/backend/routers/agents.py:44:5 F401 `services.agent_service.get_agents_by_prefix` imported but unused
src/backend/routers/agents.py:45:5 F401 `services.agent_service.get_next_version_name` imported but unused
src/backend/routers/agents.py:46:5 F401 `services.agent_service.get_latest_version` imported but unused
src/backend/routers/agents.py:47:5 F401 `services.agent_service.check_shared_folder_mounts_match` imported but unused
src/backend/routers/agents.py:48:5 F401 `services.agent_service.check_api_key_env_matches` imported but unused
src/backend/routers/agents.py:51:5 F401 `services.agent_service.recreate_container_with_updated_config` imported but unused
src/backend/routers/agents.py:292:26 F401 `datetime.datetime` imported but unused
Suggested fix
ruff check --fix src/backend/routers/agents.py removes all 15 automatically.
⚠️ Verify before blind --fix: confirm none of these are intentional re-exports consumed elsewhere via from routers.agents import X (e.g. the services.agent_service.* helpers). Grep each symbol across the codebase first; remove only the genuinely-dead ones. After the fix, run the backend test suite to confirm nothing imported these transitively.
Scope / priority
Non-blocking cleanup (P3). Good first issue — mechanical, well-bounded, with a clear verification path.
Filed from the #307 engineering-review follow-up.
Summary
src/backend/routers/agents.pycarries 15 ruffF401unused-import errors. This is pre-existing platform debt —origin/devhas 16, so recent work (e.g. the #307 heartbeat layer) is debt-neutral and did not introduce them. Surfaced during the #307 engineering review; filing as a separate cleanup so it doesn't ride along in a feature PR.The errors (
ruff check --output-format=concise)Suggested fix
ruff check --fix src/backend/routers/agents.pyremoves all 15 automatically.--fix: confirm none of these are intentional re-exports consumed elsewhere viafrom routers.agents import X(e.g. theservices.agent_service.*helpers). Grep each symbol across the codebase first; remove only the genuinely-dead ones. After the fix, run the backend test suite to confirm nothing imported these transitively.Scope / priority
Non-blocking cleanup (P3). Good first issue — mechanical, well-bounded, with a clear verification path.
Filed from the #307 engineering-review follow-up.