Coordinate one Scheduled Reopen

Open
#415 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
networking

Research direction

Read parent issue #412 and blocker #413 first to understand the recovery lifecycle and existing scheduling behavior. Then identify the Transport loss and Connection attempt entry points and add deterministic timing tests for scheduling, repeated requests, failure, success, and stale callbacks. Done means all listed acceptance criteria hold without duplicate schedules or lifecycle events.

Written by the indexing model from the issue text.

Description

ready-for-agent

Parent

#412

What to build

Give unexpected Transport loss one coordinated delayed Reopen. Recovery requests share the existing schedule without postponing it, and each recovery attempt has a clear success or failure outcome.

Acceptance criteria

  • Unexpected loss of the currently owned Transport schedules exactly one delayed Reopen.
  • Repeated delayed-recovery requests share the existing schedule and do not reset its deadline.
  • A scheduled Reopen is consumed before its Connection attempt begins; Scheduled Reopen and active attempt never coexist.
  • A failed recovery attempt creates exactly one fresh Scheduled Reopen at the configured fixed delay.
  • Successful recovery leaves no pending schedule and retains the established Transport.
  • Stale or duplicate Transport callbacks cannot create recovery intent or duplicate timers.
  • Recovery lifecycle events occur once per authoritative attempt and joined recovery requests do not multiply them.
  • Deterministic timing tests cover scheduling, repeated requests, failure, success, and stale callbacks.

Blocked by

  • #413
Dominant language
TypeScript
Stars
146
Forks
101
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.js.SDK

All issues in RocketChat/Rocket.Chat.js.SDK

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.