stacklok / stacklok/toolhive

Remove legacy registry format internals from toolhive

Open
#5,278 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api cli go registry
Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

Summary

Phase 1 of removing the legacy registry format from toolhive: the parse-side internals and the registry_legacy_format error code. Phase 2 — aligning the registry API with the toolhive-registry-server v0.1 surface — is tracked separately in stacklok/toolhive#5279, which is what actually unblocks stacklok/toolhive-core#106.

The legacy ToolHive registry format is no longer produced anywhere after the 2026-05-13 cleanups in toolhive-catalog (#1215), toolhive-core (#105), and toolhive (#5273).

Scope

Parse-side internals:

  • pkg/registry/legacyhint/
  • pkg/registry/convert.go (ConvertJSON)
  • pkg/registry/errors.go (LegacyFormatError)
  • pkg/registry/upstream_parser.go (errLegacyFormat + sniffer fallback)
  • pkg/registry/provider_remote.go (legacyhint.Looks() call)
  • cmd/thv/app/registry_convert.go (thv registry convert CLI)

v1 API error code:

  • pkg/api/v1/registry.goregistry_legacy_format error code and LegacyFormatError propagation
  • pkg/api/v1/registry_test.go

Open questions

  1. Keep legacyhint + the registry_legacy_format error code for one release as a friendly migration hint, or delete now?
  2. Does thv registry convert stay as a one-shot migration tool, or go with the rest?

Acceptance criteria

  • No remaining imports of legacy-aware parse types in toolhive (modulo a deprecation window if we keep one).
  • No emission of registry_legacy_format from any toolhive code path.
  • task test, task test-e2e, task docs all green/regenerated.

References

  • Phase 2: stacklok/toolhive#5279
  • Landed: stacklok/toolhive-catalog#1215, stacklok/toolhive-core#105, stacklok/toolhive#5273

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed legacy parsing paths, including pkg/registry/legacyhint/, convert.go, errors.go, upstream_parser.go, provider_remote.go, cmd/thv/app/registry_convert.go, and pkg/api/v1/registry.go with its tests. Resolve whether to retain the migration hint and conversion CLI, then verify no legacy imports or registry_legacy_format emissions remain. Run task test, task test-e2e, and task docs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.