Remove semantic search + embeddings#505
Merged
inFocus7 merged 10 commits intoMay 20, 2026
Merged
Conversation
Removes internal/registry/api/handlers/v0/embeddings and internal/registry/embeddings. Neither was wired into the running app (registry_app.go never constructed the Indexer or jobs.Manager, and the router never registered the handler); the existing config comment already announced that the public surface had been removed pending a rebuild. These packages have no other in-tree callers, so deletion is safe and the build is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…emantic Removes the public Store surface for the semantic-search feature (SetEmbedding, GetEmbeddingMetadata, SemanticList, VectorLiteral) along with the pkg/semantic types they used. This is a public-API breaking change for any downstream consumer that imported these symbols; the parent commit removed the in-tree caller (the internal indexer) and nothing else in this repo references them. Inlines decodeRow back into scanRow in helpers.go now that SemanticList was its only other caller. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EmbeddingsConfig only gated whether the pgvector migration (003_embeddings.sql) applied. With the semantic-search feature gone the flag has no remaining effect, so it's dropped along with the MigratorConfig.Skip predicate that was its sole consumer. AGENT_REGISTRY_EMBEDDINGS_ENABLED is silently ignored by the env parser (caarlos0/env tolerates unknown vars), so a deployment that still sets it boots cleanly. NewPostgreSQL and v1alpha1store.MigratorConfig both lose their embeddings parameter and become single- / no-argument. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the HNSW indexes and semantic_embedding* columns added by the original 003_embeddings.sql on the four affected tables (agents, mcp_servers, skills, prompts). The pgvector extension is intentionally left installed — extensions are database-global and may be in use by downstream schemas. Every statement in 008 is IF EXISTS so the migration is safe on installs that had embeddings enabled historically (003 created the columns, 008 removes them) and on installs that did not (the columns never existed and the drops are no-ops). Also replaces the contents of 003_embeddings.sql with comments only. Previously the file was gated by the embeddings runtime flag's Skip predicate; with that gate removed in the prior commit, 003 would now run on every install and its `CREATE EXTENSION vector` statement would fail on plain postgres images (e.g. the Helm chart's default postgres:18). Replacing the body with comments keeps the file in the migration sequence so the schema_migrations row for version 203 still records cleanly, while no longer requiring pgvector binaries to be available. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AGENTS.md no longer claims pgvector is part of the stack and drops the `/v0/embeddings/index` example from the authz section (that endpoint was removed earlier in this PR). scripts/kind/README.md drops the pgvector setup section — the kind environment uses the same bundled postgres image as Helm and no longer needs the extension. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bundled dev postgres no longer needs the vector extension — 003_embeddings.sql is a comment-only no-op and 008's drops are gated on IF EXISTS. Matches the Helm chart's plain-postgres default and removes the only remaining pgvector reference in the repo. Keeping the major version at 16 (same as pgvector/pgvector:pg16) so existing dev `postgres_data` volumes continue to work without a manual wipe; the vector extension stays cataloged with a dangling binary, which is harmless at boot. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
nikolasmatt
reviewed
May 20, 2026
Collaborator
nikolasmatt
left a comment
There was a problem hiding this comment.
Clean removal — no stale references in Go, charts, or docs; handler was never wired, confirmed. One important on 008, two nits.
Also: PR body's breaking-change list omits the MigratorConfig signature change (MigratorConfig(bool) → MigratorConfig()) and the removal of the exported MigratorConfig.Skip field. Downstream consumers will hit compile errors — worth listing alongside pkg/semantic.
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
nikolasmatt
approved these changes
May 20, 2026
nikolasmatt
added a commit
to nikolasmatt/agentregistry
that referenced
this pull request
May 20, 2026
- HappyPath: explicit assertions on "7 applied, 0 pending" and version == 8 (the highest OSS migration after agentregistry-dev#505's 007/008 additions). - DownErrNotReversible: every OSS migration now ships a RAISE-EXCEPTION .down.sql, so the assertion matches "not reversible" from the propagated PostgreSQL error. - ForceWritesRowOnly: force uses the unoffset version 1 (the +200 offset is gone with the engine swap). Adds an explicit assertion that the v1alpha1 schema does NOT exist after `force 1` — proves go-migrate's Force writes the bookkeeping row without running the migration SQL. - GotoInferredSource (new): single-source binaries accept `goto 2` without --source; the version subcommand confirms the new state. No-DB cases (MissingDSN, DBUrlPrecedence, Help, ArgValidation) are unchanged from PR 503. All 8 tests run green against a local Postgres on the dev port.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
note: original pr auto-closed since the underlying base pr merged
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 thev1alpha1store.Storesemantic methods (SetEmbedding,GetEmbeddingMetadata,SemanticList,VectorLiteral). Public-API breaking: downstream consumers importing these symbols will get compile errors.EmbeddingsConfigand theAGENT_REGISTRY_EMBEDDINGS_ENABLEDenv var.MigratorConfig.Skippredicate, which only ever gated 003.Migrations:
003_embeddings.sqlis retained as a no-op (comment-only) for historical consistency with installs that have version 203 recorded inschema_migrations. Plain postgres images can apply it.008_drop_semantic_embeddings.sqldrops the columns and HNSW indexes withIF EXISTS, safe on installs that never ran 003 originally.Change Type
Changelog
Additional Notes
Upgrade notes
Operators currently running with
AGENT_REGISTRY_EMBEDDINGS_ENABLED=trueon 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:
To remove the pgvector dependency:
Operators who ran with EMBEDDINGS_ENABLED=false (the default) have nothing to drop and can upgrade freely on plain postgres.