Repository navigation
0.4.1 — peer reachability, and a public SymPeerInfo initialiser - #10
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.