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

Relationships

↔ sibling #2844

#3162 datastore setup filesystem --path .swamp copies .swamp onto itself and never writes the datastore block

Opened by stack72 · 10/7/2026· Shipped 10/7/2026

Found while reproducing swamp-club#2844.

What happens

In a repo with no datastore block in .swamp.yaml, running swamp datastore setup filesystem --path .swamp (the default datastore location) migrates .swamp into itself. Copying _catalog.db, _catalog.db-wal and _catalog.db-shm fails with: Source and destination paths refer to the same file. Because of those errors, setup never writes the datastore block to .swamp.yaml. It still exits 0, prints Relocated ... Moved from with the same path on both sides, and says re-run the same command to retry, which fails the same way every time.

Released binary 20261006.215416.0:

swamp repo init --tool none
swamp datastore setup filesystem --path .swamp

Hazard

In datastoreSetupFilesystem (src/libswamp/datastores/setup.ts), cleanupSourceDirs runs after a migration with no errors and removes the migrated directories from the source. When the source and destination are the same directory, only the catalog copy failures stop cleanup from deleting the datastore contents.

Expected

When the destination resolves (realPath) to the migration source, setup skips the copy, verification and cleanup, and writes the datastore block. A destination nested inside .swamp (for example .swamp/store) already works.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 4 MOREPR_MERGED+ 1 MORESESSION_SUMMARIZED

Shipped

10/7/2026, 10:20:08 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 linked sibling of #284410/7/2026, 9:10:15 PM

Sign in to post a ripple.