fix(session): acknowledge login after first placement

ACE intentionally creates the local player Hidden and releases that materialization state on LoginComplete. Sending LoginComplete from raw F746 receipt raced canonical placement and left the login haze visible. Route one one-shot completion callback from Runtime's local first-entry terminal edge to graphical and prepared headless hosts; retain a guarded accepted-Create edge only for content-less headless sessions. Focused Runtime login tests, all 79 Headless tests, the connected user gate, and the Release build pass.
This commit is contained in:
Erik 2026-08-03 12:10:42 +02:00
parent f24532adf3
commit 175ad6b0d0
10 changed files with 107 additions and 48 deletions

View file

@ -1,4 +1,5 @@
using AcDream.Runtime;
using AcDream.Runtime.Entities;
using AcDream.Runtime.Physics;
using AcDream.Runtime.Session;
@ -16,6 +17,7 @@ internal sealed class HeadlessSessionEventRoute : ILiveSessionEventRouting
private readonly GameRuntime _runtime;
private readonly IRuntimePlacementProjectionSink _placements;
private readonly RuntimeFirstEntryDriveController? _firstEntry;
private readonly Action<RuntimeEntityRecord>? _localPlayerCompleted;
private RuntimePlacementProjectionSubscription? _subscription;
private bool _attachStarted;
private bool _eventsDisposed;
@ -25,13 +27,15 @@ internal sealed class HeadlessSessionEventRoute : ILiveSessionEventRouting
ILiveSessionEventRouting events,
GameRuntime runtime,
IRuntimePlacementProjectionSink placements,
RuntimeFirstEntryDriveController? firstEntry = null)
RuntimeFirstEntryDriveController? firstEntry = null,
Action<RuntimeEntityRecord>? localPlayerCompleted = null)
{
_events = events ?? throw new ArgumentNullException(nameof(events));
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
_placements = placements
?? throw new ArgumentNullException(nameof(placements));
_firstEntry = firstEntry;
_localPlayerCompleted = localPlayerCompleted;
}
public void Attach()
@ -47,7 +51,7 @@ internal sealed class HeadlessSessionEventRoute : ILiveSessionEventRouting
// C3c-R1 review F6: assert (not assume) that the prior route
// detached — session reset precedes a new route — before this route
// takes ownership of the shared drive controller's tracked entries.
_firstEntry?.AttachRoute(this);
_firstEntry?.AttachRoute(this, _localPlayerCompleted);
_events.Attach();
_subscription = new RuntimePlacementProjectionSubscription(
_runtime,

View file

@ -2,6 +2,7 @@ using AcDream.Headless.Configuration;
using AcDream.Headless.Credentials;
using AcDream.Headless.Diagnostics;
using AcDream.Headless.Policies;
using AcDream.Core.Net.Messages;
using AcDream.Runtime;
using AcDream.Runtime.Gameplay;
using AcDream.Runtime.Physics;
@ -618,7 +619,8 @@ internal sealed class HeadlessSessionHost : IDisposable
route,
Runtime,
new HeadlessRuntimePlacementProjectionSink(Runtime),
_firstEntryDrive);
_firstEntryDrive,
_ => session.SendGameAction(GameActionLoginComplete.Build()));
}
private static LiveSessionCharacterSelector MapCharacterSelector(