Server: collect tombstones past their retention, compact superseded change entries, and refuse cursors from before a collection

This commit is contained in:
jaap-jan committed 2026-10-02 17:18:22 +02:00
1 parent 656a33b4b1
commit 8cb1457ca9
10 files changed
+2438 -2

No files matched your search

+10
View File
@@ -52,6 +52,16 @@ public sealed class Vault
/// <summary>Soft-delete marker.</summary>
public DateTimeOffset? DeletedAtUtc { get; set; }
/// <summary>
/// The highest change-log sequence whose tombstone has been collected from this vault.
/// </summary>
/// <remarks>
/// A cursor below it may have been issued before a deletion this server no longer records, so a pull
/// from it is refused and the client starts over — see <c>TombstoneCollector</c> and ADR 0003. Zero until
/// anything has been collected.
/// </remarks>
public long SyncHorizon { get; set; }
/// <summary>Wrapped vault keys, one per recipient per generation.</summary>
public ICollection<VaultKeyGrant> KeyGrants { get; } = [];