Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesskunk-ape

Relationships

#3376 extension push: archive source copy drops local modules imported from outside the model's directory

Opened by skunk-ape · 10/13/2026· Shipped 10/13/2026

Problem

swamp extension push builds the bundle correctly but leaves local modules out of the archive's source copy, with no warning. Anything that reads the source (the registry scorer's deno doc, an author reading the archive) sees imports that don't resolve. The extension still runs, because swamp runs the bundle.

Reproduced on swamp 20261013.155841.0-sha.1bb4f396 with swamp extension push <manifest> --dry-run, then listing .swamp/cache/packages/<contentHash>/extension.tar.gz:

  1. Import outside models/. extensions/models/rel.ts imports ../lib/cmp.ts (extensions/lib/cmp.ts). Archive: bundles/rel.js, manifest.yaml, models/rel.ts. lib/cmp.ts is missing.
  2. paths.base: manifest model in a sub-directory. extensions/models/keygen/keygen.ts (manifest beside it) imports ../_lib/schemas.ts (extensions/models/_lib/schemas.ts). Archive: bundles/keygen.js, manifest.yaml, models/keygen.ts. The model is flattened to models/keygen.ts and _lib/schemas.ts is dropped, so even the relative path no longer points where it did.

A flat model importing ./_lib/*.ts (multi-line import included) packages correctly today.

Evidence

Published archives in production with this gap, where the bundle's source comments show the module that the source copy lacks:

  • @hivemq/1password/item, @hivemq/ssh/keygen (paths.base: manifest, ../_lib/*)
  • @kneel/sig-distgit, @kneel/openstack-releases (../lib/* outside models/)
  • @stack72/letsencrypt-certificate and @rjeschmi/vm were published in March 2026 with an older CLI; the flat case no longer reproduces.

The registry now scores such a version with its documentation factors at 0 and shows "Not in the published archive: (imported from )" (swamp-club#3370).

Expected

Every local module the bundle includes is in the archive's source copy at a path where the source's relative imports resolve. Failing that, push warns that the source copy is incomplete.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 21 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/13/2026, 10:04:45 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape10/13/2026, 6:05:28 PM

Sign in to post a ripple.