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

Relationships

#567 gcs-datastore: registerNamespace does not detect conflicts with existing registrations

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

Description

When two repos register the same namespace slug against the same GCS prefix, the @swamp/gcs-datastore extension's registerNamespace silently succeeds on the second registration instead of throwing a conflict error.

The @swamp/s3-datastore extension correctly detects the conflict — its registerNamespace checks for an existing .namespace.json manifest from a different repoId and throws. The GCS extension does not perform this check.

Steps to reproduce

  1. Create two repos (repo A and repo B) with different repoIds
  2. Both point at the same GCS bucket and prefix
  3. Run swamp datastore setup extension @swamp/gcs-datastore --config '{"bucket":"...","prefix":"SAME"}' --namespace shared on repo A — succeeds, registers namespace
  4. Run the same command on repo B — succeeds silently with "Registered namespace 'shared' in datastore" and no conflict warning

Expected behavior

Step 4 should throw an error matching S3 behavior: the namespace is already registered by a different repo.

Actual behavior

Step 4 succeeds. The second repo's manifest overwrites the first with no conflict detection.

Root cause

registerNamespace in the GCS extension writes the .namespace.json manifest without checking if one already exists from a different repoId. The S3 extension reads the existing manifest, compares repoIds, and throws on mismatch — the GCS extension should do the same.

Found during giga-swamp UAT testing (swamp-club#560).

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGEDCOMPLETE

Shipped

6/5/2026, 11:35:26 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/5/2026, 9:51:45 PM

Sign in to post a ripple.