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

Relationships

#798 pushChanged does not implement absence-on-disk deletion (markDirty contract rule #2)

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

Summary

pushChanged in the GCS datastore sync service likely does not delete remote GCS objects when locally-deleted files are detected via the markDirty contract's rule #2 (absence-on-disk = delete). This is the same gap identified in the S3 datastore (swamp-club#797).

When core calls markDirty(relPath) before removing a file, the sync service records the path as dirty. On the next pushChanged, the walk should detect absent dirty paths and issue GCS DELETEs — but this case is not handled.

Context

swamp-club#788 fixed the core side: swamp data gc now emits per-path notifyDirty(versionDir) calls for each version being removed (PR swamp-club/swamp#1667). The extension needs to act on those signals.

See swamp-club#797 (@swamp/s3-datastore) for the identical issue and required changes. The fix pattern is the same:

  1. Scoped walk: when a dirty path is absent locally, find index entries matching that prefix and collect them for GCS deletion
  2. Bulk walk: after walking local files, iterate the index to find entries with no local counterpart — collect those for deletion (guarded by lazy hydration state to avoid deleting un-hydrated content)
  3. Issue GCS DELETEs in batches, remove deleted entries from the index, and include them in the index writeback condition

Backwards Compatibility

The markDirty contract already defines rule #2 as SHOULD. This change makes the extension implement the rule it previously acknowledged but did not act on. No interface changes needed.

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

Environment

  • Extension: @swamp/gcs-datastore@2026.06.05.1
  • swamp: 20260623.195403.0-sha.89da3589
  • OS: darwin (aarch64)
  • Deno: 2.8.3
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

6/24/2026, 3:17:25 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/24/2026, 2:41:36 PM

Sign in to post a ripple.