Skip to content

perf: shrink the lossless search index - #64

Merged
davidrobertson merged 1 commit into
mainfrom
perf/shrink-search-index
Aug 12, 2026
Merged

perf: shrink the lossless search index#64
davidrobertson merged 1 commit into
mainfrom
perf/shrink-search-index

Conversation

@davidrobertson

Copy link
Copy Markdown
Contributor

Summary

  • convert event, session-summary, and summary-node FTS tables to contentless-delete indexes keyed by canonical rowid
  • migrate existing search indexes in one transaction with rollback validation
  • defer one-time space reclamation to detached maintenance while keeping raw JSONL authoritative

Validation

  • npm run typecheck
  • npm test — 240 passed
  • npm run smoke
  • npm pack --dry-run
  • real Codex CLI session loaded this plugin, wrote lifecycle events to a disposable store, and recalled four prior sessions through lcm_grep
  • code review, manual QA, and final gate review passed at 2c851b197018cc9719b97c452a6ddbe5a135d5ea

Size check

A disposable reconstruction of the current local store reduced the three FTS structures from 284.9 MB to 14.1 MB. Twelve sampled top-20 ranking hashes matched. This projects about 270.8 MB less FTS storage, roughly 52% of the current 521.1 MB index.

Rollout note

Restart or refresh the installed MCP process after updating so it uses the new rowid joins.

@davidrobertson
davidrobertson marked this pull request as ready for review August 12, 2026 20:31
@davidrobertson
davidrobertson merged commit cb59224 into main Aug 12, 2026
3 checks passed
@davidrobertson
davidrobertson deleted the perf/shrink-search-index branch August 12, 2026 20:32
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