InferenceError gains MismatchedShape (user-input length mismatches), InvalidProbability (p_draw out of [0, 1]), and ConvergenceFailed (exceeded max_iter without hitting epsilon). NegativePrecision stays. History::add_events_with_prior and History::add_events now return Result<(), InferenceError>. The previous assert! macros checking composition/results/times/weights shape are replaced by matched error returns. Internal debug_assert! macros for arithmetic invariants stay; this change only affects boundary validation of user input. Tests updated to call .unwrap() on the Result. The old signatures will be fully replaced in Task 15 (typed add_events(iter)) and the nested-Vec wrapper removed in Task 20. Part of T2 of docs/superpowers/specs/2026-04-23-trueskill-engine-redesign-design.md.
6.1 KiB
6.1 KiB