Skip to content

fix(registry): refresh package metadata on re-announce#119

Merged
mgoldsborough merged 2 commits into
mainfrom
fix/registry-refresh-metadata-on-announce
May 27, 2026
Merged

fix(registry): refresh package metadata on re-announce#119
mgoldsborough merged 2 commits into
mainfrom
fix/registry-refresh-metadata-on-announce

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Problem

upsertPackage has an empty update: {} clause. When a bundle already exists, an announce updates nothing about the package row — not display_name, description, icon, or author. The version moves only because updateLatestVersion runs separately.

Result: 44 of 49 registry bundles show display_name: null even when republished with the field set in the manifest. It also means description/icon/author edits never propagate on re-release.

Confirmed live: @nimblebraininc/abstract v0.2.3 was released with display_name: "Abstract" in the manifest; CI green, latest_version moved to 0.2.3, but the API still returns display_name: null.

Fix

Populate the update clause with the manifest-derived fields. Prisma skips undefined, so a manifest that omits a field preserves the existing value rather than nulling it. Ownership/trust (verified, createdBy, claimedBy/At) and version ordering (latestVersion, handled by updateLatestVersion) are intentionally left untouched.

Verification

  • pnpm --filter @nimblebrain/mpak-registry typecheck
  • pnpm --filter @nimblebrain/mpak-registry lint
  • pnpm --filter @nimblebrain/mpak-registry test ✓ (130 passed)
  • pnpm --filter @nimblebrain/mpak-registry build
  • Post-deploy: re-announce abstract and confirm display_name populates.

upsertPackage had an empty update clause, so re-announcing an existing
bundle never refreshed manifest-derived metadata (display_name,
description, icon, author, homepage, license, serverType). Only the
version moved (via updateLatestVersion). This left 44 of 49 bundles
showing display_name: null even after publishing with the field set.

Populate the update clause with the manifest-derived fields. Prisma
skips undefined values, so a manifest omitting a field preserves the
existing value rather than nulling it. Ownership/trust (verified,
createdBy, claimedBy/At) and version ordering are left untouched.
…/update fields

Addresses QA review on #119:
- Add package.repository.test.ts: asserts the announce update payload
  refreshes manifest-derived metadata AND omits ownership/trust + version
  fields (verified, latestVersion, createdBy, claimedBy, claimedAt). Pins
  the intentional exclusions so a future edit adding any of them to the
  update clause — or reverting to update: {} — fails loudly.
- Hoist the shared manifest fields into one object reused by both create
  and update so the two clauses can't drift (the original bug was exactly
  create/update drift).
@mgoldsborough mgoldsborough force-pushed the fix/registry-refresh-metadata-on-announce branch from f3c6df3 to b9eed0f Compare May 27, 2026 20:26
@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label May 27, 2026
@mgoldsborough mgoldsborough merged commit 3270b78 into main May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant