pub struct Tombstone {
pub id: String,
pub deleted_at: DateTime<Utc>,
pub author: Option<AuthorStamp>,
}Expand description
A deletion, carried so a re-import can propagate it.
Import is otherwise additive: without this, deleting a vertex at the source and re-exporting leaves the deleted record alive at the destination forever, and the two stores silently diverge.
§Which planes can be tombstoned
Vertices and edges only. Those are the mutable graph planes — a vertex is a current-state record and deleting one is a normal operation.
Observations are append-only by design: an observation is a claim that something was seen at a time, and un-saying it would break the audit trail the format exists to carry. Evidence and beliefs are likewise not tombstoned here — evidence is the justification other records cite (deleting it would strand them, and the closure checker would rightly call the file broken), and beliefs are derived state that a re-materialisation regenerates. If retraction is ever needed on those planes it should be a RETRACTION record carrying a reason, not a delete — a different feature with different semantics.
§Conflict rules
- Tombstone for an id that does not exist locally → no-op, not an error. Imports are meant to converge from any starting point, and a file may legitimately carry a deletion the destination never saw the creation of.
- A live record NEWER than the tombstone → the record wins, the
delete is ignored.
deleted_atis compared against the live record’s last-write time; a stale tombstone must not resurrect a deletion that a later write already undid. This is last-write-wins on the same clock the rest of the store already uses. - Ties (equal timestamps) → the tombstone wins, so a delete is not lost to clock granularity.
Fields§
§id: StringId of the deleted record, in its own plane’s namespace.
deleted_at: DateTime<Utc>When the deletion happened at the source. Drives the last-write-wins comparison above.
Who deleted it, when the source knows. Advisory — carried for the audit trail, never used to decide the conflict.