docs(overhaul): contract S5 c4 detail-off fix

This commit is contained in:
Erik 2026-09-05 01:47:17 +02:00
parent c47a43eb72
commit 13dbb79eeb
2 changed files with 125 additions and 2 deletions

View file

@ -2121,3 +2121,126 @@ the depth-write rule from the paired binary, inspect real production pipeline
descriptors, verify AP truth, and reproduce at least three new mutations. Only
after it passes may the full production/gate-honesty lens run over the complete
S5-c4 stack. Nothing lands or launches graphically before both lenses pass.
## 25. S5-c4 fix round 3 — restore classic/private detail-off state
### 25.1 Full production review pass 4/10
Retail/material re-review pass 3/10 returned **PASS** on clean fix-round-2 tip
`472dc4fb7fd246a6efe6ed4ed20ffc26419c9ffa`. It independently re-derived the
Clip/depth-write rule from named `D3DPolyRender::SetSurface @0x0059C4D0` and
paired bytes, inspected all ordinary/atmospheric Wb and EnvCell pipeline
descriptors, reproduced three mutations, and found no retail/material issue.
The subsequent full production/gate-honesty review returned **FAIL** on one P2
regression and no other code finding. Before c4,
`DrawImmediateTransparentRhi` always bound `pipelines.AlphaBlend` for the
classic grouped path's non-detail transparent commands and coalesced adjacent
non-detail commands without a blend-family split. C4 instead binds
`PipelineForBlend(pipelines, blend)` and adds `Translucency` equality to that
run boundary. This changes detail-disabled/unavailable Additive and InvAlpha
compositing and splits a previously coalesced run.
This is reachable production behavior, not a dead compatibility arm:
`PrivateEntityViewportRenderer.Draw` calls the classic dispatcher without a
collecting world-alpha queue, which reaches
`ExecuteClassifiedGroups -> SubmitRhi -> DrawImmediateTransparentRhi`.
The reviewer drove that exact path with detail disabled and one ordinary
instance. Additive expected `wb-mesh-alpha-1x` but recorded
`wb-mesh-additive-1x`; InvAlpha expected `wb-mesh-alpha-1x` but recorded
`wb-mesh-inverse-1x`. Each case issued exactly one physical MDI. Temporarily
changing only the false arm back to `pipelines.AlphaBlend` made both witnesses
pass, and the reviewer restored the worktree byte-exactly afterward.
The rest of the complete-stack audit passed: opacity and immutable material
state reach recipe-10 publication and every consumer; the 16-byte GPU batch
ABI, shared shaders, one-pass equations, overlay deletion, #471 ordered arm,
all five depth-write pairs, disposal/rollback, allocation, migration and
artifact provenance are sound. Restored focused suites passed App 265/265,
Content 92/92, and Launcher 8/8. The exact-tip hermetic artifact is
16,964/16,964 with manifest 32/32; InstalledDat is the unchanged documented
469 pass / 10 accepted fail / 1 accepted skip with manifest 30/30. The scratch
worktree returned clean at `472dc4fb7`.
The review also corrected the chunk boundary: c4 necessarily repairs the
**receiver half** of #470 by selecting the frame-aware atmospheric ordered
pipeline and binding its receiver resources. That is valid support for the
required atmospheric one-pass path and must remain. #470 stays open because
`mesh_modern.vert` still uses the absolute transform index for locally based
alpha/selection/light/detail sidecars. Describe #470 as narrowed at landing;
do not claim c4 left all of it untouched or closed it.
### 25.2 Bounded production repair
On top of `472dc4fb7`, restore the pre-c4 detail-off behavior in
`DrawImmediateTransparentRhi` only:
1. when the current command has no active detail material, bind
`pipelines.AlphaBlend` regardless of its `TranslucencyKind` or carried raw
SetSurface state;
2. restore the prior coalescing rule for consecutive non-detail transparent
commands: do not split a run merely because `TranslucencyKind` changes;
when detail is enabled, the next detail-bearing command remains a boundary;
3. keep each detail-active command on the exact
`PipelineForMaterial(pipelines, materialState, pipelines.Opaque)` result,
armed once on its existing physical draw, with neutral push state restored
afterward; and
4. preserve cull-run splitting inside `DrawIndirectRangeRhi`; this repair
restores only the outer material-run boundary that c4 changed.
Do not generalize this into a detail-off retail correction. AP-244 remains the
truthful disclosure for the existing detail-off Wb/EnvCell collapses. Do not
change deferred-alpha submission, ordered-stream submission, EnvCell,
extraction, recipe 10, GPU batch ABI, shaders/SPIR-V/manifest, blend enums or
pipeline construction, alpha-test/depth/fog/reference state, queue membership,
FIFO order, transforms/sidecars, lighting, allocation ownership, #469, or the
remaining #470 sidecar-index repair. In particular, retain c4's frame-aware
ordered receiver selection/bindings.
Allowed production change: only
`src/AcDream.App/Rendering/Wb/WbDrawDispatcher.Rhi.cs`. Tests may change only
in the directly affected existing Wb production-transcript suite. No register
change is expected because this restores the disclosed prior behavior; if a
new deviation or wider production dependency is discovered, stop and return
the exact fact before expanding scope. No packet, plan, issue, architecture,
package, artifact, or evidence file is changed by the implementer.
### 25.3 Discriminating proof and return
Add permanent tests through the actual classic production path, without a
collecting alpha queue:
1. with detail disabled, one Additive and one InvAlpha ordinary instance each
bind `wb-mesh-alpha-1x` and issue exactly one physical MDI;
2. with the detail category unavailable, the same two rows retain that result;
3. adjacent same-cull Alpha -> Additive -> InvAlpha detail-off commands remain
one outer material run/MDI range rather than three blend-family runs;
4. detail enabled with an eligible command still selects its exact carried
detail-active material pipeline and arms slot/tiling/reference/fog once;
5. non-detail -> detail -> non-detail adjacency does not leak detail state and
preserves the two required boundaries; and
6. existing deferred-alpha, ordered ordinary/atmospheric, EnvCell, depth-pair,
disposal/rollback, allocation, shader/ABI and recipe-10 pins remain green.
Apply and independently restore these mutations, recording the first failing
test/assertion for each:
1. restore `PipelineForBlend(pipelines, blend)` on the non-detail arm;
2. restore the `TranslucencyKind` equality run split while leaving the pipeline
arm correct; and
3. force the detail-active command onto `pipelines.AlphaBlend`.
Return one clean fix-round-3 commit atop `472dc4fb7`; exact changed-file and
line counts; mutation first failures; both `git diff --check` forms; Release
solution build 0W/0E; focused classic/private material and complete affected
Wb/EnvCell/ordered/content/launcher suites; exact-tip clean official hermetic
and inclusive InstalledDat artifacts with manifests and every accepted
nonpassing identity named. Recipe 10 is unchanged, so no bake is required. No
graphical client launch.
Because this repair restores a production-only frozen detail-off path and
changes no retail/material fact, the next review is the narrow production/
gate-honesty pass 5/10 over this finding and its non-change boundary; no new
retail lens is required. A PASS unlocks landing the complete c4 stack and its
lead graphical gate. A FAIL receives another bounded contract within the
owner-authorized ten-pass limit. Nothing lands or launches before that result.