Skip to content

Dead code: ai_hardware_accelerator._gpu_semantic_search and KnowledgeRetrievalAgent have zero production callers #13028

Description

@mrveiss

Context

Discovered while auditing every kb.search() call site for #13009 (research-quarantine leak audit). Filed per the "never delete code — wire it in" rule: these are dead/unreachable, not deleted, but someone should decide whether to wire them in or formally park them.

1. ai_hardware_accelerator.py:834 (_gpu_semantic_search)

Dispatched only from AIHardwareAccelerator.process_task when task.task_type == "semantic_search" (line 611). The only place that constructs such a ProcessingTask is accelerated_semantic_search() (line 1011) in the same file -- and accelerated_semantic_search( has zero callers anywhere in the repo (verified via repo-wide grep, excluding its own definition). The docstring claims it "match[es] the pattern used in async_chat_workflow" (i.e. was meant to be a general chat/RAG surface, #10716), but nothing ever reaches it.

2. agents/knowledge_retrieval_agent.py (KnowledgeRetrievalAgent)

KnowledgeRetrievalAgent( has zero instantiation callers anywhere in the repo outside its own module and tests. Its process_query()/find_similar_documents() methods (which also carry the n_results= kwarg bug filed in #13024) are unreachable from any live API route, agent-orchestration handler, or chat surface.

Suggested action

For each: either wire it into a real caller (if the GPU semantic-search path or this agent variant is still wanted), or explicitly document it as parked/deprecated so it stops being mistaken for a live surface during future security/leak audits like #13009.

Model Used

Claude Sonnet 5

Activity

  1. mrveiss commented on Aug 28, 2026

    @mrveiss
    OwnerAuthor

    Parented under #15184 ([Umbrella] Hardware-aware deployment). Root cause recorded there: the deploy-time nvidia-smi probe is itself gated on backend_vllm_enabled (roles/backend/tasks/main.yml:890-898), so a GPU host that does not opt into vLLM is never probed at all. See that issue for the wave ordering.

  2. modified the milestones: Backlog, v0.12.0 on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions