Skip to content

Make both WebSocket dials through TelnetNegotiationCore's client - #219

Merged
HarryCordewener merged 2 commits into
mainfrom
claude/project-thread-dzr97t
Nov 16, 2026
Merged

HarryCordewener merged 2 commits into
mainfrom
claude/project-thread-dzr97t

Conversation

@HarryCordewener

@HarryCordewener HarryCordewener commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Requested by Grave · project thread

TelnetNegotiationCore 4.13.6 (HarryCordewener/TelnetNegotiationCore#201) adds TelnetWebSocketClient.ConnectAsync(uri, invoker, configure, bridges). MUIndex had two hand-built ClientWebSockets so it could dial the addresses the scope gate ruled on. Both now hand the library a SocketsHttpHandler whose ConnectCallback dials those addresses, and the library's own retry with no subprotocol goes through it too.

WebSocketProbe (the crawl loop's handshake check):

  • The offer is a TNC client's, in its order: telnet.mudstandards.org, telnet, gmcp., terminal., then json.mudstandards.org, added as a bridge the probe never makes. The plain telnet name is new, and a server that chooses it is recorded as choosing it.
  • One handler per handshake instead of one per attempt. The probe's own retry is gone.
  • The library disposes a socket whose handshake failed, so a DelegatingHandler keeps the last status for the HTTP 400 detail.
  • New test TheRetryWithNoOfferGoesToTheRuledAddressToo: an unresolvable name and a bridge that refuses the offer, so the retry upgrades only if it went through the ruled addresses.

ProbeLine (the probe's WebSocket transport, from #216):

  • OpenWebSocketAsync keeps its invoker and calls the library instead of adding subprotocols itself. The offer is unchanged. New behaviour: after an HTTP error it dials once more with no offer, through the same callback. The remarks no longer say the helper is avoided.
  • AnUpgradeTheServerRefusesIsAFailedDial's fixture now serves that retry, and the test checks two requests, the second offering nothing.

Version: 4.13.5 → 4.13.6, merged over main's bump.

Not built or tested locally: the session cannot get the pinned .NET 11 RC SDK. CI is the check.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rqqt7TMv2mtCTKbjZigQWZ

WebSocketProbe built its own ClientWebSocket so that it could dial the
addresses the scope gate ruled on. TNC 4.13.6 takes the caller's invoker
(TelnetWebSocketClient.ConnectAsync(uri, invoker, configure, bridges)),
so the probe now hands it a SocketsHttpHandler whose ConnectCallback dials
those addresses, and gets the library's retry with no offer instead of
carrying its own.

The offer is now what a TNC client offers, in its order:
telnet.mudstandards.org, telnet, gmcp, terminal, then json, which the
probe adds as a bridge that is never made. A server that chooses the
plain "telnet" name is recorded as choosing it.

The library disposes a socket whose handshake failed, so a delegating
handler keeps the last response status for the "HTTP 400" detail.

TelnetNegotiationCore 4.6.1 -> 4.13.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7TMv2mtCTKbjZigQWZ
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@HarryCordewener HarryCordewener self-assigned this Nov 16, 2026
Takes TelnetNegotiationCore 4.13.6 over main's 4.13.5. ProbeLine now
hands its vetted-address invoker to TelnetWebSocketClient.ConnectAsync
rather than building the socket and the offer itself, so it also gets
the library's retry with no subprotocol after an HTTP error, through
the same ConnectCallback. The refused-upgrade test now serves that
retry and checks it offered nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7TMv2mtCTKbjZigQWZ
@HarryCordewener HarryCordewener changed the title Make the WebSocket handshake through TelnetNegotiationCore's client Make both WebSocket dials through TelnetNegotiationCore's client Nov 16, 2026
@HarryCordewener
HarryCordewener marked this pull request as ready for review November 16, 2026 06:00
@HarryCordewener
HarryCordewener merged commit def7f78 into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants