Repository navigation
Closed
Labels
Description
Summary
38 test collection errors and 7 additional failures stem from tests that import internal symbols that were renamed or removed during recent refactors. These prevent the affected test files from loading at all, silently dropping ~45 tests from the suite. All six symbol groups need to be identified and either the symbols restored/re-exported, or the tests updated to the new API surface.
Context
Full test suite run on 2026-05-08. Six distinct import drift groups identified:
| Symbol | Module | Tests Affected |
|---|---|---|
| `list_all_agents_fast` | `services.docker_service` | `test_github_pat_propagation_unit.py` (11 tests) |
| `check_login_rate_limit`, `record_login_attempt`, `get_redis_client` | `routers.auth` | `unit/test_login_rate_limit_split.py` (10 tests) + `test_ip_rate_limit_fix.py` (2 tests) |
| `AgentDefaultResourcesUpdate` | `models` | `unit/test_telegram_webhook_backfill.py` (4 tests) |
| `Query`, `status` | `fastapi` (via monitoring router) | `unit/test_fleet_status_resilience.py` (7), `unit/test_sync_health_service.py` (7), `unit/test_webhook_rate_limit_inprocess.py` (1) |
| `AgentClient` | `services.agent_client` | `unit/test_agent_readiness_probe.py` (5 tests) |
| `get_agent_default_resources` | unknown (settings service?) | 5 tests |
Additionally, three files excluded at collection time:
- `unit/test_monitoring_router_signatures.py` — `require_admin` no longer exported from `dependencies`
- `unit/test_skill_service_user_agent.py` — `utils.url_validation` module missing
- `unit/test_voice_tools.py` — `GeminiVoiceService` class renamed (tracked separately in bug: voice endpoint async regression — voice_websocket/voice_stop/get_voice_panel no longer coroutines #723)
Acceptance Criteria
- All 6 import drift groups resolved (symbols re-exported or tests updated to new API)
- `unit/test_monitoring_router_signatures.py` and `unit/test_skill_service_user_agent.py` collection errors fixed
- Zero collection errors in `pytest --collect-only` output (excluding intentionally skipped files)
- The ~45 previously uncollected tests now run and pass (or are explicitly marked skip with reason)
Technical Notes
- For symbols like `Query`/`status`: likely the monitoring router switched from `from fastapi import Query, status` to `from fastapi import Query` + `from starlette import status` — tests that mock `routers.monitoring.Query` need the new import path
- For `check_login_rate_limit` etc.: these may have moved to a rate-limiting middleware or utility module — trace where the login rate-limit logic lives now
- For `AgentClient`: check if it was renamed to something like `AgentHTTPClient` or merged into another service
- Prefer updating tests over adding re-export shims — these tests are white-box unit tests and should import from where the symbol actually lives
- Run `pytest --collect-only 2>&1 | grep "ImportError"` to get the full current list before starting
Activity
vybe commentedon May 8, 2026
/claim
github-actions commentedon May 8, 2026
Claimed by @vybe. Label
status-in-progressadded.Next steps:
feature/725-<short-slug>Fixes #725fix(tests): fix test import drift — 0 collection errors, all 3 target…
vybe commentedon Jun 1, 2026
Shipped in v0.6.0 (released via #998).
Release: v0.6.1 (#1171)