Skip to main content
← Back to list
01Issue
BugOpenSwamp CLI
AssigneesNone

Relationships

#649 Registry content-type search filter can match versions absent from the displayed extension

Opened by keeb · 6/13/2026

Description

The denormalized Extension.contentTypes field is maintained by Extension.recordNewVersion (lib/domain/extension/extension.ts:439), which overwrites _contentTypes unconditionally on every push regardless of release channel. recordChannelLatest and the yank recalculation paths never recompute it. As a result the field is effectively last-push-wins across all channels, and can advertise a content type that only exists in a prerelease (rc/beta) version or in a since-yanked version — not in the current stable extension.

The registry content-type search filter uses this field directly (MongoExtensionRepository, $in on contentTypes), so filtering the registry by e.g. reports can surface an extension whose stable/displayed version has no reports.

Context

This was found while fixing issue #647 (the extension-page header nav rendered a dead REPORTS anchor from the same denormalized field). That fix made the page nav derive from the displayed version's actual content (deriveSectionNav(latestVersion)), which sidesteps the divergence for the UI. The search-filter field was intentionally left out of scope and still has the underlying staleness.

Steps to reproduce

  1. Publish a stable extension version with no reports.
  2. Publish a later rc/beta version that adds a report (scope: workflow).
  3. extension.contentTypes now includes reports while latestVersion (stable) has none.
  4. Filter the registry by the reports content type — the extension appears, though its stable version has no report.

Possible directions

  • Recompute contentTypes as the union (or stable-only projection) across the relevant channel state on every push/yank/promotion, rather than blindly overwriting with the latest push.
  • Or define contentTypes explicitly as a stable-channel projection and recompute it in recordChannelLatest/yank paths.

Environment

swamp-club app (Deno Fresh 2), lib/domain/extension/extension.ts, lib/infrastructure/mongo-extension-repository.ts. Follow-up to #647.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

6/13/2026, 5:02:47 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.