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

Relationships

#1280 Sync guard skips bound namespace directory during push — 0 files pushed after namespace migrate

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

Summary

After namespace set + namespace migrate --confirm, datastore sync --push pushes 0 files. The sync guard (added for swamp-club#1033) detects {cache}/{ns}/.namespace.json and treats the bound namespace's directory as foreign, skipping all files inside it.

Root Cause

Two protective mechanisms conflict:

  • #834 fix: core writes .namespace.json into {cache}/{ns}/ so orphan detection doesn't delete the remote copy
  • #1033 guard: extension skips any cache directory containing .namespace.json to prevent pushing foreign namespace data

The guard doesn't distinguish between the bound namespace (which should be pushed) and foreign namespaces (which should be skipped). It already receives namespace in DatastoreSyncOptions but doesn't use it.

Reproduction

# Fresh repo with minio
swamp repo init
AWS_ACCESS_KEY_ID=[REDACTED-SECRET-1] AWS_SECRET_ACCESS_KEY=[REDACTED-SECRET-1] \
  swamp datastore setup extension @swamp/s3-datastore \
  --config '{"bucket":"test","region":"us-east-1","endpoint":"http://localhost:9100","forcePathStyle":true}'

# Write data, push baseline
# ... (write files into cache/data/)
swamp datastore sync --push   # Pushed 4 files

# Set namespace and migrate
swamp datastore namespace set my-ns
swamp datastore namespace migrate --confirm

# Push after migrate — FAILS
swamp datastore sync --push
# [s3-sync] Skipped 4 file(s) inside namespace directories found under the cache root (my-ns).
# These directories should not be inside this cache — investigate and remove them.
# Pushed 0 files

Expected Fix

When the guard detects a namespace directory matching options.namespace, it should exempt it from the skip — it's the bound namespace, not foreign. One-line check in the push walk.

Environment

  • Extension: @swamp/s3-datastore@2026.07.18.1
  • swamp: 20260718.214947.0-sha.4a2f976c
  • OS: darwin (aarch64)
  • swamp-club#1265 (parent issue — this is bug #1 of three)
  • swamp-club#834 (cache manifest for orphan detection)
  • swamp-club#1033 (sync guard for foreign namespace detection)

Upstream repository: https://github.com/systeminit/swamp-extensions

Environment

  • Extension: @swamp/s3-datastore@2026.07.01.1
  • swamp: 20260718.214947.0-sha.4a2f976c
  • OS: darwin (aarch64)
  • Deno: 2.8.3
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/21/2026, 12:27:57 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/20/2026, 8:21:09 PM

Sign in to post a ripple.