Skip to content

fix: Validate cached MCP indexes on query#211

Merged
Pringled merged 5 commits into
mainfrom
fix-mcp
Jun 23, 2026
Merged

fix: Validate cached MCP indexes on query#211
Pringled merged 5 commits into
mainfrom
fix-mcp

Conversation

@Pringled

Copy link
Copy Markdown
Member

This PR ensures MCP indexes get validated on every query like the CLI route. There's a minimum time (3x original indexing time) to ensure we don't start re-indexing while it's still indexing).

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/mcp.py 100.00% <100.00%> (ø)
src/semble/version.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge — the staleness check is gated behind multiple guards (done task, non-cancelled, no exception, cooldown, identity check before evict) and all mutations to _revalidate_after now happen on the event loop thread.

The core logic is sound: cooldown is recorded after the asyncio.to_thread await (event-loop-thread write), the concurrent-replacement race is handled via identity comparison before eviction, git URLs are bypassed, and failed tasks are left alone. get_validated_cache already accepts str | None for model_path and resolves it internally, so the self._model_path type is compatible. Tests cover all the new code paths including the cooldown gate, failed-task skip, and concurrent-replacement scenario.

No files require special attention.

Reviews (2): Last reviewed commit: "Change timing behavior, fix greptile fee..." | Re-trigger Greptile

Comment thread src/semble/mcp.py Outdated
Comment thread src/semble/mcp.py Outdated
@Pringled

Copy link
Copy Markdown
Member Author

@greptileai review

@Pringled Pringled requested a review from stephantul June 23, 2026 08:54
@Pringled Pringled merged commit 41c36f7 into main Jun 23, 2026
16 checks passed
@Pringled Pringled deleted the fix-mcp branch June 23, 2026 09:00
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