Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

Relationships

#1265 namespace migrate/set workflow broken for extension datastores: migrate skipped by sync guard, set not idempotent, migrate-index empties shards

Opened by stack72 · 7/18/2026· Shipped 7/19/2026

Three related bugs in the namespace workflow for extension datastores (discovered during swamp-club#1250 triage). All are core-side or core↔extension interaction issues.

1. namespace migrate --confirm breaks extension datastores

After namespace migrate, local cache files are physically moved from data/... into {ns}/data/.... The sync guard detectNamespaceDirs (added for swamp-club#1033) then finds {ns}/.namespace.json and skips ALL files inside that directory during push. Result: 0 files pushed after migrate.

The design doc states "The local tier is never namespaced, only the remote is partitioned" — yet namespace set prints "Run swamp datastore namespace migrate --confirm" and the multi-repo workflow example runs it.

Fix options: make namespace migrate a no-op for extension datastores, or teach the push walk that the BOUND namespace's own directory is not "foreign."

2. namespace set is not idempotent

Re-running namespace set <ns> fails with:

Namespace already registered in this datastore by repo .

(trailing empty repo ID)

The comparison logic reads the remote manifest's repoId and compares against the current repo's repoId from .swamp.yaml, but seems to read an empty string for the current repoId. Expected behavior: re-running namespace set with the same namespace on the same repo should be a no-op.

3. namespace migrate + migrate-index leaves empty index

After namespace migrate, running migrate-index reports 0 partitions and rebuilds an empty _index/. This is because migrate-index reads the monolithic index at the pre-migration root location, but after namespace migration the data moved under {ns}/. The monolithic index is stale/empty relative to the new namespace location, so migrate-index sees nothing to shard.

Repro environment

  • Extension: @swamp/s3-datastore@2026.07.18.1
  • swamp: 20260716.190954.0-sha.b479eb8a
  • OS: darwin (aarch64)
  • swamp-club#1250 (the data-key namespacing fix in the extension)
  • swamp-club#1033 (the detectNamespaceDirs guard that conflicts with migrate)
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/19/2026, 10:21:09 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/19/2026, 12:23:40 AM

Sign in to post a ripple.