The fake transport can't lie about being open, so the dead-pipe case is untestable

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
testing

Research direction

Start in test/fakeTransport.ts, then read the liveness and connection specs in lib/drivers/tests/ddp.liveness.spec.ts and lib/drivers/tests/ddp.connection.spec.ts. Run those tests to understand the current cooperating fake and verify the new mode keeps readyState OPEN, lets send succeed, and produces no responses so alive(), connected, and probe exercise the silent-socket case.

Written by the indexing model from the issue text.

Description

ready-for-agent

Where: test/fakeTransport.ts, lib/drivers/__tests__/ddp.connection.spec.ts, lib/drivers/__tests__/ddp.liveness.spec.ts.

Problem

The suite records this gap itself: readyState is written by the test, so "a real socket reporting OPEN over a dead pipe is unreachable through this seam."

That dead-pipe case is the entire reason Probe and the alive window exist. CONTEXT.md states it as the layer's central claim — a Socket the server has stopped answering still reads as open to the transport — and it is the one claim the tests cannot produce. Today the Liveness chain is exercised against a cooperating fake with hand-written state.

Fix

A fake transport mode where readyState stays OPEN and send succeeds while nothing ever comes back. Then the Liveness chain, alive(), connected and probe run against a genuinely silent socket instead of an obliging one.

Test infrastructure only, no production surface.

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.