Skip to content

feat: Auto-indexing in cache folder.#162

Merged
Pringled merged 19 commits into
mainfrom
index-in-caches
May 27, 2026
Merged

feat: Auto-indexing in cache folder.#162
Pringled merged 19 commits into
mainfrom
index-in-caches

Conversation

@stephantul
Copy link
Copy Markdown
Contributor

Hmmm

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/cache.py 100.00% <100.00%> (ø)
src/semble/cli.py 100.00% <100.00%> (ø)
src/semble/index/create.py 100.00% <100.00%> (ø)
src/semble/index/dense.py 100.00% <100.00%> (ø)
src/semble/index/files.py 100.00% <100.00%> (ø)
src/semble/index/index.py 100.00% <100.00%> (ø)
src/semble/mcp.py 100.00% <100.00%> (ø)
src/semble/search.py 100.00% <ø> (ø)
src/semble/stats.py 100.00% <100.00%> (ø)
src/semble/utils.py 100.00% <100.00%> (ø)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 27, 2026

Confidence Score: 3/5

The auto-caching path has a file-walk race that causes a misleading exit-1 instead of a transparent cache miss on active repos, and git-URL indexes are saved with a root path that already points to a deleted temp directory.

The get_validated_cache loop calls get_file_status without any OSError suppression; when a file disappears between the directory walk and the stat call, the exception propagates to _load_index's FileNotFoundError handler, which prints a confusing 'No such file or directory: /path/to/source.py' and calls sys.exit(1) rather than simply rebuilding the index. Additionally, from_git returns after the with tempfile.TemporaryDirectory() block's __exit__ has already deleted the clone, so every git-URL cache entry is stored with a root_path pointing to a non-existent directory; when that cache is loaded the _compute_file_sizes call silently yields an empty dict, breaking token-savings accounting for all subsequent cache hits on git URLs.

src/semble/cache.py (file-walk OSError handling) and src/semble/index/index.py (from_git root path lifetime)

Reviews (5): Last reviewed commit: "Add safe file read function" | Re-trigger Greptile

Comment thread src/semble/cli.py Outdated
Comment thread src/semble/stats.py Outdated
Comment thread src/semble/index/create.py Outdated
Comment thread src/semble/cache.py Outdated
Comment thread src/semble/index/files.py Outdated
Comment thread src/semble/cache.py
@Pringled Pringled merged commit 9826e26 into main May 27, 2026
16 checks passed
@Pringled Pringled deleted the index-in-caches branch May 27, 2026 15:19
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.

2 participants