Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeshammz

Relationships

#2646 Extension restore leaves a parent installed and its dependency permanently missing when the dependency install fails

Opened by hammz · 9/28/2026· Shipped 9/29/2026

Summary

During a lockfile restore (swamp extension install, repo upgrade, serve extension.install), installExtension writes the parent's lockfile entry and extracts its files before installing dependencies (src/libswamp/extensions/pull.ts, the writeEntry call before the dependency loop). If a dependency that is missing from the lockfile then fails to install (network error, not found, integrity error), the command reports the parent as failed but the parent's files are back on disk.

On the next extension install, the parent is classified up_to_date because its lockfile entry and files are present. Restore never looks at a parent's declared dependencies once the parent is up to date, so the missing dependency is never retried. The half-installed state is permanent and silent: later runs report failed 0.

Found while triaging swamp-club#2639. There the trigger was the parent's expectedChecksum leaking into dependency installs, which #2639 fixes. Any other dependency failure still produces the same end state, and so does a hand-edited lockfile with a dependency entry removed.

Reproduction

In a scratch repo, pull @kneel/eda-factory with --channel beta. It depends on @kneel/kicad and @kneel/eda-review-lenses. Remove @kneel/kicad from the lockfile, delete the files of both the parent and kicad, and make kicad's install fail (before #2639 the checksum leak does this). Run swamp extension install: the parent is failed. Run it again: the result is installed 0, upToDate 2, failed 0, and kicad stays absent.

Possible directions

  • Roll back the parent's created files and lockfile entry when a dependency install throws, so the next restore retries the whole tree.
  • Make the restore's up-to-date check treat a parent as needing install when a declared dependency has no lockfile entry. This also covers hand-edited lockfiles.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/29/2026, 2:29:58 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/29/2026, 2:00:33 PM

Sign in to post a ripple.