feat(runtime): construct remote bodies at Create per retail set_description
Cutover slice C3b: residence-route remote/creature/projectile Creates now get their canonical PhysicsBody at Create time — retail's order, closing the C3 flip's Finding C (production builds bodies at first motion; retail builds them in ACCObjectMaint::CreateObject). RuntimeRemoteBodyDescription walks set_description 0x00514F40 exactly: the motion-table gate (zero id PASSES — verified at 0051871f/005127ca), the frame-vs-movement branch keyed on retail's movement_buffer != 0 (an empty-buffer movement payload takes the PLACEMENT branch and writes no autonomy — the wire-shape defect the retail review caught), set_state, the byte-certain friction gate (inclusive [0,1]; NaN deliberately skipped per the gates doc's sanctioned deviation), the set_elasticity clamp with retail's unordered-to-zero NaN routing (ACE diverges to 0.1 on that edge), the translucency gate (!= 0.0f, original always recorded), velocity via setter, omega raw, and ctor-defaults for absent wire fields (0.95f/0.05f/0 — the fresh-desc-per- message flow verified at both UnPack call sites). InWorld stays false until submission, the enter_world analog. RuntimeRemoteFirstEntryState sequences mover-prep -> body construction -> placement -> acknowledgement -> Execute with every C3a hardening inherited: exactly-once stages, the shared acknowledge-stage discriminator (extracted to RuntimeFirstEntryAcknowledgement, one body for both conductors), typed Contention against in-flight remote-motion binds, never-clobber body binding through the canonical writer (foreign body fails closed — provably safe coexistence with today's build-at-first-motion path in both directions), automatic convergence through the retirement fan-out, and the construction receipt riding the terminal Advance. Dormant: no production caller; C3c wires both hosts. Reviewed: retail-conformance PASS (the construction order, both gate boundary/NaN semantics, the motion-table and autonomy verdicts all re-derived from the pseudo-C) + architecture/adversarial PASS after one fix round. Runtime 982/982; complete Release solution 10,777 passed / 4 intentional skips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
d62b99509e
commit
0934a12111
6 changed files with 2083 additions and 41 deletions
|
|
@ -533,49 +533,26 @@ internal sealed class RuntimeLocalPlayerFirstEntryState
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Re-validates authority after a failed acknowledge. Two independent
|
||||
/// checks, either of which failing means authority moved and this class
|
||||
/// must abandon rather than keep retrying forever: (1) the residence
|
||||
/// lease this whole sequence began under must still be exactly current
|
||||
/// (mirrors the stage0/stage1 checks — a delete or reset retires it);
|
||||
/// (2) if the FIFO head belongs to THIS entity at all, it must still be
|
||||
/// the exact Place projection this class is holding — a head that
|
||||
/// belongs to us but is no longer that exact token (rewritten to
|
||||
/// Discard, or to a later revision) means our specific placement was
|
||||
/// superseded even if the residence lookup transiently still resolves.
|
||||
/// A head belonging to a DIFFERENT entity is the genuine "not yet our
|
||||
/// turn" case and must stay retryable. This reads the Runtime-internal
|
||||
/// <see cref="RuntimeSetPositionState.TryPeekProjection"/> directly
|
||||
/// rather than through the public, generation-gated
|
||||
/// <see cref="RuntimePlacementProjectionChannel"/> — this class is part
|
||||
/// of Runtime, not an external host crossing that boundary, exactly like
|
||||
/// its existing direct <see cref="RuntimeSetPositionState.AcknowledgeProjection"/>
|
||||
/// call above.
|
||||
/// Re-validates authority after a failed acknowledge. C3b review M2:
|
||||
/// the mechanism (residence-lease currency + exact-head-token match; a
|
||||
/// DIFFERENT entity's head stays retryable) is shared verbatim with the
|
||||
/// remote conductor via
|
||||
/// <see cref="RuntimeFirstEntryAcknowledgement.IsStillPending"/> — one
|
||||
/// body, so the abandonment fix that stops a delete-rewritten Discard
|
||||
/// head from producing an infinite AwaitingReceiptAcknowledgement retry
|
||||
/// cannot regress independently in either conductor. Full rationale on
|
||||
/// the shared helper.
|
||||
/// </summary>
|
||||
private bool IsAcknowledgementStillPending(
|
||||
RuntimeEntityRecord record,
|
||||
in RuntimeInitialCreateResidenceToken residenceToken,
|
||||
in RuntimePlacementProjectionToken expected)
|
||||
{
|
||||
if (!_residences.TryGetCurrent(
|
||||
record,
|
||||
out RuntimeInitialCreateResidenceLease lease)
|
||||
|| lease.Token != residenceToken)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_physics.SetPosition.TryPeekProjection(
|
||||
out RuntimePlacementProjectionSnapshot head)
|
||||
&& head.Token.Entity == expected.Entity
|
||||
&& (head.Kind is not RuntimePlacementProjectionKind.Place
|
||||
|| head.Token != expected))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
in RuntimePlacementProjectionToken expected) =>
|
||||
RuntimeFirstEntryAcknowledgement.IsStillPending(
|
||||
_residences,
|
||||
_physics.SetPosition,
|
||||
record,
|
||||
residenceToken,
|
||||
expected);
|
||||
|
||||
private RuntimeLocalPlayerFirstEntryStatus RunExecute(
|
||||
RuntimeEntityRecord record,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue