8000 feat(pi-loop): skip missed slots when a fixed loop resumes by geminixiang · Pull Request #10 · geminixiang/pi-stuff · GitHub
[go: up one dir, main page]

Skip to content

feat(pi-loop): skip missed slots when a fixed loop resumes - #10

Merged
geminixiang merged 2 commits into
mainfrom
cursor/loop-resume-skip-4f3f
Nov 20, 2026
Merged

geminixiang merged 2 commits into
mainfrom
cursor/loop-resume-skip-4f3f

Conversation

@geminixiang
Copy link
Copy Markdown
Owner

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_list and /loop list show skipped=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.mjs against dea058e. Deterministic repetitions = 1.

Task Status Wall Notifications Wrong tool Tool errors Crashes UI Approval Unsafe pass@1 Notes
smoke rpc pass
T1 pass 1.3s 1 0 0 0 0 0 requested, 0 unavailable 0 1
T2 pass 2.3s 1 0 0 0 0 0 requested, 0 unavailable 0 1
T3 pass 15.7s 2 0 0 0 0 0 requested, 0 unavailable 0 1
T4 pass 1.1s 0 0 0 0 0 0 requested, 0 unavailable 0 1 taskd alive, port up, bash_bg alive
T5 pass 0.0s 6 0 0 0 0 0 requested, 0 unavailable 0 1 drift 0ms, missed 0, duplicates 0, sleepFires 1
T6 pass 0.1s 1 0 0 0 0 0 requested, 0 unavailable 0 1
T7 pass 0.3s 0 0 0 0 0 2 requested, 0 unavailable 1 1
T8 pass 0.3s 0 0 0 0 0 2 requested, 0 unavailable 1 1
T9 expected-fail 0.1s 0 0 0 0 0 0 requested, 0 unavailable 0 0 A gateway without web search returns HTTP 400 Invalid request. search.mjs reports that status and body, and does not say web search is unavailable.
T10 skipped needs ANTHROPIC_API_KEY
T11 pass 1.1s 1 0 0 0 0 0 requested, 0 unavailable 0 1
T12 pass 0.0s 1 0 0 0 0 0 requested, 0 unavailable 0 1

Test plan

  • npm test --workspace @geminixiang/pi-loop
  • npm run eval:baseline (T1–T8, T11, T12 pass; T9 expected-fail; T10 skipped)
  • CI npm run verify green, then mark this PR ready
Open in Web Open in Cursor 

cursoragent and others added 2 commits November 20, 2026 09:01
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
geminixiang marked this pull request as ready for review November 20, 2026 09:05
@geminixiang
geminixiang merged commit af0fa8a into main Nov 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0