3305dcedbb
Address review feedback on #63068: 1. Replace unconditional reopen_session() + end_session() with a conditional promote_to_session_reset() method in SessionDB. The new method only promotes live rows or rows ended with agent_close — explicit boundaries (compression, session_reset, new_command) are preserved via first-writer-wins semantics. 2. Rewrite tests to use real SessionDB instead of MagicMock: - 7 unit tests for promote_to_session_reset edge cases - 3 integration tests verifying the actual recovery contract in find_latest_gateway_session_for_peer after promotion