Skip to content

Peering poll mode: a peer that can't be reached polls for its messages #399

Closed

Description

@Jacksondr5

Track the poll-mode stack for peering. The design was approved by Jackson on 2026-10-02 (the J5 artifact plans/peering-collect-mode.md, with the app mockup plans/peering-onboarding-mockup.html).

Goals

  • A server that can't be reached can still peer. Take a laptop behind an office firewall that drops every inbound connection. It peers with a reachable server, such as a work VM. The reachable server stores the laptop's A2A messages, and the laptop polls for them over HTTPS connections it opens itself.
  • One vocabulary across the UI and the code. "Send directly" means link mode push. "Poll" means link mode poll on the polling server's record and store on the storing server's record.
  • The dialog sets it up for you. A reachability check, plus each server's run mode, produces one streamlined setup. It asks only what the check couldn't settle, and "Set up differently" opens the manual form. If a server is too old, the dialog says so and offers only Close.
  • Versions negotiate. The j5PeerPoll descriptor flag covers client and server. peerProtocolVersion and the peer capabilities on hello cover server to server.
  • Agents see where participants live, by server name. The name is upstream's label. Agents still address participants by id, and no tool takes or manages a server.
  • Senders learn about failures. They get not-delivered notices. A refused ask ends its Exchange. Sends and the address book report when a recipient is unavailable.
  • Removing a peer wipes the slate in every mode. Its waiting messages are cancelled with a notice to each sender, and its open Exchanges drop (resolves Removing a peer leaves its open Exchanges open #286). Peering again starts empty.

Rollout, as stacked PRs

  • 1. Definition: rewrite the cross-device, A2A and agent-tools definitions.
  • 2. Versions: the peer protocol version and capabilities on hello, and the j5PeerPoll descriptor flag.
  • 3. Where participants live: the label on hello, the per-pair label dropped, and the server on address-book rows, send results and remote sender lines.
  • 4. Storing side: the migration (030, since j5/main is already at 029), link mode, store pairing, the worker skip, the poll route with acks and long poll, the roster snapshot, the lifecycle notice rule, and the shared body builder.
  • 5. Polling side: the poll link mode on add, the poller, and pr-env.sh --peer --poll.
  • 6. Clients and CLI: the reachability check and its routes, the streamlined setup, the too-old message, peer row status, and the CLI flags.
  • 7. Sender feedback and removal: not-delivered notices, a refused ask dropping its Exchange, availability, and removal wiping the slate (Removing a peer leaves its open Exchanges open #286).
  • 8. Docs for users: a peering section in the user guide.

Out of scope here: the j5.codes explainer page (item 9 of the plan), and the alarm surface for direct sends (#260).

Activity

  1. Jacksondr5 commented on Oct 8, 2026

    @Jacksondr5
    OwnerAuthor

    The poll-mode stack #400–#408 merged on 2026-10-08. Follow-ups from Bryant's review and CodeRabbit:

  2. Jacksondr5 commented on Nov 7, 2026

    @Jacksondr5
    OwnerAuthor

    Closing (Jackson, 2026-11-06, during the v0.1.7 advance review). The poll-mode stack #400–#408 merged on 2026-10-08, which covers all eight items; the boxes are now ticked. Of the follow-ups, #485 is closed and #486 (un-peering is a clean break) stays open on its own. Upstream's linked environments, merged in v0.1.4 and in v0.1.7, plan no poll mode for their first version (Julius on pingdotgg#16655), so poll mode stays J5's.

    Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions