1 KiB
1 KiB
Smell Ledger — reikhelm
Patterns surfaced by implementers/reviewers. Format: pattern — where found — where fixed — where it remains.
- range() i32 overflow for astronomically large spans — rng.rs
rangedoeslo + self.below(span) as i32; spans ≳2³¹ could overflow. UNREACHABLE in a grid-coordinate generator (spans are tiny). Logged, not fixed — fixing would be over-engineering for the domain. Revisit only if a pass ever needs huge ranges. - Map equality workaround (RESOLVED) — map.rs originally compared maps via serialized-JSON strings because Map wasn't Eq. Fixed at source by deriving PartialEq/Eq on Grid + Map (commit
8c4ef2e). Downstream (T6/T12) should useassert_eq!on Maps, not reinvent the workaround. - Watch in passes: Point/Tile derive Hash — using a HashSet for flood-fill visited membership is fine (determinism only breaks on HashMap/HashSet iteration order). If any pass iterates a HashMap/HashSet to produce output, that's a determinism bug — flag it.