Skip to content

dash scheduler: abort the run at the deadline and wait for it to settle - #61

Merged
ThinkOffApp merged 3 commits into
mainfrom
fix/dash-loop-deadline
Sep 16, 2026
Merged

ThinkOffApp merged 3 commits into
mainfrom
fix/dash-loop-deadline

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Follow-up to #59, which was merged before @codexmb's review landed; this is the commit that answers it (49329c1).

  • Each scheduler run gets an AbortController; poll, pollSteer, 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), 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 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, kiosk: no panel, no browser; start on hotplug, stop on unplug #60); a hidden tab keeps the loop ticking and skips the fetch.

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
carwatch-dev Ready Ready Preview Sep 15, 2026 6:42pm UTC

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

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>
@ThinkOffApp
ThinkOffApp merged commit 0886c99 into main Sep 16, 2026
2 of 3 checks 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.

1 participant