wip: Campaign LA LA2 probe mode + idle policy — INCOMPLETE, stopped mid-task
Agent was stopped for token budget. Landed here: probe flag through LiveSessionConnectOptions + the StartCore short-circuit, the mode field with JsonRequired-to-semantic-validation move, host exit-code mapping, and 34 passing tests including 3 new probe tests (agent last reported green before the stop). NOT DONE: the idle-policy unit tests (next step), full-suite verification, and the WSL run. Build/test state UNVERIFIED at this commit. Next session: finish idle policy tests, run Runtime+Headless Release suites Windows and WSL, then dispatch the Opus dual-lens review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
498f1c1182
commit
c601942467
14 changed files with 830 additions and 35 deletions
|
|
@ -13,7 +13,23 @@ public sealed record LiveSessionConnectOptions(
|
|||
int Port,
|
||||
string User,
|
||||
string Password,
|
||||
LiveSessionCharacterSelector? Character = null);
|
||||
LiveSessionCharacterSelector? Character = null,
|
||||
/// <summary>
|
||||
/// Campaign LA slice LA2: short-circuits
|
||||
/// <see cref="LiveSessionController"/>'s connect transaction right after
|
||||
/// the roster report (before <c>TrySelectCharacter</c>/
|
||||
/// <c>ApplySelectedCharacter</c>/<c>EnterWorld</c>) — connect, receive
|
||||
/// <c>CharacterList</c>, report the roster, gracefully disconnect via the
|
||||
/// same <c>StopCore</c> teardown the <see cref="LiveSessionStartStatus.NoCharacters"/>
|
||||
/// path already uses, and return
|
||||
/// <see cref="LiveSessionStartStatus.ProbeComplete"/>. The pinned launch
|
||||
/// contract (<c>docs/plans/2026-08-14-launcher-campaign.md</c> LA1's
|
||||
/// <c>mode</c> field) requires a probe session to omit both
|
||||
/// <see cref="Character"/> and its policy entirely, but the controller
|
||||
/// itself does not enforce that pairing — the headless config loader
|
||||
/// does, before a <see cref="LiveSessionConnectOptions"/> is ever built.
|
||||
/// </summary>
|
||||
bool Probe = false);
|
||||
|
||||
public interface IRuntimeLiveSessionFramePhase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ public enum LiveSessionStartStatus
|
|||
Connected,
|
||||
Deferred,
|
||||
Failed,
|
||||
/// <summary>
|
||||
/// Campaign LA slice LA2: a <see cref="LiveSessionConnectOptions.Probe"/>
|
||||
/// session connected, received (and reported) the character roster, and
|
||||
/// gracefully disconnected BEFORE selection/EnterWorld — deliberately a
|
||||
/// SUCCESS variant of the <see cref="NoCharacters"/> early-exit shape
|
||||
/// (same <c>StopCore</c> teardown), not a failure.
|
||||
/// </summary>
|
||||
ProbeComplete,
|
||||
}
|
||||
|
||||
public readonly record struct LiveSessionOwnershipSnapshot(
|
||||
|
|
@ -647,6 +655,24 @@ public sealed class LiveSessionController
|
|||
return new LiveSessionStartResult(LiveSessionStartStatus.Deferred);
|
||||
}
|
||||
|
||||
// Campaign LA slice LA2: the probe short-circuit lands here —
|
||||
// right after the roster report, before TrySelectCharacter ever
|
||||
// runs — so a probe session never reaches selection,
|
||||
// ApplySelectedCharacter, or EnterWorld. This mirrors the
|
||||
// NoCharacters early-exit immediately below (same StopCore
|
||||
// teardown), the deliberate difference being the returned status
|
||||
// is a SUCCESS, not a failure. Non-probe callers (options.Probe
|
||||
// is false by default) fall straight through to the unchanged
|
||||
// selection/enter path below — byte-identical to pre-LA2
|
||||
// behavior.
|
||||
if (options.Probe)
|
||||
{
|
||||
Console.WriteLine(
|
||||
"live: probe complete — disconnecting before EnterWorld");
|
||||
StopCore();
|
||||
return new LiveSessionStartResult(LiveSessionStartStatus.ProbeComplete);
|
||||
}
|
||||
|
||||
if (characters is null
|
||||
|| !TrySelectCharacter(
|
||||
characters,
|
||||
|
|
|
|||
|
|
@ -316,6 +316,8 @@ public sealed class LiveSessionHost : IRuntimeSessionCommands
|
|||
RuntimeSessionStartStatus.Deferred,
|
||||
LiveSessionStartStatus.Failed =>
|
||||
RuntimeSessionStartStatus.Failed,
|
||||
LiveSessionStartStatus.ProbeComplete =>
|
||||
RuntimeSessionStartStatus.ProbeComplete,
|
||||
_ => throw new ArgumentOutOfRangeException(
|
||||
nameof(result),
|
||||
result.Status,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue