Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
AssigneesNone

Relationships

↔ sibling #3643

#3644 v3 on S3/GCS: the namespace refusal names setup filesystem, and an unreadable marker on a format-3 repo says "will not open … as format 2" (found by swamp-uat#715)

Opened by stack72 · 10/19/2026· Shipped 10/20/2026

Background

swamp is reworking its datastore layer (tracking: swamp-club#2865). Two v3 error messages still assume a filesystem datastore or a format-2 config, now that v3 runs on S3 and GCS (swamp-club#3534). Found by swamp-uat#715.

1. The namespace refusal names setup filesystem on a bucket

swamp init
swamp datastore setup extension @swamp/s3-datastore --format 3 \
  --config '{"bucket":"b","region":"us-east-1","prefix":"p","endpoint":"http://localhost:4566","forcePathStyle":true}'
swamp datastore namespace set team --json

The same happens for namespace unset and namespace migrate --confirm, on S3 and GCS.

Actual:

Changing the namespace of a v3 datastore is not supported yet: its commits are recorded per namespace. To use a namespace, run swamp datastore namespace set <name> before swamp datastore setup filesystem --format 3.

Expected: the way out names this datastore's own setup command: swamp datastore setup extension @swamp/s3-datastore … --format 3, or the GCS one.

Where: refuseNamespaceChangeOnV3 in src/cli/commands/datastore_namespace.ts hard-codes the filesystem command. Build the command from the repo's datastore type, as other setup advice does: filesystem for a filesystem datastore, extension <type> for an extension datastore.

swamp-uat: in tests/cli/datastore/v3_datastore_test.ts, the three namespace steps of "swamp datastore namespace, sync and doctor --repair are refused on a v3 datastore" are ignored on s3-v3 and gcs-v3, pointing at this issue. Remove the ignores once it ships.

2. An unreadable marker on a v3 bucket says "will not open this datastore as format 2"

The setup: a repo on a v3 S3 datastore (format: 3 in .swamp.yaml) with the bucket unreachable, then any command, e.g. swamp data list x.

Actual:

The datastore format marker _control/datastore-format on @swamp/s3-datastore could not be read (S3 getObject failed … AbortError — Request aborted). It may say format 3, so swamp will not open this datastore as format 2. Check the datastore's connectivity and credentials, and run the command again. Nothing was changed.

The refusal is right, but the repo is configured format: 3, so "will not open this datastore as format 2" doesn't apply.

Where: src/domain/datastore/datastore_format.ts (~:261) uses one message whatever the configured format. Keep the "may say format 3 … as format 2" clause only when the config has no format or says 2. With format: 3, say only that the marker couldn't be read, plus the connectivity advice.

swamp-uat: tests/cli/datastore/offline_test.ts matches the message without that clause, so nothing changes there.

Tests

  • Unit tests for both messages: each datastore kind for (1), and configured format 2, 3 and unset for (2).
  • swamp-uat passes unchanged, apart from removing #715's three ignores in (1) once this ships.

Severity: low; wrong guidance in error messages.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 4 MOREPR_MERGED+ 1 MORESESSION_SUMMARIZED

Shipped

10/20/2026, 9:05:30 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 linked sibling of #364310/20/2026, 5:43:58 PM

Sign in to post a ripple.