Skip to content

Long computer names no longer end discovery on Windows and Linux hosts - #131

Merged
Johnixr merged 1 commit into
mainfrom
claude/mdns-long-names
Nov 24, 2026
Merged

Johnixr merged 1 commit into
mainfrom
claude/mdns-long-names

Conversation

@Johnixr

@Johnixr Johnixr commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On Windows and Linux hosts, a computer name over 63 bytes (22 Chinese characters), or a long host name with its domain (cloud machines; the dots were dropped, so the labels ran together), panicked mdns-sd's thread. Nothing said so: the computer just couldn't be found on the network.
  • The instance name is cut to 55 bytes at a character boundary, dots as spaces (mdns-sd takes a dot for the end of a label); the host name to its first label. 55 leaves room for the " (2)" / "-2" added when a name is taken. The name people see comes with the session, uncut.
  • Same panic as in remote.yml on macOS runners with long host names.
  • docs/design/remote-hosts.md.

Test plan

  • New test reproduces it on main (assertion failed: utf.len() < 64, the daemon gone) and passes with the fix
  • cargo test in crates/blurt-remote: all pass
  • Found from a phone on a real Windows or Linux computer with such a name

🤖 Generated with Claude Code

@Johnixr
Johnixr merged commit 136fe5f into main Nov 24, 2026
3 checks passed
@Johnixr Johnixr mentioned this pull request Nov 24, 2026
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.

1 participant