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
kinddiscriminator (per-structure verb) inside thechange: Tslot — 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§
- Base
Change - Universal change envelope (DS-14 PART 4).
Enums§
- Delete
Reason - Reason a map key was deleted — tracked in mutation log for audit.
- Index
Change - Delta payload for
crate::ReactiveIndexmutations. - Lifecycle
- Cross-scope replay-boundary discriminant.
- List
Change - Delta payload for
crate::ReactiveListmutations. - LogChange
- Delta payload for
crate::ReactiveLogmutations. - MapChange
- Delta payload for
crate::ReactiveMapmutations. - Version
- Monotonic identity field for
BaseChange::version. V0 is a counter (u64); V1+ is a content-id (CID string). The TS impl usesnumber | string; this enum is#[serde(untagged)]so the wire format is identical — bare number forCounter, bare string forCid. Mixed-type sequences across versions are user-resolved per spec.