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

Relationships

#3374 A new or edited extension source is imported at startup, so one that exits, hangs or prints at import breaks every command

Opened by zack · 10/13/2026· Shipped 10/13/2026

Severity: medium. One extension source can make every swamp command in the repo exit, hang, or print ahead of its JSON output. It needs an extension the repo operator added, so it is a robustness problem, not a remote one.

Found on: swamp 20261013.162519.0-sha.da5e52cd, while verifying swamp-club#3365. Not checked on older builds.

Summary

swamp imports a new or edited extension source during startup, before the requested command runs. Whatever that source does at import therefore happens in every command, including read-only listings that never use the extension.

Steps to reproduce

In a fresh directory, run swamp repo init, then add one vault extension at extensions/vaults/x/x.ts whose first line is one of the following, followed by an ordinary export const vault = { type, name, description, createProvider } definition:

  1. Deno.exit(3);
  2. await new Promise(() => {});
  3. console.log("HELLO FROM EXTENSION");

Then run swamp vault type search --json three times. The result is the same when the file is created before swamp repo init.

Actual behaviour

  1. Exit at import: every run exits 3 with empty output.
  2. Never-settling top-level await: every run hangs (killed by a 20 second timeout in my runs).
  3. Print at import: the first run after the file is added, and the first run after it is edited, print HELLO FROM EXTENSION on standard output ahead of the JSON document, which then does not parse. Later runs are clean.

For case 3 the type is still listed under its type id with an empty description on that first run, so the import that printed is not the vault registry loading the type for the listing.

Expected behaviour

A command that does not use an extension should not run its code, or should at least survive it: a listing should exit 0 with parseable output, and one broken extension should not stop every command in the repo. design/primitives/extensions.md describes lazy loading as importing a bundle only when its type is needed.

Notes

  • I did not trace which startup step performs the import. An integration test comment mentions that the startup reconcile indexes a source by importing its bundle (integration/extension_cold_index_wrapped_export_test.ts), which is a likely place to start.
  • A source that throws at import does not break the command; the type is simply not listed.
  • I only exercised vault type search. I expect other commands behave the same, since the import happens before the command runs, but did not check.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 19 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/13/2026, 10:55:21 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/13/2026, 8:50:34 PM

Sign in to post a ripple.