Skip to content

Trim old versions and download fields from registry listing endpoints - #933

Open
kmturley wants to merge 2 commits into
mainfrom
feature/hide-files-registry-root
Open

Trim old versions and download fields from registry listing endpoints#933
kmturley wants to merge 2 commits into
mainfrom
feature/hide-files-registry-root

Conversation

@kmturley

Copy link
Copy Markdown
Member

Summary

  • The registry root and the four type-list endpoints (GET /, /apps, /plugins, /presets, /projects) previously repeated every published version's full metadata for every package, including each file's url and sha256 - unnecessary until a client actually installs something, and a large share of the payload.
  • These 5 documents now keep only each package's latest version, and keep each file's compatibility fields (architectures, systems, contains, type, size, downloads, attested) so listing-level filtering/sorting (system, architecture, format, etc.) stays fully correct - but drop url/sha256, the two fields responsible for nearly the entire size win and the only ones no client needs before an actual install.
  • Org, package, and per-version endpoints (e.g. GET /plugins/{org}, /plugins/{slug}, /plugins/{slug}/{version}) are unchanged: full version history, full file data including url/sha256.
  • specification.md updated throughout to document the new listing-vs-package-endpoint split.

Size impact (current registry data)

Raw Gzip'd
Before 2.45 MB 275 KB
After ~1.6 MB (~35% smaller) proportionally smaller

(Full files-array removal was considered and measured at ~69% raw reduction, but was rejected - it broke studiorack-site's per-plugin detail pages and its system/platform filter, both of which need the compatibility fields at listing time.)

Compatibility

  • Verified against open-audio-stack-core's Manager.sync()/install() pipeline and studiorack-site's listing/detail pages - this shape keeps both working without further changes on their end, since files (and the fields those consumers actually read) is never removed, only url/sha256.
  • This does still shrink versions to latest-only at the listing tier, which is a schema-shape change for any client that assumed the root/list endpoints carried full version history - flagging for review since it's a spec change, not just an internal optimization.

Test plan

  • npm run format / npm run lint / npx tsc --noEmit
  • npm test (9/9 passing, including 2 new tests covering the summary-tier trim and confirming org/package/version tiers are untouched)
  • npm run build && npm start against real registry data, manually verified shape on lsp-plugins/lsp-plugins (8 versions at org level, 1 version × 4 files with url/sha256 omitted at listing level)

🤖 Generated with Claude Code

The registry root and the four type-list endpoints (GET /, /apps,
/plugins, /presets, /projects) previously repeated every published
version's full metadata for every package, including each file's url
and sha256 - unnecessary until a client actually installs something,
and a large share of the payload (~2.45MB raw / ~275KB gzip'd across
the current 5 documents).

Now those 5 documents keep only each package's latest version, and
each file's compatibility fields (architectures, systems, contains,
type, size, downloads, attested) so listing-level filtering/sorting
stays fully correct, while dropping url/sha256 - the two fields
responsible for nearly the entire size win, and the only ones no
client needs before an actual install. Org, package, and per-version
endpoints are unchanged: full version history, full file data.
CI caught this on a clean checkout: stripSummaryFiles() unconditionally
tried to read/write all 5 summary paths, but a registry.export() call
that only registers some managers (as the two new tests do, and as any
partial build might) never creates the others. My local run had passed
by accident on leftover out/ files from an earlier full build.
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