Skip to main content

Module changeset

Module changeset 

Source
Expand description

Universal change envelope (Phase 14 — DS-14 locked 2026-05-05; M4.A 2026-05-10).

Mirrors the TS impl at packages/pure-ts/src/extra/data-structures/change.ts. Every reactive structure’s delta log emits records conforming to BaseChange<T>; storage WAL frames (crate consumer graphrefly-storage::wal::WALFrame<T>) and worker-bridge wire frames both carry the same envelope.

Two-level discriminant:

  • Envelope-level Lifecycle (spec / data / ownership) for cross-scope replay-boundary safety (DS-14 PART 4).
  • Payload-level kind discriminator (per-structure verb) inside the change: T slot — porting of the per-structure payload unions (MapChangePayload, ListChangePayload, etc.) lands with M5 reactive-structure ports.

The serde-support feature gates Serialize / Deserialize derives. Storage / bridge consumers enable it; in-process structure consumers can skip the codec footprint.

Structs§

BaseChange
Universal change envelope (DS-14 PART 4).

Enums§

DeleteReason
Reason a map key was deleted — tracked in mutation log for audit.
IndexChange
Delta payload for crate::ReactiveIndex mutations.
Lifecycle
Cross-scope replay-boundary discriminant.
ListChange
Delta payload for crate::ReactiveList mutations.
LogChange
Delta payload for crate::ReactiveLog mutations.
MapChange
Delta payload for crate::ReactiveMap mutations.
Version
Monotonic identity field for BaseChange::version. V0 is a counter (u64); V1+ is a content-id (CID string). The TS impl uses number | string; this enum is #[serde(untagged)] so the wire format is identical — bare number for Counter, bare string for Cid. Mixed-type sequences across versions are user-resolved per spec.