Skip to content

Release 0.1.2: deadlines for latest calls, SEAM1403 and poll - #2

Merged
Shogo256 merged 2 commits into
mainfrom
release-0.1.2
Nov 14, 2026
Merged

Shogo256 merged 2 commits into
mainfrom
release-0.1.2

Conversation

@Shogo256

@Shogo256 Shogo256 commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Deadlines, polling and a check for requests that outlive their call, found by CS Pro's chat widget (the first production app). Details in CHANGELOG.md and DECISIONS.md ("Deadlines, polling and fetch signals").

  • f.within(ms)(...args): a latest call with a deadline. Out of time, it aborts its signal and resolves to Timeout; Stale still wins if a newer call started.
  • SEAM1403: a fetch in a latest function that does not take the function's signal, with a quick fix.
  • poll(read, { every, maxEvery?, onResult }) in @seamscript/runtime: one read at a time, backoff after failures, paused while the page is hidden.
  • All packages to 0.1.2.

yarn test passes (runtime 193, compiler 170, and the rest).

…t drops its signal, and add poll

A latest line gets within(ms): a call that has not settled in time aborts its signal and resolves to Timeout, or to Stale if a newer call started, so the latest-wins rule still holds. SEAM1403 reports a fetch in a latest function's body that does not take the function's signal, which kept running after the call was dropped. poll reads one at a time, backs off after failures and pauses while the page is hidden. All three were found by CS Pro's chat widget, which raced fetch against setTimeout by hand.
@Shogo256
Shogo256 merged commit d8c0d4e into main Nov 14, 2026
12 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