Skip to content

dash: a stalled poll no longer stops its loop - #59

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/dash-loop-deadline
Sep 15, 2026
Merged

ThinkOffApp merged 1 commit into
mainfrom
fix/dash-loop-deadline

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Fixes the recovery regression @codexmb found in the post-merge review of #57 at 29657bb.

  • cwLoop races fn() against CW_DEADLINE (15 s) and always schedules the next run; the loser is abandoned. Non-overlap kept: no second call before the deadline.
  • pollVoice gets its own AbortController (8 s) covering headers and body.
  • The shared F helper keeps its abort timer until r.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

… 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>
@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 5:31pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T17:35:01.027462Z b9eab04 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: b9eab04bae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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
ThinkOffApp merged commit ee783fc into main Sep 15, 2026
2 of 3 checks passed
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>
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