Skip to content

release: v0.14.0 — opt-in semantic & hybrid search#125

Merged
Fail-Safe merged 8 commits into
mainfrom
next
Jun 4, 2026
Merged

release: v0.14.0 — opt-in semantic & hybrid search#125
Fail-Safe merged 8 commits into
mainfrom
next

Conversation

@Fail-Safe

Copy link
Copy Markdown
Owner

Release v0.14.0 — semantic & hybrid search

next is a clean 7-ahead / 0-behind of main; squash-merge as one release commit, then tag v0.14.0.

Adds an opt-in semantic search layer alongside lexical FTS5 — pure-Go (BLOB-stored embeddings + in-Go cosine; no CGo, no vector extension, no external DB), local-only (never federated), and degrade-safe (falls back to lexical when unconfigured/unreachable).

Highlights

  • search: config block in cortex.md (off by default; reuses the consolidation LLM endpoint config).
  • noema embeddings status|backfill; noema search/similar --semantic|--hybrid.
  • MCP search_traces / find_similar_traces gain a mode arg (lexical | semantic | hybrid) with graceful lexical fallback.
  • Hybrid = Reciprocal Rank Fusion of BM25 + cosine (hybrid_weight).
  • Serve-time embed maintainer keeps the index fresh automatically (periodic idempotent backfill; never blocks writes).
  • Migration 016_trace_embeddings (new table; non-destructive, not federated).

Validation

Extensively tested incl. -race and fuzz; validated end-to-end on a live local embedding model (semantic returned results where lexical returned none). Docs updated across README, CLAUDE.md, AGENTS.md, and get_instructions.

Deferred (non-blocking): in-memory vector cache (speed at scale), max_chars graceful degradation polish.

🤖 Generated with Claude Code

Fail-Safe added 8 commits June 3, 2026 14:24
…nfig (#118)

Inert pre-v1 scaffolding for semantic search: migration 016 trace_embeddings (local-only index), HTTPLLMClient.Embed (OpenAI /embeddings, batched), embedding BLOB codec, and the cortex.md search: config block with ValidateSearch. No query path or MCP changes yet (phases 2-4); off by default. Extensively tested: cross-platform build, -race x2 + stress x5, fuzzers, adversarial review, and a testbot MCP playbook (4/4).
…CLI (#119)

Embedding-lifecycle core: Cortex.EmbedBackfill (idempotent/resumable/force/limit/model-change), EmbeddingStatus, the Embedder interface, and noema embeddings status|backfill. Off by default; no query path yet. Write-time async hooks deferred to phase 2b.
…120)

Adds cortex.SemanticSearch/SemanticSimilar (cosine over stored vectors, finiteness + dim-mismatch skip), actor bump wrappers, and noema search/similar --semantic. MCP mode, vector cache, and hybrid RRF deferred to later phases.
search_traces and find_similar_traces gain a mode arg (lexical|semantic|hybrid) with graceful fallback to lexical. Agents can now drive semantic search over MCP. Hybrid returns semantic results until phase 4.
hybrid mode now does real Reciprocal Rank Fusion of FTS5 (BM25) + embedding (cosine) rankings (weight from search.hybrid_weight). Adds lexicalRanked, rrfFuse, HybridSearch/HybridSimilar, CLI --hybrid, MCP mode=hybrid. Completes the lexical|semantic|hybrid triad.
…123)

Under serve, a periodic idempotent backfill maintainer keeps the embedding index fresh automatically (no per-mutation hook; never blocks writes). internal/embed.Maintainer + SearchConfig.EmbedIntervalSeconds, gated on the background-work lock.
…124)

README semantic-search section + CLI/MCP tables; CLAUDE.md semantic section (replaces stale no-semantic-search line); AGENTS.md generator + get_instructions note the mode arg.
v0.14.0 security-review hardening: enforce MaxSearchQueryLen on the hybrid lexical + embed-query paths (DoS guard regression); make the MCP degradation note generic so the embedding endpoint URL/host isn't leaked to clients (logged server-side instead).
@Fail-Safe Fail-Safe merged commit b2f6646 into main Jun 4, 2026
2 checks passed
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