You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: remove dead code flagged by vulture (unused imports/variables) #1032
A /refactor-audit scan (2026-06-02, vulture ≥80% confidence) flagged a handful of unused imports/variables. The four safe ones below are near-zero-risk quick wins; two more are excluded pending verification because they may be intentional.
Context
Dead imports/variables add noise and can mislead readers about dependencies. Removing the unambiguous ones is a trivial cleanup.
Findings — safe to remove
File
Line
Item
src/backend/routers/agents.py
29
unused import volume_remove
src/backend/routers/slack.py
27
unused import SlackOAuthInitResponse
src/backend/routers/ops.py
739
unused variable alert_id
src/backend/staging-acceptance.py
16
unused import AsyncMock
Findings — verify first (NOT auto-remove)
File
Line
Item
Why hold
src/backend/services/event_bus.py
44
unused import RedisResponseError
May be a re-export or intended for except-clause use
src/backend/services/subscription_auto_switch.py
174
unused variable old_subscription_id
May be a debugging/audit breadcrumb
Acceptance Criteria
The four safe items removed
The two "verify first" items either removed (if confirmed dead) or left with a short comment explaining why they stay
/test-runner green; backend imports cleanly (no runtime import errors)
Technical Notes
Grep each symbol across the repo before deleting to confirm it isn't referenced dynamically or re-exported.
Refreshed findings from the 2026-07-06 /refactor-audit run (vulture 2.15, ≥80% confidence). Two of the original items are gone (routers/agents.pyvolume_remove, staging-acceptance.pyAsyncMock — already cleaned up); one new item appeared. Current set:
Activity
docs: refactor audit report (2026-06-02) — critical/high complexity h…
vybe commentedon Jul 6, 2026
Refreshed findings from the 2026-07-06
/refactor-auditrun (vulture 2.15, ≥80% confidence). Two of the original items are gone (routers/agents.pyvolume_remove,staging-acceptance.pyAsyncMock— already cleaned up); one new item appeared. Current set:src/backend/adapters/transports/twilio_media_stream.pypop_frames(new)src/backend/routers/slack.pySlackOAuthInitResponsesrc/backend/routers/ops.pyalert_idsrc/backend/services/event_bus.pyRedisResponseError(verify first — may be re-export/except-clause intent)src/backend/services/subscription_auto_switch.pyold_subscription_id(verify first — possible audit breadcrumb)Line numbers updated; the verify-first caveats from the original body still apply.