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

Relationships

#549 @swamp/ssh@2026.06.04.1 fails to load: bare zod import + missing 2026.06.04.1 upgrade entry

Opened by bixu · 6/4/2026· Shipped 6/4/2026

Description

Pulling @swamp/ssh@2026.06.04.1 produces a model that cannot be loaded. Two independent shipping defects in the same release combine to leave the extension unusable on a fresh pull. Both are in source files that ship inside the extension bundle.

Defect 1 — bare zod specifier

models/_lib/schemas.ts:30:

import { z } from "zod";

The swamp deno bundler does not resolve the bare specifier. Every other extension I have on disk (e.g. @john/k8s, @hivemq/mudroom, @hivemq/harvester/*) uses import { z } from "npm:zod@4".

Error:

error: Import "zod" not a dependency
    at .../@swamp/ssh/models/_lib/schemas.ts:27:22
error: bundling failed

Defect 2 — model version bumped without an upgrade entry

models/ssh.ts:93 declares version: "2026.06.04.1", but the upgrades: array's last entry is:

{
  toVersion: "2026.06.03.1",
  description: "Fix (#511): materializeTempKeys...",
  upgradeAttributes: (old: Record<string, unknown>) => old,
},

There is no toVersion: "2026.06.04.1" row.

Existing saved instances of @swamp/ssh (e.g. pinned at typeVersion 2026.06.03.1 from when they were created) cannot be walked forward to the current model version. The loader aborts with:

Last upgrade toVersion "2026.06.03.1" does not match model version "2026.06.04.1"
for model type "@swamp/ssh"

This is the same class of regression as #357 (@swamp/digitalocean v2026.05.14.1).

Steps to Reproduce

  1. swamp extension pull @swamp/ssh (resolves to 2026.06.04.1).
  2. swamp model type describe @swamp/ssh.
  3. Observe both Import "zod" not a dependency and Last upgrade toVersion ... warnings, followed by Model type not found.

If an existing saved instance at typeVersion 2026.06.03.1 already lives on disk, defect 2 is hit on every load even after defect 1 is patched locally.

Expected Behavior

swamp extension pull @swamp/ssh results in a loadable model whose existing saved instances upgrade cleanly to the new version.

Actual Behavior

swamp doctor extensions reports the model in BundleBuildFailed. swamp extension update, --force pull, and bundle deletion do not recover — each re-pull restores the broken source.

Local Workaround

Patching the user-global pulled-extensions copy (not the project copy — see "loader path note" below) with:

  1. _lib/schemas.ts:30import { z } from "npm:zod@4";
  2. Appending a no-op { toVersion: "2026.06.04.1", upgradeAttributes: (old) => old } entry to the upgrades array in models/ssh.ts.

…lets the model load.

Loader Path Note

swamp extension pull --force overwrites the project-local copy at <repo>/.swamp/pulled-extensions/@swamp/ssh/, but the loader reads from the per-user repo path at ~/.swamp/repos/<uuid>/pulled-extensions/@swamp/ssh/. Edits to the project copy have no effect until the user-global copy is also patched. (This is itself confusing; the loader's source-of-truth is not obvious.)

Suggested Fix Direction

  1. Fix the bare zod import in _lib/schemas.ts to use npm:zod@4.
  2. Add the missing 2026.06.04.1 upgrade entry.
  3. Consider a publish-time check that refuses to ship if (a) any bundle file uses a bare specifier that swamp doesn't resolve, and (b) the model's declared version is not present as a toVersion in upgrades[]. Either defect alone should have blocked the release.

Environment

  • Extension: @swamp/ssh@2026.06.04.1
  • swamp: 20260603.222400.0-sha.a9c61d12
  • OS: darwin (arm64)
  • Shell: /bin/zsh

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/ssh@2026.06.04.1
  • swamp: 20260603.222400.0-sha.a9c61d12
  • OS: darwin (aarch64)
  • Deno: 2.7.14+19bd3d8
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

6/4/2026, 5:37:44 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/4/2026, 3:40:37 PM
Editable. Press Enter to edit.

bixu commented 6/4/2026, 4:02:53 PM

This one is a killer -- have seen it block my agent more than 5x today.

Sign in to post a ripple.