Skip to main content
← Back to list
01Issue
BugClosedSwamp CLIPublic
Assigneesstack72

Relationships

#1559 datastoreSetupExtension migrates .swamp/ to cache root instead of namespace directory

Opened by stack72 · 8/7/2026

Summary

datastoreSetupExtension() in src/libswamp/datastores/setup.ts:461 migrates files from .swamp/ to cachePath (the cache root), ignoring the bound namespace. When a namespace is set, the destination should be join(cachePath, namespace) so files land at {cachePath}/{namespace}/outputs/, {cachePath}/{namespace}/data/, etc.

// Current (setup.ts:461)
const result = await deps.migrateData(
  sourceDir,
  cachePath,      // <-- always root, ignores namespace
  config,
);

The push that follows (line 481) passes namespace: ns, so the extension walks {cachePath}/{namespace}/ and never sees the root-level files just migrated. They're stranded at the cache root and silently never pushed.

Impact

Affects the initial datastore setup migration when a namespace is configured — any files in .swamp/ (outputs, workflow-runs, definitions-evaluated, etc.) are placed outside the namespace directory and skipped by push.

This was partially masked by swamp-club#1557 (the extension-side pullFile path bug, now fixed in @swamp/s3-datastore@2026.07.31.1), but the core migration target is independently wrong.

Fix

When ns is set, pass join(cachePath, ns) as the migration destination instead of bare cachePath.

Found during

Triage of #1557.


Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/2098

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 2 MOREPR_MERGED

Closed

8/8/2026, 12:37:19 AM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack728/7/2026, 11:04:46 PM

Sign in to post a ripple.