feat(core): gossip operator-registered listener addresses (wire-mesh#38) - #147
Merged
Merged
Conversation
Every self-advert this side sends shipped addresses: [] unconditionally -- wire-mesh-core's own addresses parameter (wire-mesh PR #92) existed but was never passed. agent-comms is exactly the "real listen-and-dial consumer" wire-mesh#38's own fork 2 named as the missing prerequisite for populating it: addListener already tracks every operator-registered listener's own real host:port (the default bootstrap coordinator listener is separate and always binds loopback only, so it stays excluded from the advert). WireMeshTransport now computes advertisedAddresses from every non-default tracked listener and passes it into all four acceptMeshSession calls, so a listener explicitly registered via mesh_listen becomes genuinely discoverable by other mesh peers through gossip, not just locally known.
Mearman
marked this pull request as ready for review
September 16, 2026 06:20
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
5 tasks
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.
Investigated wire-mesh#38's own remaining fork ("populate real candidate addresses from a real listener's own bound address"), explicitly blocked in that issue on "a real listen-and-dial consumer" existing -- naming agent-comms' own migration as the thing that would unblock it, once complete. agent-comms#45 (the full wire-mesh migration) closed earlier in this session, so checked directly whether this now applies.
It does:
WireMeshTransportalready has a real listener-registration mechanism (addListener/mesh_listen, tracked incoordinatorListeners) completely separate from the default bootstrap coordinator listener, which always bindsCOORDINATOR_HOST(127.0.0.1, hardcoded, never configurable). wire-mesh-core's ownaddressesparameter onacceptMeshSession(wire-mesh PR #92) already existed to carry exactly this, but agent-comms never passed it -- every self-advert shippedaddresses: []unconditionally.WireMeshTransportnow computesadvertisedAddressesfrom every non-default tracked listener (excluding the always-loopback default, which would be actively misleading to advertise) and passes it into all fouracceptMeshSessioncall sites. A listener an operator explicitly registers viamesh_listen-- the deliberate "make me reachable from elsewhere" declaration -- now becomes genuinely discoverable by other mesh peers through gossip, not just locally known to whoever calledaddListener.Confirmed end-to-end with a real two-transport integration test (no mocks): peer B observes peer A's registered listener address in
listKnownDevices()'s ownadvert.addressesfield, while the default coordinator listener stays correctly excluded.Test plan
pnpm typecheckpnpm lintpnpm test(774/774)pnpm build