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

open.ts web UI uses force:true pullExtension, same data-loss family as #126

Opened by stack72 · 4/18/2026· Shipped 4/20/2026

Problem

src/cli/commands/open.ts:185 calls pullExtension with force: true inside the web UI's server-side callback (comment explicitly says: "Force overwrite — the web UI has no stdin to answer the 'overwrite existing files?' prompt, so we always install non-interactively and let the latest version win").

If a user has local edits under .swamp/pulled-extensions/<name>/ and the web UI triggers an install (e.g. clicking 'install' on an extension page, or the UI auto-installing a dependency), those edits are silently overwritten with no prompt or warning — same data-loss family as swamp-club#121 and swamp-club#126, different trigger (web UI non-interactive install rather than auto-resolve or auto-update).

Scope of affected code

  • src/cli/commands/open.ts:185force: true in the web UI's pullExtension callback

Suggested fix direction

Once swamp-club#126 lands the filesChecksum anchor and detectLocalEdits pattern, the web UI path can adopt the same check: before firing the force install, compute the on-disk digest, compare to the stored anchor, and if they differ return an HTTP error (e.g. 409 Conflict) with a body that directs the user to run swamp extension pull <name> --force from the terminal. The web UI renders that as a user-visible message in the install flow.

Context

Discovered during swamp-club#126 adversarial review (ADV-3). Explicitly out of scope of #126 so that the auto-update fix can ship with tight scope. Tracking separately here. Similar treatment to #126's treatment of #121 (sibling issues in the same data-loss family, fixed independently with a shared anchor mechanism).

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

4/20/2026, 2:38:36 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack724/20/2026, 1:55:02 PM

Sign in to post a ripple.