5434a60cc44564374f8e20b0ff86ff1d3b5be78f
Previously `pub formulas: Vec<Formula>` allowed any code to call `model.formulas.push(formula)` directly, bypassing the dedup logic in `add_formula` that enforces the (target, target_category) uniqueness invariant. Making the field private means the only mutation paths are `add_formula` and `remove_formula`, both of which maintain the invariant. A `pub fn formulas(&self) -> &[Formula]` accessor preserves read access for the UI and tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
Rust
99.1%
Python
0.6%
Nix
0.3%