refactor(render): detach packed pview product from production

This commit is contained in:
Erik 2026-08-31 04:10:10 +02:00
parent ef12170a3c
commit c9fb7e7d4c
4 changed files with 54 additions and 180 deletions

View file

@ -43,12 +43,7 @@ public sealed class FrameRootCompositionTests
IReadOnlyList<CompiledCall> calls = CompiledCallGraph.Read(compose);
int resources = CallIndex(calls, typeof(RenderFrameResourceController), ".ctor");
int comparison = CallIndex(
calls,
typeof(RenderSceneShadowComparisonController),
".ctor",
resources + 1);
int scene = CallIndex(calls, typeof(WorldSceneRenderer), ".ctor", comparison + 1);
int scene = CallIndex(calls, typeof(WorldSceneRenderer), ".ctor", resources + 1);
int automation = CallIndex(
calls,
typeof(WorldLifecycleAutomationController),

View file

@ -197,95 +197,6 @@ public sealed class RetailPViewPassExecutorTests
});
}
[Fact]
public void DrawInside_production_product_supplies_the_ordered_entity_routes()
{
// Campaign FW3.2b-2: no cell-static entity here (adjudicated
// 2026-08-30) — CellStatic no longer flows through the packed
// product at all (WalkFrameDriver owns every cell static now, via
// OrderedDrawStream, not this route); a static entity registered on
// the LEGACY side with nothing on the packed side would report a
// permanent MismatchCount, which is not what this test is proving.
// The route-consumption-order assertion below still exercises the
// one route that DID survive the cutover (DynamicLast).
LoadedCell interior = InteriorWithExit(0xA9B40100u);
WorldEntity dynamic = Entity(
31u,
serverGuid: 0x80000031u,
parentCellId: interior.CellId);
uint landblockId = interior.CellId & 0xFFFF0000u;
var oracle = new CurrentRenderSceneOracle();
using var shadow = new RenderSceneShadowRuntime(
RenderSceneGeneration.FromRaw(1));
RenderProjectionRecord dynamicRecord =
RenderProjectionRecordFactory.ProjectEntity(
LiveRenderProjectionJournal.ProjectionId(dynamic.Id),
RenderProjectionClass.LiveDynamicRoot,
RenderOwnerIncarnation.FromRaw(dynamic.Id),
landblockId,
interior.CellId,
dynamic,
spatiallyVisible: true);
shadow.Journal.Register(in dynamicRecord);
shadow.DrainUpdateBoundary();
var product = new RenderScenePViewFrameProductController(
shadow,
oracle);
var renderer = new RetailPViewRenderer(oracle, product);
using var executor = new RecordingExecutor();
renderer.DrawInside(
Frame(interior, [dynamic]),
executor);
AssertAppearsInOrder(
string.Join('|', executor.Operations),
"entity-frame-begin",
"entity-route:DynamicLast:0:00000000",
"entity-frame-complete");
Assert.Equal(0, product.Snapshot.MismatchCount);
Assert.Equal(
product.Snapshot.ExpectedDigest,
product.Snapshot.ActualDigest);
}
[Fact]
public void DrawInside_production_product_uses_retained_routes_without_legacy_partition_when_diagnostics_are_disabled()
{
LoadedCell interior = InteriorWithExit(0xA9B40100u);
WorldEntity dynamic = Entity(
32u,
serverGuid: 0x80000032u,
parentCellId: interior.CellId);
uint landblockId = interior.CellId & 0xFFFF0000u;
using var shadow = new RenderSceneShadowRuntime(
RenderSceneGeneration.FromRaw(1));
RenderProjectionRecord dynamicRecord =
RenderProjectionRecordFactory.ProjectEntity(
LiveRenderProjectionJournal.ProjectionId(dynamic.Id),
RenderProjectionClass.LiveDynamicRoot,
RenderOwnerIncarnation.FromRaw(dynamic.Id),
landblockId,
interior.CellId,
dynamic,
spatiallyVisible: true);
shadow.Journal.Register(in dynamicRecord);
shadow.DrainUpdateBoundary();
var product = new RenderScenePViewFrameProductController(shadow);
var renderer = new RetailPViewRenderer(null, product);
using var executor = new RecordingExecutor();
renderer.DrawInside(Frame(interior, [dynamic]), executor);
AssertAppearsInOrder(
string.Join('|', executor.Operations),
"entity-frame-begin",
"entity-route:DynamicLast:0:00000000",
"entity-frame-complete");
Assert.Equal(0uL, product.Snapshot.ComparisonCount);
Assert.Equal(1, product.Snapshot.ActualCandidateCount);
}
[Fact]
public void DrawInside_interior_root_executes_the_nearby_building_look_in_punch()
{