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:
- Import outside
models/.extensions/models/rel.tsimports../lib/cmp.ts(extensions/lib/cmp.ts). Archive:bundles/rel.js,manifest.yaml,models/rel.ts.lib/cmp.tsis missing. paths.base: manifestmodel 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 tomodels/keygen.tsand_lib/schemas.tsis 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/*outsidemodels/) - @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.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.