Bitcoin Core rejects negative and NaN timeouts from mining clients that could abort a debug node
Bitcoin Core's mining interface lets an external process, such as a Stratum v2 template provider, ask the node over IPC to wait until the chain tip changes or a better block template is available. Both calls take a timeout. Pull request #36940, by enochaz and merged on 2 December, deals with what happens when that timeout is nonsense.
The code assumed it never would be. waitTipChanged contained an Assume stating that the timeout is not negative, with a comment that no internal caller should use one. But an IPC client is not an internal caller and can send any value. On debug builds the author reproduced the failure with a timeout of -1.0: the check fails and the node aborts.

Release builds skip that check, and the behaviour there depends on the value. Negative timeouts were clamped to zero. NaN was not, because every comparison with NaN is false, so it slipped through the clamp and became the deadline passed to the wait. The second call, waitNext, has no such Assume and did not check its timeout either; there a NaN made it wait one extra fee tick, about a second, before returning.
After the change both methods throw an error for negative or NaN timeouts. The internal Assume remains, so internal callers are still checked. The interface documentation lists the new errors, and the functional test covers rejection of negative and NaN values and acceptance of positive infinity in both methods.
The author says he knows of no client that sends such values and gives sv2-tp, which requires an interval of at least one second, as an example. The change is hardening against bad input from IPC clients, similar to an earlier pull request, #36520, that did the same for invalid arguments to the Chain interface.