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

Relationships

#901 doctor extensions --repair should remove stale bundle entries for deleted source files

Opened by dmc · 6/30/2026· Shipped 7/1/2026

Description

swamp doctor extensions --repair leaves stale bundle entries on disk when the source files they were built from no longer exist. Manual deletion of the bundle directory is required to clean up.

Steps to Reproduce

  1. Have a local extension loaded from extensions/models/ (e.g. proxmox_vm_extras.ts, proxmox_storage.ts)
  2. Publish the extension to the registry and pull it via swamp extension pull
  3. Delete the local source files from extensions/models/
  4. Run swamp doctor extensions --repair

Observed Behavior

doctor extensions --repair reports all checks as passing but leaves the stale bundle directory (e.g. .swamp/bundles/e9c5c01e/) in place. The --repair output still lists the deleted source paths alongside the new pulled-extension paths:

"sourcePath": "/Users/dmc/projects/ai-infra/extensions/models/proxmox_storage.ts",
"bundlePath": "/Users/dmc/projects/ai-infra/.swamp/bundles/e9c5c01e/proxmox_storage.js",

Even though extensions/models/proxmox_storage.ts no longer exists on disk.

Expected Behavior

swamp doctor extensions --repair should detect bundle entries whose source files no longer exist and remove them automatically — the same way it handles other inconsistent state. A user who deletes local extension source files and runs --repair should end up with a clean state without needing to manually rm -rf .swamp/bundles/<hash>/.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

7/1/2026, 12:05:02 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/30/2026, 11:20:48 PM
Editable. Press Enter to edit.

dmc commented 6/30/2026, 11:22:02 PM

Follow-up: the stale entries persist because they're stored in .swamp/_extension_catalog.db (SQLite), not just on the filesystem. Deleting the bundle directory alone doesn't clear them — the catalog still holds the old source/bundle paths. The --repair command would need to check for catalog entries whose source files no longer exist and remove them from the DB, then also remove the associated bundle directories. Workaround until fixed: rm .swamp/_extension_catalog.db* forces a rebuild from the actual extension files.

stack72 commented 7/1/2026, 12:05:12 AM

Thanks @dmc for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.