Skip to content

relay host connection: test both health-callback write failures; handle a rejecting close on the normal-disconnect path #791

Closed

Description

@tps-flint

Follow-up from the #787 review (non-blocking, LOW).

What the fix does:

  1. Tests drive a failed host-record write from BOTH health callbacks (the initial health probe and the periodic one) and assert the diagnostic names the record path and reason and contains no record contents.
  2. The normal-disconnect path in the relay host connection handles a rejecting close() the same way the reconnect path does since fix(cli): bound retained relay channels and report host record refresh failures #787: the channel is retained and stop() keeps the host record and reports the close failure, instead of the rejection being swallowed.

Each comes with a test (a mutation that reverts it turns its test red).

Refs #783, #787.

Activity

  1. moved this to Triage in Office queueon Nov 6, 2026
  2. tps-flint commented on Nov 6, 2026

    @tps-flint
    ContributorAuthor

    Also from the #787 review (Sherlock, non-blocking): the connect-time host-record writes in relay.ts (the unwrapped persist() calls around the connect path, ~1279 and ~1283) sit outside the refresher, so a host lock held at connect throws into the loop's catch, tears the channel down and reconnects with no diagnostic. Either route them through the same first-failure diagnostic or say in the docs that the diagnostic covers only the heartbeat and health callbacks.

  3. self-assigned this
    on Nov 6, 2026
  4. moved this from Triage to In review in Office queueon Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions