User extensions silently dropped when base type not yet registered at scan time
Opened by swamp_lord · 4/17/2026· Shipped 4/18/2026
Description
When swamp boots in a repo where the base extension (e.g. @swamp/digitalocean) hasn't been registered yet (no catalog DB) but its source is vendored under .swamp/pulled-extensions/, user extensions under extensions/models/ that extend that base type are loaded, fail to attach (base type not present), and are silently dropped. When a method call later triggers auto-resolve to install the base, there is no retry of the extensions/ scan, so the user-added methods stay missing. The call then fails with an opaque "Unknown method X" error.
Steps to reproduce
- Vendor
.swamp/pulled-extensions/,.swamp/bundles/,.swamp/datastore-bundles/in a repo. Do not vendor.swamp/_extension_catalog.db(not recommended to track SQLite-WAL in git). - Add a user extension
extensions/models/digitalocean_app_platform_promote.tswithexport const extension = { type: "@swamp/digitalocean/app-platform", methods: [{ promote_image: {...} }] }. - In a fresh environment (no
~/.swamp/repos/<id>/state — simulates clean CI checkout), runswamp workflow run deploy-telemetrywhich callstelemetry.promote_image.
Actual behavior
INF extension·auto-resolve Extension type "@swamp/digitalocean/app-platform" not found locally, searching registry...
INF extension·auto-resolve Installed "@swamp/digitalocean"@"2026.04.08.1" (33 models registered)
ERR Step failed: "Unknown method 'promote_image' for type '@swamp/digitalocean/app-platform'. Available methods: create, get, update, delete, sync"Workaround: run swamp extension install before any method call to pre-populate the catalog so the base type is registered before user-extension scanning.
Expected behavior
Either (a) auto-resolve triggers a re-scan of extensions/ after installing the base type, or (b) the initial extension loader errors loudly when a user extension targets a type that isn't yet registered, so the operator knows to install the base first.
Environment
- swamp:
20260414.220725.0-sha.e36340deon ubuntu-latest (GitHub Actions) - Extension:
@swamp/digitalocean@2026.04.08.1 - Reproduced on the swamp-club services-deploy.yml CI pipeline (PR systeminit/swamp-club#420)
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.