Relationships
#583 extension push --dry-run --json reports local helper imports as bogus model entries
Opened by jentz · 6/7/2026· Shipped 6/7/2026
Summary
swamp extension push --dry-run --json reports local helper imports as bogus model entries in the dry-run preview. The real registry/catalog record appears clean, so this looks like a cosmetic dry-run preview bug rather than actual publication corruption.
Reproduction
No AWS credentials needed; this is only publisher dry-run metadata.
git clone https://github.com/jentz/swamp-extensions.git
cd swamp-extensions
swamp extension push aws-rds-inventory/manifest.yaml --dry-run --json \
| jq -s 'map(select(type == "object" and has("models")))[0].models'Actual output
The dry-run preview includes _lib/retry.ts as a model:
[
{
"type": "aws-rds-inventory/_lib/retry.ts",
"fileName": "aws-rds-inventory/_lib/retry.ts"
},
{
"type": "@jentz/aws-rds-inventory",
"fileName": "aws-rds-inventory/aws_rds_inventory.ts",
"globalArguments": [
{
"name": "region",
"type": "string",
"required": false
},
{
"name": "selector",
"type": "string",
"required": true
}
]
}
]The manifest only declares the real entrypoint:
models:
- aws_rds_inventory.tsThe model imports the helper normally:
import { withRetry } from "./_lib/retry.ts";Expected output
The dry-run preview should list only the manifest-declared model entry:
[
{
"type": "@jentz/aws-rds-inventory",
"fileName": "aws-rds-inventory/aws_rds_inventory.ts",
"globalArguments": [...]
}
]_lib/retry.ts should be bundled as an internal dependency, not surfaced as a model.
Second confirming repro
Same behavior with sibling extension:
swamp extension push aws-rds-reservations/manifest.yaml --dry-run --json \
| jq -s 'map(select(type == "object" and has("models")))[0].models'Actual includes:
{
"type": "aws-rds-reservations/_lib/retry.ts",
"fileName": "aws-rds-reservations/_lib/retry.ts"
}Why this looks like a dry-run preview bug, not a registry corruption bug
The already-published registry record for @jentz/aws-rds-inventory is clean:
swamp extension info @jentz/aws-rds-inventory --json \
| jq '{contentTypes, contentNames}'Returns only the real model:
{
"contentTypes": ["models"],
"contentNames": ["aws-rds-inventory"]
}So the actual catalog does not appear to publish _lib/retry.ts; only the local extension push --dry-run --json preview is misleading.
Impact
This is cosmetic but outward-facing: dry-run suggests helper modules will be published as bogus model surfaces. That makes pre-publish review confusing and could lead extension authors to avoid normal static imports or restructure helpers unnecessarily.
Suspected cause
The dry-run model preview likely walks the resolved/bundled module graph and classifies any local .ts file under the extension root as a model, instead of filtering display rows back to manifest.yaml's declared models: entrypoints.
Environment
Observed with swamp CLI version 20260606.235053.0-sha.d4ff2b04.
Shipped
Click a lifecycle step above to view its details.