Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#3600 local_source_failed drops the indexing error: a transient local extension failure leaves no cause (follow-up to 1672)

Opened by skunk-ape · 10/19/2026

What happens

When a local source extension fails to index, swamp reports that the type couldn't be loaded, but not why:

{"event":"auto_resolve","status":"failed","type":"@test/gc-fixture","reason":"local_source_failed"}

In log mode it says "<type> could not be loaded — a local source extension failed to index" and suggests swamp doctor extensions. The bundler or loader error that made indexing fail is dropped. For a transient failure, which is when this usually happens, doctor extensions run afterwards finds nothing, so the cause is lost.

Lab 1672 introduced this message to replace a misleading collective_not_trusted. Its "Expected" section also asked for the underlying error ("file path + underlying bundler/loader error"), and that part didn't ship.

Seen in

swamp-uat's datastore suite, on stable, in two runs about two weeks apart. Each time, swamp model create @test/gc-fixture … in a fresh repo with the checked-in extensions/models/test/gc-fixture.ts failed with only:

"error": "Unknown model type: @test/gc-fixture. Available types: command/shell, @test/side-effect, @test/write-then-wait"
{"event":"auto_resolve","status":"failed","type":"@test/gc-fixture","reason":"local_source_failed"}

The other local fixtures in the same repo (@test/side-effect, @test/write-then-wait) loaded. It didn't reproduce in 40 local runs of those rows under parallel load. The fixture and test are unchanged between passing and failing runs, so the failure is transient, and without the error there's nothing to go on.

Where it's dropped

ExtensionAutoResolver.resolve (src/domain/extensions/extension_auto_resolver.ts, around line 327) calls extensionInstaller.failedLocalSourceMatchesType(type), which returns only a boolean. output.localSourceFailed(type) → renderAutoResolveLocalSourceFailed(type, mode) then has nothing to report. The installer recorded the failed source, so the error is available at that point.

Expected

  • The local_source_failed event carries the failing source file and the indexing error, for example "file": "extensions/models/test/gc-fixture.ts", "error": "<bundler/loader message>". The log-mode message prints both.
  • The suggestion to run swamp doctor extensions can stay, but the message shouldn't depend on it for a transient failure.
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/19/2026, 3:02:15 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

skunk-ape commented 10/19/2026, 4:52:27 PM

A possible cause for the two swamp-uat failures above: swamp baf46f1f (#3174, swamp-club#3556), merged to main on 2026-10-16.

It found that when a Deno cache has no esbuild yet, two deno bundle runs started at once both install it, and one can fail with failed to copy esbuild binary … (os error 2). It now runs the first bundle per DENO_DIR alone. swamp-uat's datastore shards run tests with --parallel on a fresh runner, so several local-extension bundles start at once on an empty cache. That matches a transient local_source_failed for @test/gc-fixture while the other fixtures in the same repo loaded.

This isn't confirmed: the failure never reproduced locally, and the dropped error is exactly what would have shown it. Both failures happened before baf46f1f landed (10-13 and 10-14). swamp-uat will keep watching the every_mutation_syncs [git-config] [filesystem] rows for a recurrence on a swamp that carries the fix.

This issue still stands either way: local_source_failed should carry the source file and the indexing error.

Sign in to post a ripple.