Repository navigation
Conversation
…d timer Node fires a setTimeout longer than 2^31 - 1 ms almost at once, and budget * 4 can overflow to Infinity, which reads as unbounded. Timer delays are now clamped, so a huge finite budget keeps a real ceiling. markProgress latched the local-only phase and reported a suppression even when nothing was armed: with an opt-out budget (0 or Infinity), after the watchdog fired, or after an owner cancel. The caller then recorded a "watchdog suppressed" event for a suppression that never happened. It now latches only while a primary timer could still fire. Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No change for any valid budget. Two edge cases in the run watchdog (
createAttemptWatchdog) are fixed.Timer delays are now clamped to the 2^31 - 1 ms limit that Node's
setTimeoutaccepts. A longer delay fires almost at once, andbudget * 4for the local-only ceiling could overflow toInfinity, which reads as "unbounded", so a huge finite budget lost its ceiling.markProgressreported a suppression, and the caller wrote a "watchdog suppressed" spine event and progress message, even when no timer was armed: with a0orInfinitybudget, after the watchdog fired, or after an owner cancel. It now latches only while a primary timer could still fire.Proof: seven tests in
run-executor-watchdog-limits.test.ts. Six failed on main (both clamp cases, both opt-out budgets, fire-then-boundary, cancel-then-boundary) and pass now; one control (an armed watchdog latches once) passes on both. The existing watchdog and run-history tests pass.The non-required "mutate changed production files" job cannot sample
scheduler/run-executor.tsbecause 12 test files import it, so it fails for any change to that file beyond a trivial one.Assisted-by: AI