Summary
Upstream semble #211 (41c36f7) added on-query revalidation of cached MCP indexes for local paths. csp's MCP session cache does not revalidate on query, so a changed local repo can return stale results.
Upstream behavior (src/semble/mcp.py)
_IndexCache._evict_if_stale(source, cache_key) runs on each query for local paths (git URLs skipped) and evicts the cached entry when the on-disk cache no longer matches the files.
- Gated by a cooldown:
_revalidate_after[cache_key] = finished + (finished - start) * _MIN_REVALIDATE_FACTOR (_MIN_REVALIDATE_FACTOR = 3) so slow-to-build repos aren't rechecked too often.
- Uses
semble.cache.get_validated_cache.
csp status
crates/csp/src/mcp.rs has an LRU session cache + manual evict(), but no on-query staleness check / revalidate cooldown. A local path indexed once is served from the session cache even after its files change.
Proposed work
Refs
Summary
Upstream semble #211 (
41c36f7) added on-query revalidation of cached MCP indexes for local paths. csp's MCP session cache does not revalidate on query, so a changed local repo can return stale results.Upstream behavior (
src/semble/mcp.py)_IndexCache._evict_if_stale(source, cache_key)runs on each query for local paths (git URLs skipped) and evicts the cached entry when the on-disk cache no longer matches the files._revalidate_after[cache_key] = finished + (finished - start) * _MIN_REVALIDATE_FACTOR(_MIN_REVALIDATE_FACTOR = 3) so slow-to-build repos aren't rechecked too often.semble.cache.get_validated_cache.csp status
crates/csp/src/mcp.rshas an LRU session cache + manualevict(), but no on-query staleness check / revalidate cooldown. A local path indexed once is served from the session cache even after its files change.Proposed work
_evict_if_stale+ revalidation cooldown tomcp.rs(local paths only; skip git URLs).chunk_size) as the staleness signal.Refs
41c36f7)eacbe43..949559b, 2026-07-11