harden(runtime): close canonical entity object lifetime
Retain exact teardown receipts before terminal callbacks, preserve ordered re-entrant entity/object publication, publish committed facts across projection failures, and make direct disposal converge every canonical owner. Add a complete ownership ledger plus adversarial direct/graphical parity, callback, GUID reuse, reset, and resource-churn gates. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
84954c8b77
commit
119b7c1151
9 changed files with 992 additions and 95 deletions
|
|
@ -195,6 +195,32 @@ public sealed class CurrentGameRuntimeAdapterTests
|
|||
spawn.Guid,
|
||||
Harness.PlayerGuid,
|
||||
newSlot: 3);
|
||||
var objDesc = new ObjDescEvent.Parsed(
|
||||
spawn.Guid,
|
||||
new CreateObject.ModelData(
|
||||
0x04000001u,
|
||||
Array.Empty<CreateObject.SubPaletteSwap>(),
|
||||
Array.Empty<CreateObject.TextureChange>(),
|
||||
Array.Empty<CreateObject.AnimPartChange>()),
|
||||
spawn.InstanceSequence,
|
||||
ObjDescSequence: 2);
|
||||
Assert.True(direct.TryApplyObjDesc(
|
||||
objDesc,
|
||||
acknowledgeProjection: null,
|
||||
out _));
|
||||
var motion = new WorldSession.EntityMotionUpdate(
|
||||
spawn.Guid,
|
||||
new CreateObject.ServerMotionState(0x3D, 0x11),
|
||||
spawn.InstanceSequence,
|
||||
MovementSequence: 2,
|
||||
ServerControlSequence: 2,
|
||||
IsAutonomous: false);
|
||||
Assert.True(direct.TryApplyMotion(
|
||||
motion,
|
||||
retainPayload: true,
|
||||
acknowledgeProjection: null,
|
||||
out _,
|
||||
out _));
|
||||
var vector = new VectorUpdate.Parsed(
|
||||
spawn.Guid,
|
||||
new Vector3(1f, 2f, 3f),
|
||||
|
|
@ -216,6 +242,12 @@ public sealed class CurrentGameRuntimeAdapterTests
|
|||
acknowledgeProjection: null,
|
||||
out _,
|
||||
out _));
|
||||
Assert.True(direct.CommitChildNoDraw(
|
||||
directCanonical,
|
||||
noDraw: true));
|
||||
Assert.True(direct.CommitChildNoDraw(
|
||||
directCanonical,
|
||||
noDraw: false));
|
||||
WorldSession.EntityPositionUpdate position =
|
||||
Position(spawn.Guid, spawn.InstanceSequence);
|
||||
Assert.True(direct.TryApplyPosition(
|
||||
|
|
@ -228,6 +260,10 @@ public sealed class CurrentGameRuntimeAdapterTests
|
|||
out _,
|
||||
out _,
|
||||
out _));
|
||||
Assert.True(direct.CommitRebucket(
|
||||
directCanonical,
|
||||
0x12360001u,
|
||||
0x1236FFFFu));
|
||||
Assert.True(direct.TryApplyPickup(
|
||||
new PickupEvent.Parsed(
|
||||
spawn.Guid,
|
||||
|
|
@ -253,8 +289,22 @@ public sealed class CurrentGameRuntimeAdapterTests
|
|||
spawn.Guid,
|
||||
Harness.PlayerGuid,
|
||||
newSlot: 3);
|
||||
Assert.True(graphical.Entities.TryApplyObjDesc(
|
||||
objDesc,
|
||||
out _));
|
||||
Assert.True(graphical.Entities.TryApplyMotion(
|
||||
motion,
|
||||
retainPayload: true,
|
||||
out _,
|
||||
out _));
|
||||
Assert.True(graphical.Entities.TryApplyVector(vector, out _));
|
||||
Assert.True(graphical.Entities.TryApplyState(state, out _, out _));
|
||||
Assert.True(graphical.Entities.SetAttachedChildNoDraw(
|
||||
spawn.Guid,
|
||||
noDraw: true));
|
||||
Assert.True(graphical.Entities.SetAttachedChildNoDraw(
|
||||
spawn.Guid,
|
||||
noDraw: false));
|
||||
Assert.True(graphical.Entities.TryApplyPosition(
|
||||
position,
|
||||
isLocalPlayer: false,
|
||||
|
|
@ -263,6 +313,9 @@ public sealed class CurrentGameRuntimeAdapterTests
|
|||
out _,
|
||||
out _,
|
||||
out _));
|
||||
Assert.True(graphical.Entities.RebucketLiveEntity(
|
||||
spawn.Guid,
|
||||
0x12360001u));
|
||||
Assert.True(graphical.Entities.TryApplyPickup(
|
||||
new PickupEvent.Parsed(
|
||||
spawn.Guid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue