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

Relationships

#559 fix: datastore setup extension with namespace config doesn't scope sync or register manifest

Opened by stack72 · 6/4/2026· Shipped 6/5/2026

Description

Two related bugs when setting up an extension datastore with namespace in the config JSON:

Bug 1: No namespace scoping in bucket

When a repo is set up via datastore setup extension @swamp/s3-datastore --config '{...namespace: infra}', the initial sync push writes data to the root prefix level, not under infra/. The .datastore-index.json lands at {prefix}/.datastore-index.json instead of {prefix}/infra/.datastore-index.json.

This means two namespaced repos pushing to the same prefix overwrite each others index. Per-namespace isolation is broken.

Likely cause: the DatastorePathResolver constructed during setup doesnt include the namespace, so local cache paths arent namespaced, and the push uploads from un-namespaced paths. Bug #536 threaded namespace into the push/pull calls but the path resolver may not be set up with the namespace at that point in the setup flow.

Bug 2: No manifest registration during setup

When namespace is passed in the config JSON during setup, it gets written to .swamp.yaml but registerNamespace() is never called on the provider. This means:

  • swamp datastore namespaces returns 0 (no manifests in bucket)
  • Conflict detection doesnt work (second repo can claim same namespace)
  • namespace unset says nothing is configured

The namespace set command does call registerNamespace(), but setting namespace via the setup config is a different code path that bypasses namespace set entirely.

Steps to Reproduce

  1. swamp datastore setup extension @swamp/s3-datastore --config '{bucket: test, prefix: shared, namespace: infra}'
  2. Run a model, push data
  3. Check bucket: data is at {prefix}/ not {prefix}/infra/
  4. swamp datastore namespaces: returns empty
  5. Second repo with same config but namespace: security can claim infra without conflict

Expected Behavior

Setup with namespace in config should:

  1. Create the local cache with namespaced paths
  2. Push data under the namespace prefix
  3. Register the namespace manifest in the bucket

Workaround

Run datastore setup without namespace, then swamp datastore namespace set separately.

Impact

The setup-with-namespace path is broken. Found during UAT test development (#555). The namespace set path works correctly.

  • #536 (threaded namespace into setup push/pull — partial fix)
  • #542 (Phase 5: namespace set does register manifests correctly)
  • #547 (S3/GCS extensions implement registerNamespace)
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 7 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

6/5/2026, 12:05:03 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/4/2026, 11:16:58 PM

Sign in to post a ripple.