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

Relationships

#839 fix: add .namespace.json to isInternalCacheFile() in datastore extensions

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

Summary

Defense-in-depth follow-up to #834.

pushChanged() in both s3_cache_sync.ts and gcs_cache_sync.ts in swamp-extensions should explicitly skip .namespace.json during orphan detection, the same way it already skips .datastore-index.json, .push-queue.json, .datastore.lock, and other internal files.

The primary fix (#834) materializes the manifest into the local cache so it's no longer an orphan. This extension-side fix is belt-and-suspenders: even if the cache copy is missing for any reason, the manifest should never be treated as a deletable orphan.

What to change

In isInternalCacheFile() in both datastores/_lib/s3_cache_sync.ts and datastores/_lib/gcs_cache_sync.ts, add .namespace.json to the exclusion list:

const base = rel.split("/").pop() ?? "";
if (base === ".namespace.json") return true;

Additional context

The GCS extension uses bulkInvalidated for orphan detection (line ~1223), which fires on any bulk markDirty(). The S3 extension uses the stricter dirtyPathsOverflowed (line ~1366), which only fires after 200+ dirty path overflow. Both should protect .namespace.json regardless.

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


Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/1694

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

6/26/2026, 5:42:17 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/26/2026, 5:12:06 PM

Sign in to post a ripple.