Commit Graph
3 Commits
Author SHA1 Message Date
Arnav NavalandCursor 9100e91652 [arnav] clean up unused imports and dead local variables
Auto-fixed 52 ruff F401 findings (unused imports) across 22 files
in backend/ and backend/tests/. Manually resolved 8 F841 unused
locals that ruff flagged as unsafe-fix:

- agent_manager.resume_session: drop dead hours_since_closed block.
- main.py mcp-meta + outputs-meta activate handlers: drop dead
  reason = body.get("reason") binding (server ignores the field).
- dashboards.seed_demo, tools_lib.m365_device_login: keep _load(...)
  call for its 404 side-effect, drop unused binding, add intent
  comment.
- outputs.auto_run_output: keep `import anthropic` as availability
  probe, mark with `# noqa: F401` and explanation.
- dead_code_scan._extract_ws_event_branches: drop vestigial
  ws_handler_lines set (never written or read).
- test_browser_agent_unit.test_hash_tool_call_falls_back_to_repr:
  drop the unused _Boom class+instance (the actual self-referential
  bait is bad_input/bad_result; _Boom was never passed to the
  function under test).

Result: 1184/1184 backend tests pass (1 deselected: pre-existing
sandbox-only git test). ruff --select F401,F811,F841 backend/ now
clean (was 60 findings).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 18:30:34 -05:00
Arnav Naval 2bd5478405 [arnav] Re-adds backend/apps/service/models.py
Also removes tests that covered code no longer present in the codebase:
- test_agent_loop.py, test_tools_unit.py — deleted (targets removed)
- test_mcp_servers_unit.py — deleted (targets removed)
- test_providers_anthropic_extra.py, test_providers_openai_compat.py,
  test_providers_registry.py — deleted (providers layer refactored away)
- test_api_outputs.py — drops vibe-code tests (endpoint removed)
- test_browser_agent_integration.py — drops run_browser_agents fanout
  tests (function removed)
- test_mcp_preflight.py — drops _call_classifier tests (internal removed)
2026-05-06 09:42:58 -05:00
Arnav Naval 0f8cfe0510 [arnav] test(backend): add agents-subapp unit/integration suite and coverage reporting 2026-05-04 00:38:53 -05:00