Skip to content

Fix Postgres embedding cache scoping#252

Open
3em0 wants to merge 1 commit into
yoanbernabeu:mainfrom
3em0:fix/postgres-embedding-cache-scope-251
Open

Fix Postgres embedding cache scoping#252
3em0 wants to merge 1 commit into
yoanbernabeu:mainfrom
3em0:fix/postgres-embedding-cache-scope-251

Conversation

@3em0

@3em0 3em0 commented May 20, 2026

Copy link
Copy Markdown

Summary

  • scope Postgres embedding cache lookups by project_id, content_hash, and an embedder cache namespace
  • persist embedding_cache_namespace alongside chunks and index it with the content hash
  • derive the namespace from embedder provider/model/dimensions/endpoint and pass it from CLI/MCP store construction
  • add regression coverage for SQL scoping, namespace derivation, and optional Postgres integration behavior

Fixes #251

Testing

  • docker run --rm -v "$PWD:/src" -w /src golang:1.24-bookworm go test ./config
  • docker run --rm -v "$PWD:/src" -w /src golang:1.24-bookworm go test ./store -run TestLookupByContentHashSQLScopesCacheIdentity
  • docker run --rm -v "$PWD:/src" -w /src golang:1.24-bookworm go test ./config ./cli ./mcp
  • go test ./... in golang:1.24-bookworm container with Node installed and tests run as uid 1000

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.

[Bug]: Cross-project embedding cache reuse via content_hash-only deduplication

1 participant