Idle, Close, And Reconnect

ConversationIdleNotify → grace expires → ConversationClosedNotify → reconnect·rejoin

Idle, Close, And Reconnect ConversationIdleNotify → grace expires → ConversationClosedNotify → reconnect·rejoin ConversationIdleNotify ConversationIdleNotify ConversationIdleNotify grace expires → ConversationClosedNotify ConversationClosedNotify ConversationClosedNotify STREAM reconnect AuthenticateReq(same token) AuthenticateRes JoinConversationReq(conversationId) JoinConversationReq JoinConversationRes(scheduled=false) JoinConversationRes(scheduled=false) Customer Client · Sequence participant Customer Client Session · Sequence participant Session ConversationSpot · Sequence participant ConversationSpot Agent Client · Sequence participant Agent Client

Idle·grace·close transitions

  • • After the domain idle deadline passes since the last message, ConversationSpot transitions to WaitingForClose and sends ConversationIdleNotify to both sides. If a message arrives within the grace timeout, it returns to Active; otherwise it sends Closed and ConversationClosedNotify. An explicit close transitions directly to Closed.
  • • The original's P→P self-message 'grace deadline expires' is merged into the following ConversationClosedNotify arrow's label ('grace expires → …') because archify sequence doesn't support self-messages.

Reconnect relay rules

  • • Reconnecting doesn't recreate the actor or the Conversation state — it returns the current state with scheduled=false. The Agent re-binds the roster actor, sends SetAgentAvailableReq(true), and then sends JoinConversationReq for each conversation that was open.
  • • Session handles JoinConversationReq as a binding packet. For other packets, it relays to the Actor bound in the dispatch context when the Actor slot is present, or to the connection's identity Actor when absent. The agent finds each room's Actor handle again from JoinConversationRes.actorId after rejoin.
  • • When preparation and reconnect assertions across several processes take longer than the idle deadline, the runner may send a normal typed SendChatMessageReq to renew valid application traffic — this is not a heartbeat or keepalive, and a control packet, sleep, or log line must not replace it. The actual idle and grace behavior is checked with a separate bounded wait.