Skip to content

fix(repositories): purge all relational tables and vectors when deleting a local path or repo - #173

Merged
spelech merged 1 commit into
mainfrom
fix/delete-local-path-170
Nov 18, 2026
Merged

spelech merged 1 commit into
mainfrom
fix/delete-local-path-170

Conversation

@spelech

@spelech spelech commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Closes #170

Summary

  • Updates DELETE /admin/api/paths/{path_id} (api_delete_path) to query SELECT path, repo FROM indexed_paths WHERE id = ?, delete across all 6 file-scoped tables (indexed_files, file_summaries, ast_symbols, ast_relationships, api_routes, api_client_calls) and store.delete_by_repo(repo) when no other source shares that repo, and always execute forward-slash normalized path prefix deletion across all 6 tables and store.delete_by_path.
  • Updates DELETE /admin/api/repos/{repo_id} (api_delete_repo) to also delete from file_summaries and api_client_calls.
  • Updates PgVectorStore.delete_by_path to normalize backslashes and support directory prefix deletion (path LIKE :prefix), and batches missing dense embeddings in PgVectorStore.upsert_documents.
  • Adds regression tests in tests/test_delete_local_path.py.

@spelech
spelech merged commit 00002fc into main Nov 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing a local path leaves all its index data (and repo delete leaves some rows)

1 participant