acdream/tests/AcDream.App.Tests/Streaming
Erik e0f96a55bf fix(physics): C4 route 3 — portal placement authority (local player)
Removes a duplicate placement authority for local-player portal arrival.
Portalling worked before this change and works after it — this is not a
bug fix, EXCEPT that it found and fixed one dead-code production bug.

THE PRODUCTION BUG: TryExecuteCanonicalPortalPlacement re-read the
accepted destination at Place time, but TryBeginPortalReveal already
consumes that slot at Aim time — so the arm was 100% dead code and every
real portal Place refused with host-token-unavailable. Found only
because we refused to accept 7 skipped tests instead of chasing the
count to zero.

RETAIL IS THE GENERIC PATH FOR THE THIRD ROUTE RUNNING:
SmartBox::TeleportPlayer @0x00453910 = SetPositionSimple(dest, 1) with
flags 0x1012, followed by PlayerPositionUpdated.

BOTH INVERSIONS, WITH THEIR ANCHORS: unlike route 2, the leash IS armed
here (ConstrainTo @0x0045418A) and velocity is zeroed
(set_velocity @0x004541B4); unlike route 4b-3, the local teleport_hook
runs AFTER placement (@0x004538AE).

THE THREE-ROUND DEFECT CHAIN, HONESTLY:
- Round 1 released the player at the pre-teleport position while the
  anim stream marched on — the contract wrongly assumed Place re-fires
  (process rule 1's third occurrence this campaign).
- Round 2's fix inferred commit from a global PendingCount, which three
  non-committing paths also clear — making the SAME bug complete
  cleanly and silently. Strictly worse than round 1: round 1 at least
  tripped portal-complete-before-materialized.
- Round 3 latches the commit where it actually happens
  (ReconcileAndAcknowledgePortal), keyed on reveal generation and
  teleport sequence, via TryConsumePortalCommit. Two of the three
  required regression tests landed and are sabotage-verified on both
  hosts (ParkedPlace_ForgottenByOrdinaryMergeDoesNotLatchAsCommitted /
  HeadlessPortalPrepareDestinationForgottenByOrdinaryMergeDoesNotLatchAsCommitted).
  The third (force-arm-takes-the-slot) was judged unnecessary on review:
  with the inference gone, PendingCount is only a "don't ask yet" guard
  at both gates, so a force operation occupying or vacating the slot no
  longer changes an input the commit decision reads — the case collapses
  into what the landed test already discriminates.

THE B2/P3 RESOLUTION: both round-2 reviews were right about different
branches of the same synchronous call. RuntimePlacementProjectionSubscription
.OnPlacement acknowledges the FIFO head only when TryApply returns true;
a Place whose portal authority went stale (transit ended/superseded
while parked) used to return false, wedging every later entity's
placement receipt behind it forever. Both sinks
(RuntimePlacementPresentationSink, HeadlessRuntimePlacementProjectionSink)
now acknowledge-and-ignore a stale-authority Place instead of refusing
it. The regression test (RuntimePlacementPresentationSinkTests
.PortalPlace_StaleTransitHostOrSequenceIsAcknowledgedAndIgnored) had
been asserting the old, wrong `false` behaviour; it now asserts and
sabotage-verifies the fix.

Also lands: AP-144 (register discipline — the portal movement-event
send reuses the stricter UsePositionFromServer gate where retail's
SendMovementEvent is the looser autonomy_level != 0 test, diverging
only at level 1, currently unreachable), AP-145 + issue #318 (the
local-player collision-shadow presentation write bypasses its own
publisher's ShadowObjects write via a direct cache .Set(), self-healing
only once dedup diverges — filed, not fixed, pending a composition
test), AD-42 deleted (its last citation retired by the canonical portal
arm), AD-2 updated (the wait-cue's trigger predicate now covers a
second cause), and two documentation corrections: the enter_world
misattribution (both call sites are in SmartBox::HandleCreateObject,
only one in the player branch — portal arrival is TeleportPlayer, not
enter_world) and the stale "local player never reaches this path"
comment on the generic-remote-render-pose write.

Suite: 11,090 passed / 4 skipped / 0 failed. No new skips, nothing
weakened.

STILL OWED: the connected two-client gate, with
ACDREAM_PROBE_LOCAL_TELEPORT=1, scored only if [local-tp] lines
actually appear in the capture — and explicitly NOT scored as covering
issue #318 (no composition test yet asserts PhysicsEngine.ShadowObjects
directly).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 03:57:37 +02:00
..
GpuWorldStateActivatorTests.cs refactor(streaming): compose landblock presentation transaction 2026-07-21 21:45:16 +02:00
GpuWorldStateAnimatedIndexTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
GpuWorldStateCollisionResidencyTests.cs refactor(physics): remove parsed collision graphs 2026-07-25 18:21:19 +02:00
GpuWorldStateRenderTraversalTests.cs test(app): put every strict-zero site on the probe (#250) 2026-07-29 03:49:13 +02:00
GpuWorldStateVisibilityTests.cs fix(streaming): stop replaying committed recenter retirements 2026-08-02 20:53:11 +02:00
GraphicalRemotePlacementServiceWindowTests.cs feat(physics): C4 route 4b-1 — remote placement infrastructure (dormant) 2026-08-04 04:08:19 +02:00
LandblockBuildFactoryTests.cs refactor(physics): remove parsed collision graphs 2026-07-25 18:21:19 +02:00
LandblockBuildOriginTests.cs refactor(runtime): cut graphical host over to canonical root 2026-07-26 19:06:09 +02:00
LandblockConcretePresentationPipelineTests.cs refactor(runtime): own per-session physics simulation 2026-07-26 13:39:57 +02:00
LandblockPhysicsPublisherTests.cs feat(runtime): atomically replace collision generations 2026-08-01 17:33:34 +02:00
LandblockPresentationPipelineTests.cs fix(streaming): stop replaying committed recenter retirements 2026-08-02 20:53:11 +02:00
LandblockRenderPublisherTests.cs perf(streaming): cursor publication across frame budgets 2026-07-24 19:10:18 +02:00
LandblockRetirementCoordinatorTests.cs fix(streaming): stop replaying committed recenter retirements 2026-08-02 20:53:11 +02:00
LandblockStaticPresentationPublisherTests.cs refactor(runtime): own per-session physics simulation 2026-07-26 13:39:57 +02:00
LocalPlayerTeleportControllerTests.cs fix(physics): C4 route 3 — portal placement authority (local player) 2026-08-05 03:57:37 +02:00
RuntimeTeleportDestinationAdapterTests.cs refactor(runtime): own teleport destination correlation 2026-07-26 17:52:34 +02:00
StreamingCompletionQueueTests.cs fix(streaming): preserve portal destination ownership 2026-07-25 08:35:12 +02:00
StreamingControllerReadinessTests.cs test(streaming): respect retained retirement barrier 2026-07-26 12:32:32 +02:00
StreamingFrameControllerTests.cs feat(runtime): C3c - production placement cutover: both hosts on the residence conductors (routes 1+8) 2026-08-02 18:10:33 +02:00
StreamingWorkBudgetTests.cs fix(streaming): preserve portal destination ownership 2026-07-25 08:35:12 +02:00
TeleportLandblockTransitionTests.cs fix(world): remove non-retail portal exit fade 2026-07-15 23:20:52 +02:00
WorldGenerationQuiescenceTests.cs refactor(runtime): acknowledge exact world host projections 2026-07-26 18:27:41 +02:00
WorldRevealCoordinatorTests.cs refactor(runtime): acknowledge exact world host projections 2026-07-26 18:27:41 +02:00
WorldRevealReadinessBarrierTests.cs test(streaming): expose world reveal lifecycle 2026-07-20 22:32:23 +02:00