feat(runtime): define borrowed views commands and ordered events

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>
This commit is contained in:
Erik 2026-07-25 19:08:42 +02:00
parent afebbe3eca
commit 854d9e9cd1
21 changed files with 2594 additions and 44 deletions

View file

@ -1,9 +1,8 @@
using AcDream.App.Net;
using AcDream.Runtime;
namespace AcDream.App.Composition;
internal sealed record SessionStartDependencies(
RuntimeOptions Options,
Action<string> Log);
/// <summary>
@ -22,24 +21,23 @@ internal sealed class SessionStartCompositionPhase
public void Start(FrameRootResult frame)
{
ArgumentNullException.ThrowIfNull(frame);
LiveSessionStartResult result =
frame.SessionHost.Start(_dependencies.Options);
RuntimeSessionStartResult result =
frame.GameRuntime.Session.Start(frame.GameRuntime.Generation);
Report(result, _dependencies.Log);
}
internal static void Report(
LiveSessionStartResult result,
RuntimeSessionStartResult result,
Action<string> log)
{
ArgumentNullException.ThrowIfNull(result);
ArgumentNullException.ThrowIfNull(log);
switch (result.Status)
{
case LiveSessionStartStatus.MissingCredentials:
case RuntimeSessionStartStatus.MissingCredentials:
log(
"live: ACDREAM_LIVE set but TEST_USER/TEST_PASS missing; skipping");
break;
case LiveSessionStartStatus.Failed:
case RuntimeSessionStartStatus.Failed:
log($"live: session failed: {result.Error}");
break;
}