Skip to content

feat: Migrate expectation system to pgvector#127

Merged
3vilM33pl3 merged 3 commits into
mainfrom
feature/pgvector
Feb 6, 2026
Merged

feat: Migrate expectation system to pgvector#127
3vilM33pl3 merged 3 commits into
mainfrom
feature/pgvector

Conversation

@3vilM33pl3
Copy link
Copy Markdown
Owner

Summary

  • Add pgvector integration for semantic duplicate detection on expectations
  • V3 migration adds vector(384) embedding column with HNSW index to expectations table
  • EmbeddingGenerator using all-MiniLM-L6-v2 via Candle (lazy-loaded, ~90MB on first run)
  • buckets expect warns when new expectation is >85% similar to existing ones
  • buckets doctor validates pgvector extension presence and expectations/pebbles schema
  • buckets setup offers pgvector extension installation
  • New EmbeddingError variant for proper error semantics
  • Fix all clippy warnings across codebase

Test plan

  • cargo fmt --check — clean
  • cargo clippy — zero warnings
  • cargo test — 204 tests pass (6 ignored: 2 embedding tests requiring model download, 3 Docker-dependent, 1 permission test)
  • cargo test -- --ignored — run locally with Docker + network to verify embedding and DB tests
  • Manual: buckets doctor validates pgvector extension
  • Manual: buckets expect "fast API" then buckets expect "quick API response" shows duplicate warning

🤖 Generated with Claude Code

3vilM33pl3 and others added 3 commits January 2, 2026 18:23
Integrate pgvector for semantic search on expectations:
- V3 migration: pgvector extension, embedding vector(384) column, HNSW index
- EmbeddingGenerator using all-MiniLM-L6-v2 via Candle (lazy-loaded, cached)
- Duplicate detection at 85% cosine similarity threshold in expect command
- Doctor command validates pgvector extension and expectations/pebbles schema
- EmbeddingError variant for proper error semantics
- Fix all clippy warnings and run cargo fmt across codebase

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8efb23407c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/data/expectation.rs
@3vilM33pl3 3vilM33pl3 merged commit 7ff1761 into main Feb 6, 2026
3 of 4 checks passed
@3vilM33pl3 3vilM33pl3 deleted the feature/pgvector branch February 6, 2026 23:56
@3vilM33pl3 3vilM33pl3 restored the feature/pgvector branch February 7, 2026 00:00
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