chore: remove legacy registry schema and validator#105
Merged
Conversation
The catalog-side removal landed in stacklok/toolhive-catalog#1215; that repo no longer builds registry-legacy.json or calls ValidateRegistrySchema. The Go types (Registry / ImageMetadata / RemoteServerMetadata) and converters stay — only the schema-file artifact and its validation entry points go away. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JAORMX
approved these changes
May 13, 2026
This was referenced May 14, 2026
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.
Summary
Removes the legacy ToolHive registry schema artifact and its validation entry points from toolhive-core. The Go types (
Registry,ImageMetadata,RemoteServerMetadata) and theregistry/converters/package stay — they remain toolhive's internal in-memory model and are still used by toolhive's API providers and toolhive-catalog'supdate_metadataprovenance verification.registry/types/data/toolhive-legacy-registry.schema.jsonand removes it from the//go:embeddirectiveValidateRegistrySchemafunction and the(*Registry).Validate()methodTestRegistrySchemaValidation,TestValidateRegistrySchemaWithInvalidJSON,TestMultipleValidationErrors,TestRegistry_Validate); upstream / skill / publisher-provided extensions tests are unchangedregistry_types.go.github/workflows/release.ymlrelease-asset upload stepWhy this is safe
The catalog-side removal already merged in stacklok/toolhive-catalog#1215 — that repo no longer builds
registry-legacy.jsonand no longer callsValidateRegistrySchema. After PR #1215 merged, the only remaining references toValidateRegistrySchemaand(*Registry).Validate()are in toolhive-core itself (definitions + their own tests) and inenterprise-mirror-*repos that just mirror these sources.Critically, stacklok/toolhive's legacy-format detection in
pkg/registry/upstream_parser.godoes not use the schema — it usespkg/registry/legacyhint, a pure top-level-key sniffer (looks forservers/remote_servers/groupsvs.dataviajson.RawMessage). So removing the schema does not break legacy-format rejection in toolhive.Cross-repo coupling (follow-up cleanups required)
After this PR ships, the following downstream consumers will lose access to the schema asset and will need coordinated cleanup:
.goreleaser.yamland.github/workflows/releaser.ymlviatoolhive-legacy-registry.schema.json. After this PR ships, toolhive's release will try to pull a non-existent asset. Either land a coordinated PR in stacklok/toolhive to drop that asset reference, or sequence the two PRs..github/upstream-projects.yaml(pulled from toolhive's releases) and render it atdocs/toolhive/reference/registry-schema-toolhive.mdx. Once the upstream release asset disappears, the mirror will fail; the mdx page should be deleted.Test plan
go build ./...cleango test ./...— all packages passtask lint— 0 issues,go vetcleantask license-check— cleangrep -rE 'toolhive-legacy-registry\.schema|ValidateRegistrySchema|\(r \*Registry\) Validate\(\)' .returns zero results🤖 Generated with Claude Code