06be6cffbc
A gateway connection that dies mid-turn leaves cached session snapshots whose busy/awaitingResponse flags can never settle: the respawned backend re-mints runtime ids, so no terminal publish ever reaches the orphaned snapshot again. #isWarmSettled treated those frozen flags as live work, so every orphan pinned its full warm transcript until app restart — roughly 5MB per reconnect cycle, which turned the restart loop in #95189 into renderer OOM. SessionStateCache now accepts an optional isAuthoritativelyActive probe. When wired, in-flight flags only block eviction while the authoritative $sessionStates record still claims work for the same runtime id; without the probe the legacy always-block behavior is preserved byte-for-byte. Eviction remains gated on needsInput, pending drafts, and active references, so a genuinely running turn (which re-asserts busy on every publish) is never a casualty. The useSessionStateCache hook wires the probe to the store it already imports. Reconnect reconciliation (reconcileBusyStatesOnReconnect) settles the authoritative record, and the next prune drains the orphaned cache entry through the normal LRU path, ownership included.