pub const MAX_KV_COUNT: u64 = 100_000;
Hard caps so a corrupt header cannot trigger huge allocations.