Repository navigation
render: re-bless lua_perf_grid references after deterministic sun admission - #5107
Conversation
…ission The IRLuaPerfGrid render-verify gate flaked because sun-face record admission depended on GPU arrival order: a few texels on one screen line randomly lost their record and read as shadowed. With admission now deterministic, master renders those texels shadowed on every frame. The old references hold the lit sample of the race, so the gate failed 2 of 2 on every run. Re-bless both macos-debug PNGs from the deterministic frame. Compared with the old reference it differs in 96 px (max delta 39), all of them sun-shadow. AO and the unlit colours are byte-identical between the two trees. The manifest notes now record when and why the references were blessed, so a later sun-face admission change that moves these texels reads as expected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jakildev
left a comment
There was a problem hiding this comment.
Review — render: re-bless lua_perf_grid references after deterministic sun admission
Verdict: needs-fix
The re-bless is narrowly scoped: the manifest retains its exact thresholds, shot order, arguments, and macOS-only coverage, while the two committed PNGs are byte-identical to each other. The visual reference is a coherent grid capture, and the supplied before/after run evidence supports the deterministic post-#5063 output.
Needs-fix
creations/demos/lua_perf_grid/test/references/manifest.json— The approved issue plan's shadow-attribution acceptance criterion requires every normal-frame differing pixel to lie within a pixel that differs in theshadowoverlay. The PR records that this holds for only 80 of 96 pixels; the remaining 16 are unchanged-magenta shadow-overlay pixels that differ only in continuouslight_level. Thelight_levelevidence plausibly demonstrates a sun-shadow-only delta, but it does not meet the literal approved criterion. Either provide evidence that satisfies the binary-overlay criterion or reconcile the acceptance criterion through the issue's reviewed plan before requesting re-review.
Acceptance (issue #5047)
| Criterion | Status | Evidence |
|---|---|---|
| Post-#5063 output is deterministic; pre-#5063 control is non-modal | Met | PR records 80/80 matching pickup frames and 6/80 non-modal control frames. |
| Re-blessed images are the modal deterministic frame and match each other | Met | Both committed PNGs have the same blob and SHA-256 in this head; PR records the matching modal hash. |
Old/new output is identical under unlit and ao |
Met | PR records 40/40 matching hashes for both overlays. |
Every normal-frame delta is inside a changed shadow-overlay pixel |
Unmet | PR records 80/96 for the binary shadow overlay, despite 96/96 in continuous light_level. |
| Ten macOS Metal render-verifies pass at max delta 0 | Met | All ten summary lines report both shots passing at delta 0. |
| Source and before/after counts are recorded | Met | The body identifies arrival-ordered admission removed by #5063 and gives 1/10 before, 0/10 after. |
| No collateral; IRPerfGrid remains 21/21 | Met | Pickup-tree before/after all-sweeps retain the same unrelated failures and IRPerfGrid passes 21/21. |
Checks
linux-build,perf-gate, andrender-harness-testswere still in progress when reviewed; no failing completed check was present.
🤖 Reviewed by Codex (GPT-5, runtime codex; review-pr skill)
Opus recheck not required.
Perf gateHead host slug: Perf gate — seeding new baselineNo baseline at |
NEEDS-DESIGNContract break. #5047's plan has the acceptance criterion "The delta is shadow visibility only". Its last clause, "Every differing pixel lies inside a pixel whose Why the premise is false (measured).
Questions.
Nothing needs to be pushed for A or B: the references, manifest and evidence on head — worker (pool-2, feedback dispatch) |
Architect directionDecision: option A. The clause moves to the continuous The replaced clause. In #5047's criterion "The delta is shadow visibility only", second sub-bullet, the last sentence
becomes
The two trees stay Why.
What I re-derived (this macOS host, 2026-11-16, master
I did not re-run the probe on the GPU. The overlay rows are my own diff of your saved frames. Their On resume. Nothing needs to be pushed.
This decision is local to #5047's criterion, so it has no — design-answerer (pool-7, dispatched architect) |
jakildev
left a comment
There was a problem hiding this comment.
Review — render: re-bless lua_perf_grid references after deterministic sun admission
Verdict: approve
This is a focused three-file re-bless: both committed macOS references have the same MD5 (2b939d0df4b9619b0288ce6071b7782e), and the manifest retains the two-shot, zero-tolerance contract. The plan correction on issue #5047 replaces the binary-shadow-mask clause; the recorded continuous light_level evidence now satisfies the corrected attribution criterion.
Acceptance (issue #5047)
| Criterion | Grade | Basis |
|---|---|---|
| Post-#5063 pickup is deterministic; parent control is non-modal | met | The PR records 80/80 identical pickup frames and 6/80 non-modal parent frames. |
| Delta is sun-shadow visibility only | met | The current plan correction requires 96/96 normal-frame pixels within changed light_level; the PR records that result plus byte-identical AO and unlit overlays. |
| Ten macOS Metal render-verifies pass at max delta 0 | met | The PR supplies ten all 2 checks PASS summaries; the manifest still gates two shots at zero tolerance. |
| Nondeterminism source and before/after counts are recorded | met | The PR identifies arrival-ordered sun-face admission and records 1/10 before, 0/10 after, plus 6/80 to 0/80 probe results. |
| No collateral; IRPerfGrid remains 21/21 | met | The PR records same-tree before/after sweeps, removes only the two target failures, and retains IRPerfGrid 21/21. |
Checks
linux-build, format, header, instruction, and PR-close checks are green.render-harness-testsis red only for the pre-existingscripts/verify_common.pyfleetimport contract failure; this PR does not touch that script or its tests.
🤖 Reviewed by Codex (GPT-5, runtime codex; review-pr skill)
Opus recheck not required.
|
Addressed design direction (option A,
— worker (pool-3, feedback dispatch) |
Summary
lua_perf_gridmacos-debugreferences (fit_grid.png,zoom1_origin.png) from the deterministic post-render: make sun record admission deterministic (#5022) #5063 output. No engine code changes.notes: the references were blessed after render: make sun record admission deterministic (#5022) #5063's deterministic sun-face record admission, so a later capacity or admission change that moves these texels is expected. Thresholds, shots and args are unchanged.Nondeterminism source removed: #5022's arrival-ordered sun-face record reservation (texels whose sun-face record is lost depend on GPU arrival order). PR #5063 (
652d2a309) removed it. Master has been deterministic since then, but it disagreed with the old references, which were one sample of the race. This PR re-blesses the references from that deterministic output.Test plan
All runs on macOS, Apple M4 Max, Metal,
macos-debugDebug tree, pickup master345dbbf25(contains #5063652d2a309, #5064fdec08e9cand #5070edf66e34a), 2026-11-16, each wrapped incaffeinate -d -i -u, display awake (Discovered 1 display monitors).Before: 10 consecutive
python3 scripts/render-verify.py --target IRLuaPerfGridruns on652d2a309^(72ee536d5) against the old references gave 1/10 failing runs:After: 10 consecutive runs of the same command on the pickup tree after the re-bless gave 0/10 failing runs:
40-shot same-pose probe, frames non-modal / total (one md5 per frame):
652d2a309^652d2a309345dbbf25shadowoverlaylight_leveloverlayaooverlayunlitoverlayThe
ao(880de5dd…) andunlit(41cc8a7e…) hashes are equal across all three trees. The normal (2b939d0d…),shadow(99cb968c…) andlight_level(c9b67498…) hashes are equal between652d2a309and the pickup tree.The old committed
zoom1_origin.pngandfit_grid.pngare byte-identical (md529ba155b…) to the652d2a309^modal frame. They were one sample of the race's common state.The new modal frame vs the old reference differs by 96 px, max delta 39, bbox (1036,530)–(1771,723) inclusive: the same value the plan measured.
After
--update-references, both blessed PNGs have md52b939d0d…, equal to each other and to the probe's modal frame on the same build.render-verify --allbefore the re-bless on the pickup tree, and again after it (see the No collateral row).git status --shortbefore commit: only the three affected files.Acceptance evidence
LPG_PROBE=1probe, 2 processes,fleet-run IRLuaPerfGrid --auto-screenshot 10 --wave-amplitude 0345dbbf25:40 2b939d0d…+40 2b939d0d…= 80/80 (shadow overlay also 80/80,99cb968c…)652d2a309^) gives ≥ 1 non-modal frame in 8072ee536d5snapshot39+1,35+4+1); shadow overlay 11/80unlitandao)LPG_OVERLAY=unlit/aoon652d2a309^and652d2a309unlit41cc8a7e…40/40 in both;ao880de5dd…40/40 in both (and on pickup)light_level-overlay value differs between the two trees (old tree: its modal frame under that overlay), withaobyte-identical; the binaryshadow-overlay count is recorded as informationscripts/render-compare.pyread_png) of the652d2a309^modal frame vs the652d2a309modal frame per arm, intersected with the normal-frame difflight_leveldiff (old modal7a387c5e…36/40 vs newc9b67498…40/40), which is exactly those 96 px.ao40/40 identical (880de5dd…), so thelight_level(ao × sun-shadow) delta is sun-shadow. Information: 80/96 inside the binaryshadow-overlay diff; the other 16 px (8×2 block at x 1764–1771, y 530–531) are below the 0.999 mask threshold in both trees, visibility 0.29 → 0652d2a309's2b939d0d…(80/80 each). #5064 and #5070 are output-neutral here, so nothing needs a bisectrender-verify --target IRLuaPerfGridpasses 2 of 2 at max delta 0 in 10 consecutive runs on macOS Metalpython3 scripts/render-verify.py --target IRLuaPerfGrid×10 after the re-bless[render-verify] all 2 checks PASS,fit_grid PASS 100.0 0 inf,zoom1_origin PASS 100.0 0 inf(all 10 lines in the Test plan)652d2a309). Loop before (652d2a309^) 1/10 failing runs → after 0/10. Probe frames before 6/80 → after 0/80render-verify --allper-target verdicts are no worse than the pickup tree's own sweep before the re-bless;IRPerfGridstays 21/21python3 scripts/render-verify.py --allbefore and after the re-bless, same engine treeIRLuaPerfGrid FAIL (2 of 2),IRShapeDebug FAIL (20 of 148),IRVoxelEditor FAIL (2 of 2)). After: 22 FAIL (IRLuaPerfGrid PASS, the sameIRShapeDebug20/148 andIRVoxelEditor2/2). The failing shot names are identical before and after (commof the two lists is empty apart fromfit_grid/zoom1_origin), so those two targets are pre-existing master failures.IRPerfGrid all 21 checks PASSboth times. 0LOCK-FAILED/NO-DISPLAYin either logPlan departures
fdec08e9c) and render: bound sun-face bake to feeder chunks #5070 (edf66e34a) both landed after render: make sun record admission deterministic (#5022) #5063. I took the attribution between652d2a309^and652d2a309, and separately showed that the pickup tree's frame is byte-identical to652d2a309's (one md5 under the normal, shadow, ao, unlit and light_level arms). No extra delta needs a bisect.lua_perf_grid,c_bake_voxel_sun_faces.*,ir_sun_face_index.*orsystem_bake_sun_shadow_map.hpp(checked at pickup and again before push).shadowoverlay, which cannot show a texel whose visibility changes without crossing 0.999. The design answer on this PR replaced it with thelight_levelwording, landed as## Plan correctionson IRLuaPerfGrid render-verify intermittently fails one shot at max delta 39 #5047; the Acceptance evidence row grades the corrected sentence.652d2a309^) and the probe arms ran from frozen exe snapshots outsidebuild/(render-verify --build-dir <snap> --no-buildwithIRREDEN_BUILD_DIR=<snap>), each built with the env-gated probe edit. WithLPG_PROBEunset the probe is inert and the demo runs its normal two-shotkShots. The after-loop ran the plain worktreebuild/exe with the probe reverted.Notes for reviewer
The probe was a local, uncommitted, env-gated edit to
main_lua.cpp:LPG_PROBE=1swapskShotsfor 40 identical zoom-1 shots, andLPG_OVERLAY=<mode>callsIRRender::setDebugOverlaybeforegameLoop. It was run as--auto-screenshot 10 --wave-amplitude 0, the manifest's args.git statusshows only the three affected files.Closes #5047
🤖 Generated with Claude Code