Skip to main content
← Back to list
01Issue
FeatureShippedExtensions
Assigneesstack72

Relationships

#547 feat: S3/GCS extension namespace manifest support (registerNamespace/listNamespaces)

Opened by stack72 · 6/3/2026· Shipped 6/3/2026

Problem

Phase 5 (PR #1500) added registerNamespace() and listNamespaces() as optional methods on the DatastoreProvider interface. The filesystem backend implements them via .namespace.json manifest files. But the S3 and GCS extensions don't implement these methods yet.

When a user runs swamp datastore namespace set infra against an S3/GCS datastore, the command warns that conflict detection is unavailable and proceeds without writing a manifest to the bucket. A second repo pointing at the same bucket can claim the same namespace without any conflict check.

What needs to change

S3 extension

Implement two methods on the provider:

registerNamespace(datastorePath, namespace, repoId) — PUT a .namespace.json file to {namespace}/.namespace.json in the bucket. Before writing, GET the key to check if it already exists. If it does and the repoId differs, throw a conflict error.

listNamespaces(datastorePath) — LIST objects matching */.namespace.json in the bucket, parse each one, return the namespace slugs. Same pattern as the existing .catalog-export.json and .datastore-index.json operations.

GCS extension

Mirror the same two methods for GCS.

Implementation notes

The methods follow the same patterns already used in the namespace-scoped sync work (#533):

  • fetchForeignCatalogs does a similar GET-and-parse-JSON operation
  • exportCatalog does a similar PUT-JSON operation
  • The S3Client and GcsClient already have all the primitives needed (getObject, putObject, listObjects)

The manifest schema matches the filesystem implementation: { namespace: string, repoId: string, registeredAt: string (ISO-8601) }

The key path is {prefix}/{namespace}/.namespace.json (where prefix is the configured S3/GCS prefix).

Verification

  • namespace set against S3/MinIO writes .namespace.json to bucket
  • Second repo attempting same namespace gets conflict error
  • datastore namespaces lists all registered namespaces from bucket
  • Solo mode regression: all existing operations unchanged
  • Existing namespace-scoped sync still works (push/pull/catalog export)

Design Context

Core interface: DatastoreProvider in src/domain/datastore/datastore_provider.ts (Phase 5, PR #1500) Filesystem reference implementation: src/infrastructure/persistence/namespace_manifest.ts S3 extension sync: #533 (shipped)

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 2 MOREPR_LINKEDCOMPLETE

Shipped

6/3/2026, 11:27:51 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/3/2026, 9:55:34 PM

Sign in to post a ripple.