-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
📌 Issue Overview
While working with the repository indexer, I noticed that indexing a codebase can unintentionally install dependencies and mutate the cloned repository’s environment. This makes indexing non-deterministic and breaks the expectation that indexing is a read-only operation.
🔍 Steps to Reproduce
- Go to the Discord server
- Run
/index_repository AOSSIE-Org/Devr.AI - Observe the indexing process in the Falkor backend logs
🎯 Expected Behavior
- Indexing is deterministic and read-only
- No virtual environments or package installs are triggered
- Static indexing works without dependency metadata
- Dependency analysis can be explicitly enabled later if needed
🚨 Actual Behavior
When indexing a Python repository:
venv/directories can be created inside the cloned repo- Dependencies like
tree-sitter,multilspy, andsentence-transformersmay get installed - Indexing can remain stuck in a pending state
- Additionally, attempting to delete a failed index returns an error (“Failed to delete graph from backend”), leaving the system in a stuck state.
This behavior occurs even when:
- LSP is disabled
- Poetry is disabled
- The intent is static (AST-only) analysis
📷 Screenshot
On Discord:
Terminal
backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/role.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/snowflake.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/sticker.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/team.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/template.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/types/widget.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/ui/__init__.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/ui/button.py over existing file
Installing /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/venv/lib/python3.10/site-packages/discord/ui/item.py over existing file
.
.
ERROR:code_graph:Error adding dependencies: 'NoneType' object is not iterable
INFO:root:Processing file (1/168): /home/tanisha/Devr.AI/backend/app/database/falkor/code-graph-backend/api/repositories/Devr.AI/backend/routes.py
INFO:werkzeug:127.0.0.1 - - [14/Jan/2026 01:10:27] "POST /analyze_repo HTTP/1.1" 500 -Evidence (Indexing Mutates Environment)
- A venv/ directory is created inside the cloned repository
- Python dependencies are installed into that environment
- Existing files under site-packages/ are overwritten
- Indexing eventually fails with a dependency-related error
💡 Suggested Improvements
- Disables dependency resolution by default during indexing
- Introduces a static_only mode for analyzers
- Separates code graph (AST) generation from dependency graph resolution
- Ensures indexing never installs packages or modifies the filesystem
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
Metadata
Metadata
Assignees
Labels
No labels