Cap on disk file size before rotation. 8 MiB β 4β8K events
depending on event variant. Two-file rotation: when current
exceeds this, rename to .old (overwriting any prior .old)
and start fresh. Total worst-case footprint: 2 Γ MAX_DISK_BYTES.
Cap on in-memory ring size. 4096 events is comfortable for
realistic resync windows (~minutes of activity at typical
reducer event rates: 10β50 events per user action). Tunable
upward if forensics in long sessions show truncation; downward
would only be useful if we measured noticeable memory pressure
from this (we donβt β Event is small and there are 4096 of them).
Extract the version field from any Event variant. Mirrors
reducer.rs::extract_version (which is test-only; the prod code
path needs its own copy here). When a new variant is added that
carries a version, add it here too β the unreachable arm catches
future-variant compile errors.