feat(rendering): port retail building degrade walk

Add exact retail building degrade selection, shared FPS/degrade ownership, complete-body gating, selected-shell submission, ordinary ladder mesh residency, frame-scoped retry rearm, Config controls, installed-DAT census, and lifecycle/allocation proofs.

Reviews: OpenAI retail pass 3 PASS; OpenAI production pass 5 PASS. Gates: Release 0W/0E; focused 285/285; hermetic 16811/16811; InstalledDat 469 pass, 10 documented fail, 1 documented skip; both manifests 30/30.
This commit is contained in:
Erik 2026-09-04 22:29:13 +02:00
parent d0f45f6a99
commit c673f767e9
41 changed files with 1829 additions and 167 deletions

View file

@ -1036,6 +1036,7 @@ public sealed partial class WalkFrameDriverTests
var building = new WalkBuilding
{
PositionCellId = 0xA9B4000Fu,
GfxObjId = (uint)shellGfxObj,
Portals =
[
new WalkBldPortal
@ -1139,6 +1140,36 @@ public sealed partial class WalkFrameDriverTests
Assert.Equal(3, mdiCalls.Sum(c => (int)c.DrawCount));
}
[Fact]
public void BuildingShellTurnAllowsEmptyRecordButFailsLoudOnDuplicateAnchorRecords()
{
using var fx = new DispatcherFixture();
var building = new WalkBuilding
{
PositionCellId = 0xA9B40001u,
GfxObjId = 0x01000001u,
};
var selected = new WalkBuildingSelection(
building.GfxObjId, null, 0, 1u);
var world = new FakeWorldData();
var driver = new WalkFrameDriver(
fx.Dispatcher, new RecordingLeafRenderer([]), world);
driver.BeginFrame(new TestContext(), Matrix4x4.Identity, Vector3.Zero);
((IWalkEventSink)driver).OnBuildingShellTurn(building, selected);
RenderProjectionRecord record = MakeRecord(
301, 0, Vector3.Zero,
[new MeshRef(building.GfxObjId, Matrix4x4.Identity)],
isBuildingShell: true);
world.ShellByBuilding[building] = new WalkFrameStaticRecords(
new[] { record, record with { Id = RenderProjectionId.FromRaw(302) } },
0xA9B4u);
InvalidOperationException error = Assert.Throws<InvalidOperationException>(
() => ((IWalkEventSink)driver).OnBuildingShellTurn(building, selected));
Assert.Contains("expected at most one", error.Message, StringComparison.Ordinal);
}
// ── S4-c1 C1/T2 (quantifier corrected at fix round 1 F1): DrawPortalPoly
// Internal's degenerate-input guard, ported at the punch-fan producer
// (WalkFrameDriver.OnPunchGeometry — the handler that owns the LOCAL