Resume re-authorizes after its off-loop history read, so a delete that
retired the session meanwhile answers not_found. A delete commits off
the loop, though, and its retirement runs only when the loop gets back
to it. In between, the live entry is still there and passes the
re-authorize, but the row is gone:
- session.resume read the missing row in _handle and raised TypeError,
an internal error (-32603) for the viewer;
- the hosted room's history read met the deleted receipt and answered
storage_unavailable.
_handle now raises not_found for a missing row, before the viewer
joins, and unless_deleted turns the history read's refusal into
not_found when the session row is gone. This also covers a delete that
starts cold, and nothing waits: holding the session's mutation lock
instead would make a resume wait behind a model switch or MCP discovery.
Refs #134889
Refs #140449
(cherry picked from commit fc14e2a30b60b8d667afde7d411cb2113441d744)