OverviewFilesCommitsIssuesDocsReleasesPeers

atproto-store commits / c5a06d1

OverlayRepoStore.del: propagate deletes via overlay.unregisterFile
When an overlay is attached, a record delete now logs a del to the overlay's change feed so peers remove their copy (attachReplication). No-op without an overlay (local file unlink only). Tracks hyper-social #8. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c5a06d17bcbd0ef10cf22568bb199839cdd8e716
by plankatron <fleeky@gmail.com> · 2026-07-19T17:56:49.000Z

Changed files (2) +3 -2

lib/overlay-repo-store.js +2 -1
……@@ -73,7 +73,8 @@ export class OverlayRepoStore {
7373
7474 async del (collection, rkey) {
7575 try { fs.unlinkSync(this._pathFor(collection, rkey)) } catch (e) { if (!e || e.code !== 'ENOENT') throw e }
76 // The file IS the source of truth; overlay index prune is a Phase-2 concern (evictContent).
76 // Record the deletion in the overlay's change feed so it propagates to peers (attachReplication).
77 if (this._overlay) { try { await this._overlay.unregisterFile(this._overlayPath(collection, rkey)) } catch {} }
7778 try { fs.rmdirSync(join(this._recordsDir, collection)) } catch {} // best-effort: drop an empty collection dir
7879 }
7980
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "atproto-store",
3 "version": "0.0.3",
3 "version": "0.0.4",
44 "description": "Holepunch-native atproto repo store \u2014 records in a classic Hyperbee (collection/rkey -> DAG-CBOR). The P2P home; the atproto-repo module is the bridge serializer over it.",
55 "type": "module",
66 "main": "lib/repo-store.js",