You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the codebase-memory-mcp analysis (2026-07-25): they ship semantic search with ZERO model download — 11-signal algorithmic embeddings (TF-IDF, Random Indexing with co-occurrence synonym bridging, MinHash, API/type signatures, AST profile, graph diffusion, Halstead-lite; verified src/semantic/semantic.h) optionally seeded by static int8 token vectors compiled into the binary. No sentence-transformers, no Ollama, no first-run cliff.
Cortex's SQLite-mode installs currently degrade until sentence-transformers finishes installing (session-start note: 'semantic search will improve next session'). Proposal: an algorithmic-embedding fallback engaged automatically when the neural model is absent — same 384-dim space contract, marked lower-fidelity in telemetry, upgraded transparently when the model arrives. Plus: camelCase/snake_case-aware FTS tokenization for code-flavored memories (their cbm_camel_split FTS5 tokenizer).
Zetetic gate: benchmark the fallback on LongMemEval-S/LoCoMo vs (a) no-vector baseline and (b) sentence-transformers — publish the three-way numbers; adopt only if fallback beats no-vector materially. Done criteria: fresh SQLite install answers a semantic recall correctly with zero network; benchmark table committed.
PR #172 denied (see closing comment). Plan of record: Phase A refactor PR (seams, closes #173) → Phase B full #169 on the refactored base. The n=50 three-way benchmark result (no-vector 0.275/46.0% → fallback 0.378/66.0% → sentence-transformers 0.609/94.0%) remains valid evidence for the approach and carries into Phase B.
Phase A delivered: PR #175 (three seams: EmbeddingProvider protocol, ModelState lifecycle machine, composition-root factory; closes #173). Key finding from the seam work: PR #172's empty-stamp bug was in the SQLite store's _has_vec-gated stamp write, not the engine — the boundary now has an explicit seam and Phase B maps every lifecycle state to a provider so no state can leave an empty stamp. Behavior preservation proven: 56-test embedding suite unchanged, full suite green except the 3 documented #174 failures. Merge on CI green, then Phase B.
COMPLETE — delivered across two PRs per the refactor-first rule: PR #175 (Phase A: EmbeddingProvider protocol, explicit ModelState lifecycle, factory seams; closed #173) and PR #181 (Phase B, merged 0db6b2e with 14/14 checks): total ModelState→provider map (no state can leave an empty stamp — the PR #172 denial's root cause is structurally unrepresentable), unconditional SQLite embedding_model stamp, loud engagement + telemetry embedding_mode, camelCase/snake_case tokenization on ALL recall paths, scheduled fallback→neural upgrade in consolidate with counts, genuine-absence subprocess integration test (import-hook, zero network), mixed-store no-cross-rank invariant. Benchmark (LongMemEval-S, SQLite, n=50, MANIFEST committed): no-vector 0.275 MRR/46% R@10 → algorithmic fallback 0.378/66% (+0.102/+20pp, adoption criterion met) → sentence-transformers 0.609/94%. Zero-download semantic search is live for SQLite-mode installs.
Activity
cdeust commentedon Jul 24, 2026
Implementation delivered: PR #172 (
d5835c0). Three-way benchmark committed (LongMemEval-S, SQLite, n=50): no-vector 0.275 MRR / 46.0% R@10 → algorithmic fallback 0.378 / 66.0% → sentence-transformers 0.609 / 94.0%. Adoption criterion met (+0.102 MRR, +20pp R@10 over no-vector). Constants sourced (CBM semantic.h / Manning IR / Mikolov 2013 / Achlioptas 2003); mixed-store no-cross-rank invariant tested; telemetry marks fallback mode. Reported deviations accepted as justified: dedicated SQLite bench harness reusing the existing loader/scorer verbatim (PG harness cannot express the 3-way), and two pre-existing §13 items now filed as dated issues (embedding_engine split; test_rebuild_profiles live-data dependency). Merge on CI green.cdeust commentedon Jul 24, 2026
PR #172 denied (see closing comment). Plan of record: Phase A refactor PR (seams, closes #173) → Phase B full #169 on the refactored base. The n=50 three-way benchmark result (no-vector 0.275/46.0% → fallback 0.378/66.0% → sentence-transformers 0.609/94.0%) remains valid evidence for the approach and carries into Phase B.
cdeust commentedon Jul 24, 2026
Phase A delivered: PR #175 (three seams: EmbeddingProvider protocol, ModelState lifecycle machine, composition-root factory; closes #173). Key finding from the seam work: PR #172's empty-stamp bug was in the SQLite store's _has_vec-gated stamp write, not the engine — the boundary now has an explicit seam and Phase B maps every lifecycle state to a provider so no state can leave an empty stamp. Behavior preservation proven: 56-test embedding suite unchanged, full suite green except the 3 documented #174 failures. Merge on CI green, then Phase B.
Merge pull request #181 from cdeust/feat/semantic-fallback-169b
cdeust commentedon Jul 25, 2026
COMPLETE — delivered across two PRs per the refactor-first rule: PR #175 (Phase A: EmbeddingProvider protocol, explicit ModelState lifecycle, factory seams; closed #173) and PR #181 (Phase B, merged 0db6b2e with 14/14 checks): total ModelState→provider map (no state can leave an empty stamp — the PR #172 denial's root cause is structurally unrepresentable), unconditional SQLite embedding_model stamp, loud engagement + telemetry embedding_mode, camelCase/snake_case tokenization on ALL recall paths, scheduled fallback→neural upgrade in consolidate with counts, genuine-absence subprocess integration test (import-hook, zero network), mixed-store no-cross-rank invariant. Benchmark (LongMemEval-S, SQLite, n=50, MANIFEST committed): no-vector 0.275 MRR/46% R@10 → algorithmic fallback 0.378/66% (+0.102/+20pp, adoption criterion met) → sentence-transformers 0.609/94%. Zero-download semantic search is live for SQLite-mode installs.
feat(embedding): zero-download algorithmic fallback on the cdeust#173 …
bench(embedding): three-way SQLite LongMemEval-S for the cdeust#169 f…
test(embedding): update I2 canonical-writer line pins for cdeust#169 …
fix(embedding): make frequent-token subsampling match its cited CBM s…
fix(sqlite): stamp 'neural' only after the vector actually lands
fix(sqlite): downgrade to 'fallback' instead of skipping the stamp
fix(sqlite): install sqlite-vec on every backend, self-heal vectorles…