You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tempo.TryParse("NaNbpm@1/4") throws instead of returning false, and zero/negative/infinite beats are accepted, so Seconds() returns Infinity or negative time #305
Priority: Medium. TryParse throws on untrusted input ("NaNbpm@1/4"), which breaks the Try-pattern contract. It also accepts zero, negative and infinite values that produce Infinity or negative Seconds.
Area / suggested assignee:Semantics.Music/Tempo.cs, and possibly Duration validation. @matt-edmondson.
Duplicates: None found.
In progress: No open PR covers it.
Notes: This is a small validation fix, and the issue already gives a test table. Check Duration.TryParse accepting 0/4 and -1/4 separately: other Duration consumers may have the same exposure.
Activity
matt-edmondson commentedon Sep 28, 2026
Triage
TryParsethrows on untrusted input ("NaNbpm@1/4"), which breaks the Try-pattern contract. It also accepts zero, negative and infinite values that produce Infinity or negativeSeconds.Semantics.Music/Tempo.cs, and possiblyDurationvalidation. @matt-edmondson.Duration.TryParseaccepting0/4and-1/4separately: otherDurationconsumers may have the same exposure.Generated by Claude Code