Relationships
#4521 extension list: show the registry channel a version is on today (and each channel's current head), not the channel recorded at pull time
Opened by svendowideit · 11/8/2026
Summary
swamp extension list reports the release channel recorded when the version
was pulled, not the channel the registry has that version on now, and it
never shows what is currently published on the other channels. After a
beta→rc/stable promote, the list keeps describing the old, no-longer-valid
state, and swamp extension update says "already up to date" because it only
compares against the channel the install follows.
Concretely (from a beta test machine):
$ swamp extension promote ... # promoted several beta versions to rc/stable
$ swamp extension update
@svendowideit/systemd-service: already up to date (v2026.10.26.1)
@svendowideit/caddy: already up to date (v2026.11.07.12)
$ swamp extension list
@svendowideit/caddy v2026.11.07.12 [beta] v2026.11.07.11 (pulled 2026-11-07T13:36:04.023Z)
@svendowideit/systemd-service v2026.10.26.1 [beta] v2026.10.26.1 (pulled 2026-11-08T03:21:49.615Z)[beta] here is a pull-time fact stored in upstream_extensions.json
(publishedChannel / channel), replayed as if it were current state. There
is no way to tell from the output that those versions are now on rc/stable,
or which versions are currently sitting on rc waiting to be tested.
How the current output is built
From src/presentation/renderers/extension_list.ts:
function channelTag(ext): string {
const followed = ext.channel ?? "stable";
const published = ext.publishedChannel;
if (published && published !== followed) {
return ` [${published}, following ${followed}]`;
}
return followed !== "stable" ? ` [${followed}]` : "";
}channel— the channel the install follows, written to the lockfile at pull time and never refreshed.publishedChannel— the channel the registry listed that version on at pull time.- the second version column (
latestVersion) is live-ish, but it is queried for the followed channel only, and it is cached for 24h (src/cli/commands/extension_list_freshness.ts).
So the "channel" the user reads is frozen at pull; only one channel's head is ever shown; the other channels are invisible.
Why it bites
Acting on the stale tag produces an unfriendly registry error:
$ swamp extension promote @svendowideit/caddy 2026.11.07.12 --channel rc Error: Extension API error (HTTP 400): Cannot demote a stable version to rc
The list said
[beta]; the registry says stable. The list was wrong, and the CLI did not look up the real channel before asking the registry to promote. (The manifest form ofpromotedoes look it up —resolveFromChannel/findPublishedVersion— thename <version>form does not.)A tester cannot see what is available to test next.
extension info --jsonalready carrieslatestVersion,latestRcandlatestBeta;listVersionsalready returns the channel of every version. None of that reacheslist.extension updatereportsalready up to date (v2026.10.26.1)without naming the channel it compared against, so an install followingbetalooks identical to one that has nothing newer anywhere.
What would make this useful
Ask: make swamp extension list answer "where does this version live in the
registry right now, and what else could I be testing?" — refreshed during the
enrichment pass it already performs, and marked as stale rather than silently
replayed when the refresh fails.
1. Say where the installed version is now, and when that changed
@svendowideit/caddy v2026.11.07.12 pulled as beta, now stable …
@svendowideit/sudo v2026.11.07.4 beta (unchanged) …
@svendowideit/tuios v2026.09.30.2 channel unknown (check failed) …i.e. keep the pull-time record (it is genuinely useful history) but show the
live registry channel next to it and flag disagreement, instead of printing
[beta] on its own and letting the reader believe it is current.
2. Show the current head of every channel
So a beta tester can see what to test before pulling:
NAME INSTALLED NOW stable rc beta
@svendowideit/caddy v2026.11.07.11 rc 2026.11.07.13 2026.11.07.12 2026.11.07.13
@svendowideit/systemd-service v2026.10.26.1 rc 2026.10.26.1 2026.10.26.1 —
@swamp/s3-datastore v2026.11.05.1 stable 2026.11.05.1 — —(— = nothing published on that channel.) A channel that is empty for an
extension should be explicit, not omitted: "not on beta" is exactly the fact a
tester needs.
3. Expose the same in --json
Today the JSON entry carries version, pulledAt, publishedChannel and
(only after enrichment) latestVersion. Suggest:
{
"name": "@svendowideit/caddy",
"version": "2026.11.07.11",
"channelFollowed": "beta",
"channelAtPull": "beta",
"channelNow": "rc",
"registry": { "stable": "2026.11.07.13", "rc": "2026.11.07.12", "beta": null },
"registryCheckedAt": "2026-11-08T03:31:57.413Z"
}registryCheckedAt matters: the freshness cache suppresses registry calls for
24h, so a consumer needs to know how old "now" is.
4. Do not present a failed check as a real answer
The enrichment path stamps latestVersion = installedVersion into the 24h cache
when the registry call fails ("suppress retries for 24h"), so a failed check
renders as up_to_date — indistinguishable from a successful one. extension update showed exactly this state for one extension in the same session:
Warning @svendowideit/opencode: Failed to fetch registry info for @svendowideit/opencode.Whatever the channel display looks like, an unknown/offline result should stay unknown rather than defaulting to "up to date".
5. extension update should name the channel it compared
@svendowideit/systemd-service: already up to date on beta (v2026.10.26.1)and ideally note when the same version is now also on a higher channel, since that is the moment the install should follow the promotion.
Notes
- No new API work should be needed:
getExtension()returnslatestVersion,latestRc,latestBeta, andlistVersions()reports the channel of each version. Both are already used elsewhere in the CLI (extension info,findPublishedVersion). - The freshness cache is already keyed per
(name, channel)(extensionCacheKey(name, channel)), so caching three channel heads per extension fits the existing structure. - Related: #4520 (version strings swamp prints are not accepted back as
arguments), #4151 (
promoteshould acceptname@version). Both are about the same gap — the CLI knows the registry state but does not use it when rendering or parsing.
Environment
- Observed on the build printing
@svendowideit/caddy v2026.11.07.12 [beta](registry state 2026-11-07 / 2026-11-08). - Source read at
swamp 20261106.012700.0-sha.ebf04ac6. - Linux, bash.
Open
No activity in this phase yet.
Sign in to post a ripple.