← Back to Pull requests

Remove semantic search + embeddings #500

Closed
unknown closed this pull request without merging on May 19, 2026 20:02 UTC
View on GitHub
unknown unknown commented on May 15, 2026 18:31 UTC
Author

Built on top of other cleanup work #491

note: this got autoclosed since the base branch merged, moved changes to #505

Description

Removes the unwired semantic-search / embeddings feature. The HTTP handlers, the indexer, and the public Store surface are deleted; the semantic_embedding* columns and HNSW indexes are dropped by a new v1alpha1 migration on upgrade.

What's removed:

  • internal/registry/api/handlers/v0/embeddings/: the indexer kickoff and job-status endpoints. Never wired into the running router.

  • internal/registry/embeddings/: the indexer, helpers, and Provider interface. Never constructed at boot.

  • ⚠️ pkg/semantic/ and the v1alpha1store.Store semantic methods (SetEmbedding, GetEmbeddingMetadata, SemanticList, VectorLiteral). Public-API breaking: downstream consumers importing these symbols will get compile errors.

  • EmbeddingsConfig and the AGENT_REGISTRY_EMBEDDINGS_ENABLED env var.

  • The migrator's generic MigratorConfig.Skip predicate, which only ever gated 003.
  • Migrations:

  • 003_embeddings.sql is retained as a no-op (comment-only) for historical consistency with installs that have version 203 recorded in schema_migrations. Plain postgres images can apply it.

  • 008_drop_semantic_embeddings.sql drops the columns and HNSW indexes with IF EXISTS, safe on installs that never ran 003 originally.
  • Change Type

    /kind breaking_change
    /kind cleanup
    

    Changelog

    ``release-note
    Remove embeddings and semantic search.
    ⚠️: If you enabled embeddings and use the pgvector postgres image, keep the image during the upgrade. You can switch to a standard postgres image in a follow-up release.

    
    # Additional Notes
    
    ## Upgrade notes
    
    Operators currently running with `AGENT_REGISTRY_EMBEDDINGS_ENABLED=true` on a postgres image that includes pgvector (e.g. `pgvector/pgvector:pg16`) must keep the pgvector image during this upgrade.
    
    Migration 208 drops the semantic_embedding* columns and HNSW indexes, which are typed against pgvector. PostgreSQL requires the extension's shared library to be loadable on disk to execute the drops. Attempting to upgrade the application and switch to a plain postgres image in _the same_ Helm release fails with:
    
    

    ERROR: could not access file "$libdir/vector": No such file or directory
    ``

    To remove the pgvector dependency:
    1. Upgrade the application first, keeping the pgvector image.
    2. Verify migration 208 applied: SELECT version FROM schema_migrations WHERE version=208;
    3. In a follow-up Helm release, swap the bundled postgres image to plain postgres of the same major version.

    Operators who ran with EMBEDDINGS_ENABLED=false (the default) have nothing to drop and can upgrade freely on plain postgres.

    Diff: 348 lines (+261 / -87) across 4 files Reviewer: inFocus7 Review duration: 5851m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 348 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #500"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.8% · Safe to merge
    16.8%