You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
relay host connection: test both health-callback write failures; handle a rejecting close on the normal-disconnect path #791
Follow-up from the #787 review (non-blocking, LOW).
What the fix does:
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.
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).
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.
Activity
tps-flint commentedon Nov 6, 2026
Also from the #787 review (Sherlock, non-blocking): the connect-time host-record writes in
relay.ts(the unwrappedpersist()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.