docs(overhaul): contract s5 c5 cleanup

This commit is contained in:
Erik 2026-09-05 04:16:26 +02:00
parent b372467cf5
commit b77989c323
2 changed files with 224 additions and 1 deletions

View file

@ -2927,3 +2927,225 @@ relight is gone; the retail-before/after frames restore, while High retains its
expected shadows and post-processing. This closes #469; no new divergence row
is required beyond the truthful IA-24 amendment. Next is S5-c5, then closeout
and G4. Nothing has merged to `main`.
## 33. S5-c5 contract — delete the superseded visibility/probe apparatus and pin the final graph
This is a deletion-and-architecture chunk. It changes no retail draw decision,
no membership result, no event order, no alpha route, no material state, and no
shader. The retained production authority is the already-reviewed
`RetailFrameWalk`/`WalkFrameDriver` path. The work removes the independently
compiled research path and output-only diagnostics that can otherwise be
mistaken for production owners.
### 33.1 Lead-verified boundary
The named Sept-2013 retail decomp has one normal-world call chain:
- `SmartBox::RenderNormalMode @0x00453AA0` calls `LScape::draw`;
- `LScape::draw @0x00506330` reaches the retained PView path;
- `PView::DrawCells @0x005A4840` owns the landscape/cell-pass boundary; and
- `PView::DrawInside @0x005A5860` constructs and draws the one PView graph.
These anchors were re-read in
`docs/research/named-retail/acclient_2013_pseudo_c.txt` at lines
92635/92683, 267912, 432709/432719, and 433793/433819. The paired executable
was re-hashed before this contract:
`C:\Users\erikn\Downloads\acclient.exe`, SHA-256
`006FFEADC5D679C871497112A5BD1F87714D0E273E2166BAE5052DDE369297B1`,
paired with `refs/acclient.pdb`, SHA-256
`B1AA774B458C7EFDED9F3BB7E1B18B31A508514D6F2089800629B1B51C154925`
(the already-verified CodeView identity is
`{9E847E2F-777C-4BD9-886C-22256BB87F32}`, age 1). The first 64 bytes at the
four executable anchors hash respectively to
`B69DF08F6B30118463B6148A09CEAF2D47F640303039912224DB4D29FCB93FC7`,
`9319B607C0505D0656935719C27E9F7C00B5281574643614A367C02C88EA7CC3`,
`16E12B476CDABE0F7CD0B1380A31EF194B00901A76D5AFB295CD0C30B4DB36CC`,
and
`DE6E16EC73EDFC04632E2C7A059AB26519099391637318805EF15AB6DBA682C4`.
Current-source reachability was also checked independently. Outside its own
file, production contains no construction or call of
`PortalVisibilityBuilder`, `PortalVisibilityFrame`, `IndoorDrawPlan`, or
`ViewconeCuller`. The only surviving `PortalVisibilityFrame` production uses
are the dead `ClipFrameAssembler.Assemble` overload and
`IndoorDrawPlan.ShellPass`; both are called only by tests. The live assembler
entry points are `BeginWalkFrame` and `ReassembleOutsideViewFromWalk`.
`RetailFrameWalk` alone retains the interior/outdoor `WalkPView` objects, and
`RetailPViewRenderer` alone retains the `RetailFrameWalk`/`WalkFrameDriver`
frame owner.
Therefore this chunk is not a new retail port. Its retail claim is narrower:
deleting an unreachable competing implementation cannot alter the one live
walk. If a compile repair would change a live walk, draw, queue, material, or
shader method, stop and return that fact instead of widening this contract.
### 33.2 C1 — remove the independently compiled portal-BFS research path
Delete these production artifacts outright:
- `Rendering/PortalVisibilityBuilder.cs`, including
`PortalVisibilityFrame` and `ExteriorPortalSeed`;
- `Rendering/IndoorDrawPlan.cs`, including `CellDrawEntry`;
- `Rendering/ViewconeCuller.cs`; and
- the `ClipFrameAssembler.Assemble(ClipFrame, PortalVisibilityFrame, ...)`
overload and its builder-only comments.
Keep `LoadedCell`, `CellVisibility`, `PortalView`/`CellView`,
`PortalProjection`, `ClipPlaneSet`, `ClipFrame`, `BeginWalkFrame`, and
`ReassembleOutsideViewFromWalk`: the current walk, portal fan, and preparation
paths still consume those primitives. Rewrite their stale comments to name the
walk rather than the deleted builder; comments must not imply the synthetic
outdoor node performs a second portal flood.
Delete old-builder-only tests rather than keeping a second implementation alive
as test code. This includes the dedicated builder/robustness/flood-replay,
`IndoorDrawPlan`, `ViewconeCullerReuse`, and `TowerAscentReplay` files, plus the
builder-only cases in mixed files. Preserve the first two live
`ClipFrameAssemblerTests` (`BeginWalkFrame` outdoor/interior reset) and every
`WalkOutsideViewReassemblyTests` case by driving `BeginWalkFrame` directly.
`OutdoorCellNodeTests` keeps its construction invariant and drops only the
deleted-builder assertion. A currently live CELLARRAY/walk assertion may be
moved to a focused file if it is unique; do not retain a builder dependency to
save a redundant diagnostic test.
### 33.3 C2 — remove obsolete renderer probes and their hidden frame cost
Delete the complete Facility stair family named by the plan:
- `RenderingDiagnostics.ProbeFacilityStairsEnabled` and the environment read;
- `WbDrawDispatcher.FacilityStairProbe.cs`;
- all Facility/cathedral signature, classifier, ordered-stream, upload, and
submission probe fields/methods/call sites in `RetailPViewRenderer`,
`WalkPView`, `WalkProductionWorldData`, `WalkStaticStreamPopulator`, and
`WbDrawDispatcher.OrderedStream/WalkClassify`; and
- the probe-only `WalkProductionWorldData.StaticBucketContains` method and
`[walk-membership]` print. Keep
`UnregisteredRenderMembershipCount` itself and its exact tests: it remains a
cheap invariant/result, not a logging owner.
The remaining renderer flags explicitly documented as throwaway, relic, or
closed-investigation probes are deleted in the same sweep:
- `ProbeIndoorWalkEnabled`, `ProbeIndoorLookupEnabled`,
`ProbeIndoorUploadEnabled`, `ProbeIndoorXformEnabled`,
`ProbeIndoorCullEnabled`, and their `IndoorAll` cascade;
- `ProbeVisibilityEnabled`/`EmitVis` and `ProbeEnvCellEnabled`;
- `ProbeFlapEnabled`, `ProbePvInputEnabled`, `ProbeGlStateEnabled`,
`ProbeClipRouteEnabled`, and `ProbePortalChurnEnabled`;
- `ProbeIndoorLightEnabled`/`EmitIndoorLight`; and
- `ProbeSeamDrawEnabled`/`SeamDrawTargetCells` and their parse/format helpers.
Remove every production output branch and scratch field used only by those
flags, including the `[flap*]`, `[pv-input]`, `[render-sig]`, `[vis]`,
`[gl-state*]`, `[clip-route*]`, `[indoor-*]`, `[envcells]`, `[light]`,
`[seam-*]`, and `[facility-*]` families. `WorldRenderDiagnostics` keeps its
terrain timing/publication responsibility but loses the dead raw-GL reader,
state/scissor records, and the obsolete render-probe methods.
`WorldSceneDiagnosticsController` keeps collision/debug-fact publication but
loses the two probe-only interface methods and the post-world GL sample.
Delete the corresponding tests and `docs/launch-options.md` rows. Historical
research/capture documents remain historical evidence and are not rewritten.
Comments in still-live production code may describe a historical capture, but
must not cite a deleted runtime flag or claim a deleted probe remains callable.
The retained diagnostics are explicit nonchanges:
`RenderingDiagnostics.LightDebugMode`, `ShouldRenderIndoor`,
`FrameProfEnabled`, and `DumpWalkTranscriptEnabled`. In particular,
`ACDREAM_DUMP_WALK_TRANSCRIPT` is the plan's one retained, typed, print-only
retail-conformance flag; c5 must not remove or weaken its existing pins.
Physics/audio/streaming probes outside the renderer cleanup inventory are also
out of scope.
### 33.4 C3 — make architecture and register prose match the landed renderer
Update `docs/architecture/acdream-architecture.md` so it states that the old
builder is deleted, not merely callerless. Replace the stale three-item
“known non-retail order” paragraph with the landed S3/S4 facts: per-landcell
terrain and sort-cell turns, outside-view/latch-gated clear+seals, and the two
bounded CLIP/ALPHA FIFO lists drained at exact barriers. Name the still-live
AP-238 through AP-243 residuals without resurrecting the superseded model.
Update `docs/architecture/worldbuilder-inventory.md` to remove the deleted
`[walk-membership]`/Facility flag claim while retaining the
`UnregisteredRenderMembershipCount` invariant and its AD-116 meaning. Amend
AD-116 accordingly in `retail-divergence-register.md`. Retire AP-19 in the
same commit because its only implementation, the deleted builder's 1 cm
epsilon, no longer exists; do not reuse its id. AP-238AP-243 remain active.
Remove stale current claims from `docs/launch-options.md`; do not erase old
research or the superseded ledger history.
### 33.5 C4 — architecture guards
Add one focused compiled/source architecture test file with these
discriminating guards:
1. the App assembly contains no `PortalVisibilityBuilder`,
`PortalVisibilityFrame`, `ExteriorPortalSeed`, `IndoorDrawPlan`,
`CellDrawEntry`, or `ViewconeCuller` type;
2. only `RetailFrameWalk` declares `WalkPView` fields and only
`RetailPViewRenderer` declares a `RetailFrameWalk` field; the renderer owns
exactly one such field;
3. the frame-time walk/renderer/submitter owner types have no raw
`DatCollection`/`IDatReaderWriter` field, property, parameter, or return
dependency. Construction-time DAT adapters such as `WalkBuildingFactory`
remain outside this frame-time list;
4. no consumer reconstructs a second portal visibility result: production
source has no banned old type/symbol and no call/new edge to a second graph
builder;
5. `WbDrawDispatcher.OrderedStream.cs` contains no `Sort`, `OrderBy`, or
equivalent cross-stream reorder; existing merge-run tests continue to prove
adjacent-only, order-preserving batching across semantic boundaries; and
6. production source contains none of the deleted probe symbols or environment
names listed in §33.3, while the retained walk transcript symbol is still
present and its flag-off and transcript-conformance tests still run.
The guards may read repository source where absence itself is the contract,
but paths are resolved from the solution root and comparisons are explicit.
Do not use brittle line numbers or broad words such as `probe`/`visibility`
that would outlaw retained production concepts.
Required mutations, each restored exactly before return:
- restore one deleted old type name: guard 1/4 fails;
- restore `ACDREAM_PROBE_FACILITY_STAIRS`: guard 6 fails;
- add a second `RetailFrameWalk` owner field: guard 2 fails;
- add `OrderBy` to `WbDrawDispatcher.OrderedStream.cs`: guard 5 fails; and
- add an `IDatReaderWriter` parameter to a listed frame-time owner: guard 3
fails.
### 33.6 Scope, gates, return, and reviews
Production edits are limited to the deleted/residual files and direct probe or
compile-fallout sites named in §§33.233.3. Test edits are limited to deleting
old research tests, preserving/adapting the named live tests, simplifying
direct probe-constructor fixtures, and adding the architecture guard.
Documentation edits are limited to this packet, the plan ledger,
`docs/launch-options.md`, the two architecture documents, the divergence
register, and Current memory. No shader, prepared-content, wire, physics,
membership, walk-order, material, or queue behavior change is allowed. If a
deletion exposes a live dependency outside these bounds, stop and report it.
Return one implementation commit with every documentation/register change in
the same commit as the deletion. Required evidence:
- `git diff --check` and a Release solution build with zero warnings/errors;
- focused architecture, walk transcript, `BeginWalkFrame`, outside-view,
ordered-stream, membership, terrain diagnostics, and directly affected
suites;
- official hermetic and canonical InstalledDat lanes, with exact
pass/fail/skip identities and SHA manifests;
- source/type absence searches for every deleted family; and
- all five mutation transcripts.
Review is sequential. Lens 1 checks retail/deletion faithfulness, retained
walk primitives, AP-19/AD-116/register truth, and absence of a second graph.
Lens 2 checks production reachability, hidden-cost removal, architecture-test
non-vacuity, order/DAT boundaries, allowed scope, and gate provenance. A
failed lens gets one bounded fix contract. Review stops only after pass 10.
After review and campaign landing, the lead runs a fresh Release/focused gate,
checks tree/ACE/client state, and performs one graphical smoke route over an
outdoor town, Facility stairs, and one interior/portal transition. It must
exit gracefully, leave no client, emit no deleted probe prefix, and record
exact PNG paths. Visual status remains provisional until the owner inspects it.