Skip to content

fix(client): start ring state polling after 9s instead of 15s - #2492

Merged
oliverlaz merged 1 commit into
mainfrom
oliverlazoroski/vid-1444-ring-poll-start-after-9s
Oct 5, 2026
Merged

oliverlaz merged 1 commit into
mainfrom
oliverlazoroski/vid-1444-ring-poll-start-after-9s

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

💡 Overview

Lowers the default quiet period before RingStatePoller starts polling the ring state from 15s to 9s. In a 30s ring window, a caller that missed call.accepted/call.rejected/call.missed now gets an answer sooner, with polls at about 9/14/19/24/29s instead of 15/20/25/30s.

📝 Implementation notes

  • RingStatePollingOptions.startAfterMs JSDoc and the test constant updated to match. Can still be overridden through startAfterMs.

🎫 Ticket: https://linear.app/stream/issue/VID-1444

Summary by CodeRabbit

  • Updates
    • Ring-state polling now starts after 9 seconds by default, down from 15 seconds. Custom polling delays are unchanged.

@oliverlaz oliverlaz added the backport-v1 PRs that need to be backported to the `release-v1` branch label Oct 5, 2026
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c743aa0-40b1-41f7-bd97-3475905b9c80
📥 Commits

Reviewing files that changed from the base of the PR and between 8e50b46 and 4b1a28f.

📒 Files selected for processing (3)
  • packages/client/src/coordinator/connection/types.ts
  • packages/client/src/ringing/RingStatePoller.ts
  • packages/client/src/ringing/__tests__/RingStatePoller.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The default delay before RingStatePoller starts polling changes from 15,000 ms to 9,000 ms. The documentation and test timing are updated. Explicitly supplied delays remain unchanged.

Changes

Ring-state polling delay

Layer / File(s) Summary
Update the default polling delay
packages/client/src/coordinator/connection/types.ts, packages/client/src/ringing/RingStatePoller.ts, packages/client/src/ringing/__tests__/RingStatePoller.test.ts
The documented default, poller default, and test timing change from 15,000 ms to 9,000 ms. Explicitly supplied delays remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 4b1a2

The updated default is covered by a test that exercises the poller without options; no concrete issue remains that should block merging.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 4b1a2

The earlier polling uses the same caller eligibility checks, call scope, and configurable options. No new access or privilege expansion was identified. Some uncertainty remains around responses arriving during cancellation or after the ring deadline.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed default affects clients using automatic polling without an explicit delay. It increases opportunities to read an already selected call session, rather than introducing a new request target or identity input. Server-side authorization was not assessed.

Trust Boundaries and Controls

  • observed — Polling requires a ringing call with a session, captures that session once, suppresses overlapping poll requests, and stops on terminal calling states. Responses arriving after stop are ignored. CallState checks the response session identifier before replacing session outcome fields.

Resilience and Maintainability Implications

  • observed — Pre-existing cancellation and freshness limitations remain: pause clears timers without invalidating an in-flight response, and successful responses check stopped but not the deadline before updating state. Leave pauses polling before asynchronous teardown and stops it on completion. Terminal-state stopping provides counterevidence against ordinary late completions, but does not establish ordering during teardown. The inspected comparison shows no change to these controls.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely states the main change: the default ring-state polling delay changes from 15 seconds to 9 seconds.
Description check ✅ Passed The description includes the overview, implementation notes, and ticket required by the template. It does not include the Docs line, but the description is otherwise complete and relevant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Bundle size

Built package output. Sizes in KB; delta vs main@8e50b46.

No significant package size increase vs main.

@oliverlaz
oliverlaz merged commit f5cdb62 into main Oct 5, 2026
18 of 20 checks passed
@oliverlaz
oliverlaz deleted the oliverlazoroski/vid-1444-ring-poll-start-after-9s branch October 5, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v1 PRs that need to be backported to the `release-v1` branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants