Skip to content

0.4.1 — peer reachability, and a public SymPeerInfo initialiser - #10

Merged
sym-bot merged 3 commits into
mainfrom
feat/peer-reachability
Aug 14, 2026
Merged

sym-bot merged 3 commits into
mainfrom
feat/peer-reachability

Conversation

@sym-bot

@sym-bot sym-bot commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Exposes how a peer is reachable (a SET, per MMP §4.6 — a peer may hold LAN and relay at once) so an app can label the network without gating capability. Also makes SymPeerInfo's init public: it was internal, so consumers could receive the struct but never construct one, leaving peer-facing views untestable. 91 tests green.

sym-bot and others added 3 commits August 14, 2026 07:16
Founder, 2026-08-14: "both can be mesh, but network should be different."
Capability parity stays — coupling, presence and harmonizing behave
identically however a peer arrived — while an app can now SHOW where a
peer is reachable from.

The node already tracked this: PeerState.transports is keyed by source
("bonjour" for LAN, the relay otherwise). It simply never left the SDK,
which is why an app could not have leaked it by accident.

reachability is a SET, not a mode, and that is the load-bearing decision.
MMP §4.6 says a peer MAY hold multiple transports at once: someone on your
Wi-Fi who is also relay-connected is genuinely both. The node prefers
Bonjour when both exist, but that is a routing choice, not a fact about the
peer — a two-state field would have to pick one and misreport the common
case. It is read from the transports a peer currently holds rather than
from how it was first discovered, so a peer that gains a relay path after
joining on LAN is both, and stays both until a transport closes.

91 tests green, including three pinning the set shape and the raw values
(which cross into app code, so renaming one is a contract change).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAajRacD4UoeG1F8cQRSqr
A public struct whose memberwise init is internal cannot be constructed by
a consumer — so an app could receive a SymPeerInfo and never build one,
which left every peer-facing view untestable and unpreviewable. Found while
writing MeloTune's peer-classification tests, which had to be rewritten
against a different surface to get around it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EAajRacD4UoeG1F8cQRSqr
@sym-bot
sym-bot merged commit 982bbc5 into main Aug 14, 2026
1 check passed
@sym-bot
sym-bot deleted the feat/peer-reachability branch August 14, 2026 06:25
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