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

Relationships

#2410 Extension catalog caches a datastore bundle with an empty type, so the repo fails with Unknown datastore type when addressed by its realpath

Opened by stack72 · 9/23/2026

Summary

A repo whose datastore is @swamp/s3-datastore fails every datastore-touching command with:

Unknown datastore type "@swamp/s3-datastore" in .swamp.yaml. Available types: filesystem

when the repo is addressed by one path, and works when it is addressed by another path to the same directory. The extension catalog holds a datastore row with an empty type for the failing path.

Found while reproducing swamp-club#2405 on macOS, swamp 20260923.142649.0-sha.379bb5f0, @swamp/s3-datastore 2026.09.23.1.

Reproduction

On macOS /tmp is a symlink to /private/tmp.

  1. mkdir /tmp/repro && cd /tmp/repro && swamp repo init
  2. swamp datastore setup extension @swamp/s3-datastore --repo-dir /tmp/repro --namespace ns --config <s3/minio config> succeeds and auto-installs the extension.
  3. Run any command with the shell cwd at the repo (the shell reports it as /private/tmp/repro), e.g. swamp model create command/shell m1 --json.

Observed: auto_resolve reports failed ... reason: already_installed for /private/tmp/repro/.swamp/pulled-extensions/@swamp/s3-datastore, then the command fails with the error above.

After that, from the same machine:

Invocation Result
--repo-dir /tmp/repro works
cwd /tmp/repro works
--repo-dir /private/tmp/repro Unknown datastore type
cwd /private/tmp/repro Unknown datastore type
cwd /private/tmp/repro with --repo-dir . Unknown datastore type

Evidence

.swamp/_extension_catalog.db, table bundle_types, holds exactly one datastore row:

source_path     = /private/tmp/repro/.swamp/pulled-extensions/@swamp/s3-datastore/datastores/s3.ts
type_normalized = (empty string)
kind            = datastore

The row is keyed by the realpath form and has no type, so a lookup through that path finds a cached entry that registers nothing. The symlinked form has no row and appears to fall through to a fresh scan.

Expected

The catalog never persists a datastore row with an empty type, and the same repo resolves identically regardless of which path (symlink or realpath) addresses it.

Notes

Not yet traced in code. Worth checking whether the empty row is written by the failed already_installed auto-resolve path, and whether source paths should be canonicalised (realpath) before they key the catalog.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

9/23/2026, 3:37:23 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.