Finding (surfaced while implementing #75)
csp::stats::save_search_stats exists and is unit-tested, but it is never called from the search flow — no call site in main.rs, mcp.rs, or indexing/index.rs. CspIndex also has no file_sizes field.
Upstream SembleIndex records stats inside search() / find_related():
self._file_sizes = self._compute_file_sizes(root) if root else {}
...
save_search_stats(results, CallType.SEARCH, self._file_sizes, max_snippet_lines)
So today csp savings / ~/.csp/savings.jsonl never receives records from real searches — the savings report has nothing to summarize.
Impact
Proposed work
Refs
Finding (surfaced while implementing #75)
csp::stats::save_search_statsexists and is unit-tested, but it is never called from the search flow — no call site inmain.rs,mcp.rs, orindexing/index.rs.CspIndexalso has nofile_sizesfield.Upstream
SembleIndexrecords stats insidesearch()/find_related():So today
csp savings/~/.csp/savings.jsonlnever receives records from real searches — the savings report has nothing to summarize.Impact
csp savingsunder-reports (no telemetry is written on search/find_related).max_snippet_linesis used): there is nothing to correct until savings is recorded. parity(#198/#206): support max_snippet_lines in MCP/CLI output + savings #75 intentionally left #206 out for this reason.Proposed work
file_sizestoCspIndex(compute on build from the indexed root).save_search_statsinsideCspIndex::search/find_related(or at the CLI/MCP layer), keyed by the default stats file.max_snippet_linesinto the stats so the "delivered chars" reflect the truncated snippet, not the full chunk.Refs
30d36ad)