Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

Relationships

#1276 ExtensionInfo.latestVersion typed 'string' but registry returns null; harden pull/resolve for prerelease-only extensions

Opened by keeb · 7/19/2026· Shipped 7/19/2026

Follow-up from swamp-club#1272 (PR #1902).

The registry returns latestVersion: null for extensions published only to a prerelease channel (beta/rc), but ExtensionInfo.latestVersion (src/infrastructure/http/extension_api_client.ts) is typed string. This masks the null case at compile time. #1272 fixed the immediate crash in swamp extension version by reading the field null-safely at that command's boundary, but the type remains dishonest repo-wide.

Scope for this follow-up:

  • Change ExtensionInfo.latestVersion to string | null (and ExtensionInfoData.latestVersion in libswamp/extensions/info.ts).
  • Audit and harden the download/resolve paths that assume a non-null latest version for prerelease-only extensions, notably:
    • src/libswamp/extensions/pull.ts:725 (ref.version ?? extInfo.latestVersion)
    • src/domain/extensions/extension_auto_resolver.ts:393 (const version = extInfo.latestVersion)
    • the extension info renderer (prints latestVersion directly)
  • Decide the correct behavior when a prerelease-only extension is pulled/resolved without an explicit version (fall back to a prerelease channel, or error clearly) and add tests.

Deferred from #1272 because it changes pull/resolve behavior and warrants its own tests.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 12 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/19/2026, 10:17:35 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/19/2026, 8:11:48 PM

Sign in to post a ripple.