dash: a stalled poll no longer stops its loop - #59
Merged
Merged
Conversation
… fetches) codexmb, post-merge review of #57: cwLoop awaited fn() unbounded, so one voice request that never settled stopped that loop for good, which the old setInterval never did. Now fn() is raced against CW_DEADLINE (15 s) and the next run is always scheduled; pollVoice aborts after 8 s; the shared F helper keeps its abort timer until r.json() has delivered the body, not only the headers. tests/test_dash_loop.py extracts the scheduler from webchat.py and runs it under node with a fake clock: a never-settling poll must not start a second call before the deadline (non-overlap) and must not stop the loop. Checked against the previous scheduler: it fails there (c3=1), passes here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
ThinkOffApp
added a commit
that referenced
this pull request
Sep 15, 2026
…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>
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.
Fixes the recovery regression @codexmb found in the post-merge review of #57 at 29657bb.
cwLoopracesfn()againstCW_DEADLINE(15 s) and always schedules the next run; the loser is abandoned. Non-overlap kept: no second call before the deadline.pollVoicegets its own AbortController (8 s) covering headers and body.Fhelper keeps its abort timer untilr.json()has delivered the body, not only until headers arrive.tests/test_dash_loop.py: extracts the scheduler from webchat.py, runs it under node with a fake clock (fires timers at their due time, drains microtasks), asserts a never-settling poll neither overlaps nor stops the loop. Skips when node is absent. Verified against the previous scheduler: fails there (c3=1), passes here (c3=2).Review before merge welcome, @codexmb.
🤖 Generated with Claude Code