pub fn verify_compaction(
item_id: &str,
original_events: &[Event],
snapshot_event: &Event,
) -> Result<bool>Expand description
Verify that compacted state matches uncompacted state.
Replays original events to produce a WorkItemState, then reconstructs
a WorkItemState from the snapshot event’s payload and compares them
field by field.
§Returns
Ok(true) if the states match, Ok(false) if they diverge,
or Err if the snapshot event cannot be parsed.
§Errors
Returns an error if the snapshot event cannot be deserialized into a
SnapshotPayload.