Repository navigation
Test that a burst of 250 due schedules fires within ceil(N/100) passes (#959) - #996
Merged
Merged
Conversation
#959) The schedules guide documents native Server's bound from source: up to 100 due schedules per pass, in next_fire_at order. Make 250 schedules due together, in the reverse of creation order, and show each pass fires exactly the next 100 in due order, the burst needs 3 passes, a further pass fires nothing, and each schedule triggers once at its own stored occurrence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Member
Author
|
Tier C receipt. Hosted checks are terminal at exact head |
rmcdaniel
marked this pull request as ready for review
November 3, 2026 18:38
This was referenced Nov 3, 2026
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.



Review tier C: test only. It adds one crate-internal test module and changes no runtime code.
Fixes #959.
The schedules guide (durable-workflow.github.io#421) says native Server starts up to 100 due schedules per pass, ordered by
next_fire_at. A burst ofNtherefore fires withinceil(N / 100)passes, in due order. That was derived from source and had no test.Test
runtime::schedule_burst_testsis a new#[cfg(test)]module on SQLite. It is separate fromschedule_execution's tests so it doesn't collide with #995. One pass is onefire_due_schedulescall, as one maintenance tick makes.next_fire_atvalues, in the reverse of creation order, so ordering byidwould give a different sequence.next_fire_atorder: 100, then 100, then 50. The burst needs exactly 3 passes, which isceil(250/100).fires_count = 1, there are 250 runs, and each schedule has exactly oneScheduleTriggeredevent, at its own stored occurrence.The bound matches the guide, so no code or docs change is needed.
Counterfactuals, applied to
fire_due_scheduleslocally: ordering the due batch byid, or batches of 50, each fail the test. The test passes in about 0.7 s on lab2 with 1.99.0 and-j2.🤖 Generated with Claude Code