Hub-side machinery: unwrap incoming LogEntries into real entities so
aggregate queries and the dashboard see Tasks/StatusChanges/etc.
(spec §Sync, hub leg).
Bucketed set-hashing for the hub sync leg (spec: “Merkle-style
comparison is a later optimization” — this is it). Event ids are grouped
by their 2-hex prefix (the same sharding as the events ref) and each
bucket is summarized as the SHA-256 of its sorted ids. Equal hash ⇒
identical bucket ⇒ skip; differing buckets are enumerated id-by-id.
Both the CLI and the hub compute this identically.
Binaries that receive levi entities over the wire (the hub) must call
this: without any referenced symbol from this crate, the linker drops its
object files — including the inventory registrations for entities,
commands, and sagas.