Skip to content

autobot-infrastructure/shared/tools/index_documentation.py is an orphaned pre-#15845 duplicate of doc_indexer.py #16956

Open

Description

@mrveiss

What

autobot-infrastructure/shared/tools/index_documentation.py (927 lines) is a standalone, pre-consolidation CLI indexer -- its own argparse, its own ChromaDBIndexer class, its own hash-cache handling, its own chunking calls. It is not imported or executed by anything: a repo-wide grep for its path turns up only two historical docstring mentions (autobot-backend/services/knowledge/doc_indexer.py's own "Extracted from ..." note, and a citation in autobot_shared/doc_chunking.py), no functional references.

The doc-sync git hook resolves INDEX_SCRIPT="$PROJECT_ROOT/tools/index_documentation.py" -- the top-level tools/index_documentation.py (98 lines), added by #15845 as a thin CLI entry point that calls services.knowledge.doc_indexer.get_doc_indexer_service().index_all(). That is the actually-consolidated, actually-executed service (doc_indexer.py's own docstring: "Issue #1385: Consolidated documentation indexing... Extracted from autobot-infrastructure/shared/tools/index_documentation.py and adapted for service use").

So #1385's extraction happened, and #15845 independently gave the hook a working entry point pointing at the new service -- but nobody deleted or redirected the old standalone file it was extracted from. It has sat dead since.

Why this matters

Fix

Either:

  1. Delete autobot-infrastructure/shared/tools/index_documentation.py (confirm zero references first, including CI/docs/README mentions of the old path), or
  2. If any residual caller is found, wire it to the consolidated doc_indexer.py service instead of duplicating logic, per Bug: Chat halluccinates instead of using knowledge base for AutoBot documentation queries #1385's own stated intent.

Option 1 is expected to be correct based on the repo-wide grep above, but re-verify before deleting -- this issue does not include that verification pass.

Found during #16934 (worktree doc-index contamination fix), out of scope for that PR.

Activity

  1. mrveiss commented on Oct 10, 2026

    @mrveiss
    OwnerAuthor

    Covered by the queued #18129 branch (issue-18129-doc-indexers, local, in the PR queue): autobot-infrastructure/shared/tools/index_documentation.py becomes a thin runpy shim over the canonical DocIndexerService CLI (tools/index_documentation.py), keeping the documented command and flags. Its capabilities (--tier, --category, --dry-run, --output) are promoted into the service. This issue should close with that PR; recorded here so it isn't worked twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions