dash scheduler: abort the run at the deadline and wait for it to settle - #61
Merged
Merged
Conversation
…le; comments corrected codexmb, #59 review: Promise.race abandoned a still-running fn, so the test's never-settling first call was alive when the second started and proved nothing about overlap. Now each run gets an AbortController; poll, pollSteer and pollVoice pass its signal into F (which links an outer signal to its own abort timer); at CW_DEADLINE the signal is aborted and the run is awaited until it settles, bounded by CW_SETTLE_GRACE for a fn that ignores its signal. The test's stalled fn honours the signal like a real fetch and the harness asserts the order call1, settle1, call2 and settled == 1; the previous scheduler fails it (settled 0, overlapping calls). Comments corrected: the timers were request waste, not the VTA's 80 C (that was the kiosk drawing to no panel, #60); a hidden tab keeps the loop ticking and skips the fetch, it does not stop polling outright. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
To use Codex here, create an environment for this repo. |
…ap claim corrected codexmb, #61 review: Object.assign({signal:c.signal}, o) let a caller's {signal} (or {signal: undefined}, as when pollVoice is called by hand) replace the linked signal, so F's own timeout never reached the request. Options are now spread first and signal:c.signal set last. New test drives F with a fake fetch: F's own timeout aborts the request with no outer signal and with {signal: undefined}; an aborted outer signal aborts it; the request never receives the outer signal object itself. The previous helper fails the undefined-outer and distinct-signal checks. Comment corrected: runs that honour their signal never overlap; a fn that ignores it is abandoned after CW_SETTLE_GRACE so one hung request cannot stop the loop, and may overlap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
codexmb, #61: F_HARNESS and _fetch_helper_js existed but no test called them; the append had anchored on a file tail an earlier edit removed. Both tests now run and pass by direct invocation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.
Follow-up to #59, which was merged before @codexmb's review landed; this is the commit that answers it (49329c1).
poll,pollSteer,pollVoicepass its signal intoF, which links an outer signal to its own abort timer.CW_DEADLINEthe signal is aborted and the run is awaited until it settles (bounded byCW_SETTLE_GRACEfor a fn that ignores its signal), so two runs of one loop never overlap.tests/test_dash_loop.py: the stalled fn honours the signal like a real fetch; the harness asserts the ordercall1, settle1, call2andsettled == 1. The previous scheduler fails it (settled 0, overlapping calls).🤖 Generated with Claude Code