fix(launcher): close Campaign LA LA1 review findings
This commit is contained in:
parent
4edc122085
commit
d511e4c348
12 changed files with 413 additions and 65 deletions
|
|
@ -491,8 +491,9 @@ internal sealed class HeadlessSessionHost : IDisposable
|
|||
_policy.Tick(Runtime, Commands);
|
||||
}
|
||||
|
||||
internal RuntimeTeardownAcknowledgement Stop()
|
||||
internal RuntimeTeardownAcknowledgement Stop(string reason = "stopped")
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(reason);
|
||||
RuntimeTeardownAcknowledgement result =
|
||||
Commands.Session.Stop(Runtime.Generation);
|
||||
// R9 review fix (2026-08-03): _currentSession is cached across
|
||||
|
|
@ -510,7 +511,7 @@ internal sealed class HeadlessSessionHost : IDisposable
|
|||
if (_hasConnected)
|
||||
{
|
||||
_hasConnected = false;
|
||||
_statusWriter.Disconnected(_descriptor.Id, "stopped");
|
||||
_statusWriter.Disconnected(_descriptor.Id, reason);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
@ -640,7 +641,7 @@ internal sealed class HeadlessSessionHost : IDisposable
|
|||
_statusWriter.Exited(
|
||||
_descriptor.Id,
|
||||
_faulted ? 1 : 0,
|
||||
_faulted ? "fault" : "disposed");
|
||||
_faulted ? "runtime-fault" : "graceful");
|
||||
_disposeStage++;
|
||||
_disposed = true;
|
||||
break;
|
||||
|
|
@ -670,8 +671,12 @@ internal sealed class HeadlessSessionHost : IDisposable
|
|||
|
||||
if (reconnect)
|
||||
{
|
||||
RuntimeTeardownAcknowledgement stopped =
|
||||
_liveSession.Stop(expectedGeneration);
|
||||
// Campaign LA LA1 review fix F3: route reconnect teardown
|
||||
// through the same status-aware Stop boundary as every other
|
||||
// host stop. The retiring connection therefore publishes a
|
||||
// truthful disconnected(reason: "reconnect") edge before the
|
||||
// fresh LiveSessionHost reports its second connected edge.
|
||||
RuntimeTeardownAcknowledgement stopped = Stop("reconnect");
|
||||
if (!stopped.IsComplete)
|
||||
{
|
||||
return new RuntimeSessionStartResult(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue