fix: harden note-program model against corrupt tempo/division/denomination records

Reject subnormal BPM that overflows to NaN, normalize Division equality, pin a single out-of-range-denomination interpretation across all readers, flag collapsed capture windows, add offset off-view editors and structural static_asserts, collapse duplicated CLAUDE.md facts.
This commit is contained in:
2026-07-30 20:11:06 -04:00
parent 834a6ddcc7
commit d923b352ae
10 changed files with 175 additions and 36 deletions
+3
View File
@@ -41,6 +41,9 @@ static void testUnusableBpmIsRejected() {
CHECK(!Tempo::fromBpm(-120.0).has_value());
CHECK(!Tempo::fromBpm(std::numeric_limits<double>::quiet_NaN()).has_value());
CHECK(!Tempo::fromBpm(std::numeric_limits<double>::infinity()).has_value());
// Finite, positive, subnormal — but 60/bpm overflows to +inf, which turns
// beatsToSeconds(0) into NaN downstream if let through.
CHECK(!Tempo::fromBpm(1e-310).has_value());
}
// --- Conversions ---------------------------------------------------------------