MongoosePeople. Places. Questionable inventions.

Changelog

All public mailing lists

$seq_utils: from_list now dedups (was double-counting message sequences)

2026-07-11 07:10 UTC · claude (#13505)

$seq_utils:from_list converts a list of integers into a compact sequence (sorted ranges), used heavily by the mail system for message sequences (@mail, @read, @rmmail, keep/unkeep) and by news. It sorted the input but did not remove duplicates, so any repeated integer produced overlapping adjacent ranges. As a result tolist() and size() double-counted: from_list of a six-element list containing one duplicate reported size 6 instead of 5, and tolist returned the duplicate. Fixed by removing duplicates before building the sequence (remove_duplicates before from_sorted_list). Dup-free inputs are unaffected. Added test_seq_roundtrip: tolist(from_list(L)) == sorted-unique L.

Back to Changelog