tryResume

abstract suspend fun tryResume(resume: ProvenResume, at: Long): ResumeResult.HostVerdict

Attempts to restore the held seat resume names.

Validation order:

  1. Session match — ProvenResume.roomId must equal the controller's Room.

  2. Window open — the reconnect window for ProvenResume.peerId must still be active at at.

  3. Window not yet spent — a window restores at most once.

Who the joiner is, is not this controller's concern. A ProvenResume has an internal constructor and the room builds one only after its own check (#3159): the joiner proved the device key the seat was admitted under, and the seat is a current member's. An implementation — a consumer's own hold policy included — is protected from forged resumes without checking anything about the joiner, even one that checks none of steps 1–3. Step 1 cannot fail through a room, which builds every ProvenResume from its own id; it stays for a controller driven some other way.

On success, emits JoinerReconnectEvent.Resumed and closes the window so a second tryResume for the same seat returns ResumeResult.WindowClosed. The room treats ResumeResult.WindowNotYetOpen as a seat still held and restores it anyway, and any other refusal as a seat that is gone — but only once it has seen the JoinerReconnectEvent.WindowOpened this controller emits for the partition in question. Before that the refusal may be about an earlier partition's window, so the room reads it as not yet open. A controller that never announces its windows therefore never has a refusal acted on.