feat(runtime): first-entry conductor sequences local-player world entry

Cutover slice C3a: the resumable transaction that dissolves the C3
flip's circularity finding. RuntimeLocalPlayerFirstEntryState drives the
local player's complete entry in retail's own order — authored-mover
preparation (the makeObject/set_description shape analog, via a pure
no-submit extraction TryPrepareAuthoredMover), the publication chain's
off-canonical Prepare + atomic body Commit against the residence's exact
placement token, the Evaluate/CommitActivation enter-world analog, the
Place-receipt acknowledgement as that act's virtualized completion, and
only then the executor's FIFO drain (retail: enter_world at 93824
strictly precedes ProcessObjectNetBlobs at 93831). Five stages, eight
typed statuses, exactly-once per stage under retry, no second token
copies, and an acknowledge-stage discriminator that separates
not-yet-FIFO-head (retryable) from authority-moved (typed abandonment) —
a mid-flight delete can no longer strand a retry-forever entry.

The residence retirement notification becomes an ordered multicast
(snapshot-iterated per the event-stream precedent), the lifetime
constructs the conductor with a late-bind Publication seam (transactional
unbound failure — no mutation before the throw), deletion/reset converge
the conductor automatically through the same choke points as the
executor, and its active count is in the ownership snapshot and
IsConverged. Dormant: no production Advance caller; GameRuntime binding
is C3c's first act.

Reviewed: retail-conformance PASS (the stage order verified
step-for-step against retail's entry sequence; the live-controller-on-
abandonment invariant proven structurally enforced and retail-correct —
retail has no entry-flow rollback) + architecture/adversarial PASS after
one fix round (acknowledge-stage authority discrimination; the wiring
fold; two prescribed pre-C3c hardenings). Runtime 948/948; complete
Release solution green across all nine projects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-02 09:43:15 +02:00
parent 874d94bf34
commit 960373df2e
6 changed files with 1816 additions and 29 deletions

View file

@ -1576,11 +1576,69 @@ internal sealed class RuntimeSetPositionState : IDisposable
uint scatterAttempts = 0u,
float shadowWorldOffsetX = 0f,
float shadowWorldOffsetY = 0f)
{
outcome = default;
RuntimeSetPositionMoverPreparationStatus status =
TryPrepareAuthoredMover(
record,
token,
operationKind,
flags,
collisionSource,
gameTime,
out RuntimeSetPositionCommand command,
placementClass,
portal,
line,
scatterRadiusX,
scatterRadiusY,
scatterAttempts,
shadowWorldOffsetX,
shadowWorldOffsetY);
if (status != RuntimeSetPositionMoverPreparationStatus.Prepared)
return status;
outcome = SubmitPreparedPlacement(token, command);
return RuntimeSetPositionMoverPreparationStatus.Prepared;
}
/// <summary>
/// C3a: the exact-Setup-read + <see cref="PrepareMover"/> half of
/// <see cref="TryPrepareAndSubmitAuthoredPlacement"/>, extracted (pure
/// refactor, byte-identical behavior for the existing caller above) so
/// the dormant local-player first-entry conductor
/// (<c>AcDream.Runtime.Gameplay.RuntimeLocalPlayerFirstEntryState</c>)
/// can obtain a prepared <see cref="RuntimeSetPositionCommand"/> WITHOUT
/// the trailing <see cref="SubmitPreparedPlacement"/> call. Submission
/// through the ordinary tail is exactly what an operation with
/// <c>DormantLocalActivation</c> set must never receive — see
/// <see cref="RetryDeferred"/>'s "must never bypass that path through the
/// ordinary remote CommitCanonical tail" comment; the dormant chain's own
/// Evaluate/Commit/FinalizeActivation methods are the sole substitute for
/// submission on that path.
/// </summary>
internal RuntimeSetPositionMoverPreparationStatus TryPrepareAuthoredMover(
RuntimeEntityRecord record,
in RuntimeEntityPlacementToken token,
RuntimeSetPositionOperationKind operationKind,
PhysicsSetPositionFlags flags,
IPreparedCollisionSource collisionSource,
double gameTime,
out RuntimeSetPositionCommand command,
PhysicsPlacementClass placementClass = PhysicsPlacementClass.Ordinary,
RuntimePortalPlacementAuthority portal = default,
Vector3 line = default,
float scatterRadiusX = 0f,
float scatterRadiusY = 0f,
uint scatterAttempts = 0u,
float shadowWorldOffsetX = 0f,
float shadowWorldOffsetY = 0f)
{
EnsureNotDisposed();
ArgumentNullException.ThrowIfNull(record);
ArgumentNullException.ThrowIfNull(collisionSource);
outcome = default;
command = default;
uint setupTableId = CanonicalSetupTableId(record);
RuntimeSetPositionMoverSetup setup;
@ -1615,13 +1673,7 @@ internal sealed class RuntimeSetPositionState : IDisposable
shadowWorldOffsetX,
shadowWorldOffsetY,
portal);
RuntimeSetPositionMoverPreparationStatus status = PrepareMover(
token, preparation, out RuntimeSetPositionCommand command);
if (status != RuntimeSetPositionMoverPreparationStatus.Prepared)
return status;
outcome = SubmitPreparedPlacement(token, command);
return RuntimeSetPositionMoverPreparationStatus.Prepared;
return PrepareMover(token, preparation, out command);
}
internal bool IsExactPreparedPlacementCurrent(