mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? <!-- Describe what has changed in this PR --> Refactored and normalized protobuf duration validation. Added additional validation for durations with mismatched signs. Removed `timer.validation.ValidateAndCapTimer` and will instead rely on task dropping logic in mutable state for long duration timers. ## Why? <!-- Tell your future self why have you made these changes --> Durations with mismatched signs can be converted to Golang durations but they cannot be serialized to a single string which causes an error when trying to view histories with these durations. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> Existing tests ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> Low risk that this additional validation rejects durations which were previously accepted and processed without issue. It is our assumption that temporal created SDKs are not sending these invalid durations. The error when viewing history has only been reported by one customer using a custom Haskell SDK.