From 48b2f56ef8d984e9d0adbc1af35aa2d550633265 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Fri, 18 Sep 2026 08:27:00 -0400 Subject: [PATCH] [MG_Remote] (Disaggregated): P5e ra - the run-ahead latch goes down with the session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CONTRACT-P5E §1. The latch means "what THIS session's first caps adoption said", and ClientSession is a process singleton that Start/Stop can cycle. Left standing, a second Start would inherit a verdict about a server that is gone - and because a later snapshot may only turn run-ahead OFF, an inherited `true` could never be corrected by the honest answer arriving afterwards. - The present serial resets with it: a credit's id space belongs to the session that paces on it, and a server that never saw frame 1 cannot return its credit. --- MobileGL/MG_Remote/Client/ClientSession.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MobileGL/MG_Remote/Client/ClientSession.cpp b/MobileGL/MG_Remote/Client/ClientSession.cpp index b1332132..d9fcc6dc 100644 --- a/MobileGL/MG_Remote/Client/ClientSession.cpp +++ b/MobileGL/MG_Remote/Client/ClientSession.cpp @@ -802,6 +802,14 @@ namespace MobileGL::MG_Remote::Client { m_serverTransport.reset(); m_transport = nullptr; m_started = false; + // P5e (ra, §1): the LATCH GOES DOWN WITH THE SESSION. It is "what the first caps + // adoption of THIS session said", and a session that starts again - the same singleton, + // a second Start - must take it again from that session's own first snapshot rather + // than inherit a verdict about a server that is gone. The present serial goes with it + // for the same reason: the credit's id space belongs to the session that paces on it. + m_runAheadArmed = false; + m_runAheadLatched = false; + m_presentsSent = 0; if (g_active == this) { g_active = nullptr; }