Skip to content

feat: Add idle TTL for MCP in-memory index cache - #273

Open
Pringled wants to merge 4 commits into
mainfrom
feat/mcp-idle-ttl
Open

Pringled wants to merge 4 commits into
mainfrom
feat/mcp-idle-ttl

Conversation

@Pringled

@Pringled Pringled commented Sep 18, 2026

Copy link
Copy Markdown
Member

This PR adds a SEMBLE_MCP_IDLE_TIMEOUT env var, resolving #269. An index that isn't used for that long is dropped from memory, and the next search reloads it from the disk cache. Each access restarts the index's timer, and the saved multi-repo merge is cleared at the same time so it doesn't keep dropped indexes alive. The default behavior is the same as it was before.

Set SEMBLE_MCP_CACHE_TTL (seconds) to drop indexes unused for that long
from memory; they reload from the disk cache on the next search.

Closes #269
@codecov

codecov Bot commented Sep 18, 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%> (ø)
🚀 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 Sep 18, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with only the existing non-blocking malformed-timeout configuration concern remaining.

Reviews (3) · Last reviewed commit: "fix: Start idle timer after build and re..."

Comment thread src/semble/mcp.py Outdated
Comment thread src/semble/mcp.py Outdated
Comment thread src/semble/mcp.py
@Pringled
Pringled requested a review from stephantul September 18, 2026 08:22

This branch has not been deployed

No deployments
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.

1 participant