wip: Campaign LA LA1 fix round — INCOMPLETE, stopped mid-task

Agent was stopped for token budget partway through the LA1 review fix
round. Landed here: F1 best-effort SessionStatusWriter, F2 App reader
tolerance (paths/mode), F5 argument-parsing hardening, plus new tests.
NOT DONE: F4 shared-fixture production shape (was the next step), F3
reconnect disconnected edge + recorded limitation, F6 exited
idempotency/reasons, F7 structural redaction test, F8 platform-guard
test + comment fix, optional RuntimeOptions PrintMembers redaction.

Build/test state UNVERIFIED at this commit. Next session: finish the
remaining findings, run the suites, then narrow re-review.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-14 16:32:52 +02:00
parent c9fc7f4a66
commit 75a6724d5b
9 changed files with 628 additions and 52 deletions

View file

@ -154,5 +154,31 @@ internal static class SessionConfigurationLoader
throw new SessionConfigurationException(
$"Session '{session.Id}' statusFile must be a non-empty path when present.");
}
ValidateMode(session);
}
/// <summary>
/// Campaign LA slice LA1 review fix (F2): <c>mode</c> is Headless-only
/// on the App host — the graphical host has no probe concept (LA2
/// builds the probe in Headless only). An absent field is today's ONLY
/// App behavior (play); <c>"probe"</c> gets a specific, actionable
/// message instead of a cryptic unmapped-member JSON error; anything
/// else is a plain configuration error.
/// </summary>
private static void ValidateMode(SessionDescriptor session)
{
if (session.Mode is null)
return;
if (string.Equals(session.Mode, "probe", StringComparison.Ordinal))
{
throw new SessionConfigurationException(
$"Session '{session.Id}' has mode 'probe'; probe sessions "
+ "are headless-only and cannot run on the graphical host.");
}
throw new SessionConfigurationException(
$"Session '{session.Id}' has unsupported mode '{session.Mode}'.");
}
}