Bug
extract_python and extract_javascript in code_indexer.py return {'nodes': [], 'edges': []} on ImportError (missing tree-sitter-python / tree-sitter-javascript):
except ImportError as exc:
logger.error('tree-sitter-python not installed: %s', exc)
return {'nodes': [], 'edges': []}
CodeIndexer.index_file only reads extracted['nodes'] and extracted['edges']. When nodes is empty the file is recorded as skipped with no error attached. The /index/code API response returns {success: 0, failed: 0, skipped: 1} with no indication that indexing produced zero results due to a missing dependency rather than an empty file.
Impact
Operators deploying without tree-sitter installed get no actionable feedback — silent failure.
Fix
Return a dep_error key from extractors on ImportError. In index_file, check for this key and append to result.errors with result.failed += 1.
File
autobot-backend/services/knowledge/code_indexer.py
Bug
extract_pythonandextract_javascriptincode_indexer.pyreturn{'nodes': [], 'edges': []}onImportError(missingtree-sitter-python/tree-sitter-javascript):CodeIndexer.index_fileonly readsextracted['nodes']andextracted['edges']. When nodes is empty the file is recorded asskippedwith no error attached. The/index/codeAPI response returns{success: 0, failed: 0, skipped: 1}with no indication that indexing produced zero results due to a missing dependency rather than an empty file.Impact
Operators deploying without tree-sitter installed get no actionable feedback — silent failure.
Fix
Return a
dep_errorkey from extractors onImportError. Inindex_file, check for this key and append toresult.errorswithresult.failed += 1.File
autobot-backend/services/knowledge/code_indexer.py