Establish the J1 presentation-independent contract with instance-scoped clocks and generations, immutable borrowed views, typed generation-gated commands, normalized ordered diagnostics, and teardown acknowledgements. Route graphical startup plus press-time selection, movement, and combat through focused App adapters over the exact existing owners without adding a queue or mirrored world. Validated by the Release solution build, 13 Runtime tests, 3,838 App tests with three existing skips, and the complete 8,424-test Release suite with five existing skips. Co-authored-by: Codex <codex@openai.com>
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using AcDream.App.Composition;
|
|
using AcDream.Runtime;
|
|
|
|
namespace AcDream.App.Tests.Composition;
|
|
|
|
public sealed class SessionStartCompositionTests
|
|
{
|
|
[Fact]
|
|
public void DiagnosticsPreserveMissingCredentialAndFailureMessagesOnly()
|
|
{
|
|
var messages = new List<string>();
|
|
|
|
SessionStartCompositionPhase.Report(
|
|
new RuntimeSessionStartResult(
|
|
RuntimeSessionStartStatus.MissingCredentials,
|
|
default),
|
|
messages.Add);
|
|
SessionStartCompositionPhase.Report(
|
|
new RuntimeSessionStartResult(
|
|
RuntimeSessionStartStatus.Failed,
|
|
default,
|
|
Error: new InvalidOperationException("boom")),
|
|
messages.Add);
|
|
SessionStartCompositionPhase.Report(
|
|
new RuntimeSessionStartResult(
|
|
RuntimeSessionStartStatus.Disabled,
|
|
default),
|
|
messages.Add);
|
|
SessionStartCompositionPhase.Report(
|
|
new RuntimeSessionStartResult(
|
|
RuntimeSessionStartStatus.Connected,
|
|
default),
|
|
messages.Add);
|
|
|
|
Assert.Equal(2, messages.Count);
|
|
Assert.Equal(
|
|
"live: ACDREAM_LIVE set but TEST_USER/TEST_PASS missing; skipping",
|
|
messages[0]);
|
|
Assert.StartsWith(
|
|
"live: session failed: System.InvalidOperationException: boom",
|
|
messages[1],
|
|
StringComparison.Ordinal);
|
|
}
|
|
}
|