A session is the conversation.
A sessionId is the boundary for the durable conversation and for the session’s order. Every authority event in that session carries a sessionSequence. The numbers are strictly increasing and have no gaps. The backend assigns them when it appends the event. A timestamp does not reorder the record.
A session has at most one active piece of work at the top:
- one top-level run, or
- one active workflow, which contains that workflow’s active top-level run.
Those two share one slot. A second start is rejected or queued. It does not open a second active top-level execution.
The same fact is deduplicated on (sessionId, eventId). A replay keeps the same eventId.