mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-12 00:44:27 -06:00
New parts, lists and comments took "largest id + 1": after an id of u32::MAX (a .json model or a .docx can carry one) that overflowed, a panic in debug builds and a wrap to 0 in release, and list.define's saturating_add reused the taken id. free_id gives one past the largest, or the lowest free id once that would overflow; try_add_part, try_add_list and try_add_levels report ids running out and add nothing, and the commands that add parts and lists use them. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>