Skip to content

feat(core): gossip operator-registered listener addresses (wire-mesh#38) - #147

Merged
Mearman merged 1 commit into
mainfrom
feat/gossip-listener-addresses
Sep 16, 2026
Merged

Mearman merged 1 commit into
mainfrom
feat/gossip-listener-addresses

Conversation

@Mearman

@Mearman Mearman commented Sep 16, 2026

Copy link
Copy Markdown
Member

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: WireMeshTransport already has a real listener-registration mechanism (addListener/mesh_listen, tracked in coordinatorListeners) completely separate from the default bootstrap coordinator listener, which always binds COORDINATOR_HOST (127.0.0.1, hardcoded, never configurable). wire-mesh-core's own addresses parameter on acceptMeshSession (wire-mesh PR #92) already existed to carry exactly this, but agent-comms never passed it -- every self-advert shipped addresses: [] unconditionally.

WireMeshTransport now computes advertisedAddresses from every non-default tracked listener (excluding the always-loopback default, which would be actively misleading to advertise) and passes it into all four acceptMeshSession call sites. A listener an operator explicitly registers via mesh_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 called addListener.

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 own advert.addresses field, while the default coordinator listener stays correctly excluded.

Test plan

  • New RED tests confirmed failing for the right reason before implementation
  • pnpm typecheck
  • pnpm lint
  • pnpm test (774/774)
  • pnpm build

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
Mearman marked this pull request as ready for review September 16, 2026 06:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-16T06:27:45.917272Z 107657c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 6a5c887 into main Sep 16, 2026
6 checks passed
@Mearman
Mearman deleted the feat/gossip-listener-addresses branch September 16, 2026 06:28
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