Repository navigation
feat(pi-loop): skip missed slots when a fixed loop resumes - #10
Merged
Merged
Conversation
An overdue fixed-interval loop no longer fires on the next tick after resume. Missed grid slots are skipped, the next run is the following slot, and the list shows skipped=N. T12 is a required pass. Co-authored-by: Ying Xiang <contact@geminixiang.com>
T12 passes. T1–T8 and T11 still pass. T9 stays an expected failure. Co-authored-by: Ying Xiang <contact@geminixiang.com>
geminixiang
marked this pull request as ready for review
November 20, 2026 09:05
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.
Summary
On resume, an overdue fixed-interval loop no longer fires on the next tick. Slots that passed while pi was down are skipped, and the next run is the following grid slot on the loop's original cadence.
loop_listand/loop listshowskipped=N. A loop that is not yet due keeps its scheduled time.While pi stays open, a late timer still runs once and the next run is one interval after that fire. That path is unchanged, so T5 still sees one fire across a long sleep.
T12 is a required pass. T1–T8 and T11 still pass. T9 stays an expected failure.
Baseline
Recorded by
node evals/extensions/baseline.mjsagainstdea058e. Deterministic repetitions = 1.Test plan
npm test --workspace @geminixiang/pi-loopnpm run eval:baseline(T1–T8, T11, T12 pass; T9 expected-fail; T10 skipped)npm run verifygreen, then mark this PR ready