ElectionLobby
A pre-session lobby over a symmetric mesh. Not a Room — during the lobby there is no admit handshake and no admitted roster: just the live connected peers and a reactive elected host. A Room is created exactly once, at start/awaitRoom, by adopting the woven seam with a now-fixed role. See docs/host-election-design.md.
A lobby does run a heartbeat. Every lobby answers pings from the moment it exists, so a host may take as long as its user likes to call start. start and awaitRoom also watch their counterparts, so a peer that stays connected but stops answering ends the election. A lobby that answers is only open, though, not necessarily taking part, so a peer abandoning a lobby must call leave.
Properties
Live set of connected peers (includes selfId). Join / leave / two-group-merge are all just set changes. Sourced from us.tractat.kuilt.core.Seam.peers — never a discovery roster such as NwLoom.visiblePeers, which accumulates and never removes.
The underlying seam's own lifecycle — Weaving / Woven / Torn — exposed so a consumer can distinguish the two ways liveness can collapse mid-election (#1466): a transport tear (SeamState.Torn) versus a membership drain (peers shrinking while state stays SeamState.Woven). Sourced from us.tractat.kuilt.core.Seam.state — same value the lobby's own collapse detection races against.
Functions
Await the session as a member: suspend until the elected host freezes the lobby, acknowledge it, and adopt the seam as us.tractat.kuilt.session.SessionRole.Joiner. (The host obtains its Room from start instead.)
HOST-ONLY. Close the lobby and begin the session: run the freeze/ack round, then adopt the seam as us.tractat.kuilt.session.SessionRole.Host. Retries internally while membership churns and while a live member has not acknowledged; returns the admitted Room once every member has.