Repository navigation
fix(scheduled): avoid serial waits for task startup - #824
Merged
Merged
Conversation
Keep one slow prompt setup from consuming another due task's admission window. Track in-flight ownership per task and host without moving authoritative scheduling or overlap checks out of the Host.
# Conflicts: # docs/spec/03-runtime/06-host-rpc-protocol.md # docs/spec/06-delivery/04-e2e-test-plan.md # docs/zh-CN/spec/03-runtime/06-host-rpc-protocol.md # docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
This was referenced Sep 21, 2026
Owner
|
Landing note: this branch conflicted with the sibling scheduled-task PRs (#820-#824) that landed just before it. I merged the updated |
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.
One due task waiting for prompt setup holds up the remaining tasks in the polling loop. Another task can miss its execution window even though it was already due when the poll started.
Start independent due tasks without waiting for another task's setup. Keep each task's in-flight ownership tied to its Host instance so repeated polls and late completion from a replaced Host cannot duplicate startup. The Host continues to enforce enabled, due and overlap checks.
Before and after — actual Windows desktop run history (1200 × 800). A real Host test holds the production runner's first prompt setup. The desktop is reopened to inspect its saved ledger: one admitted run before, two after. Both captures show Interrupted because the test deliberately stops the Host before reopening it.
Before:
After:
The regression fails with the serial runner and passes with independent dispatch. Tests also cover Host replacement, shutdown and observable startup failures.
Validation details
0111e306cand the corresponding fix; focused checks were rerun after refreshing the candidates to46d4ee4ee.