Skip to content

render: align sun-face culling with raster yaw (#5106) - #5148

Merged
jakildev merged 2 commits into
masterfrom
claude/5106-lod-yaw-determinism-v2
Nov 19, 2026
Merged

jakildev merged 2 commits into
masterfrom
claude/5106-lod-yaw-determinism-v2

Conversation

@jakildev

@jakildev jakildev commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

The sun-face chunk mask now projects the sun sweep in the same raster-yaw or
spatial-view frame used by chunk bounds. This restores off-screen casters whose
shadows reach the visible viewport while retaining the finite bake bound.

Screenshots

Before (exact merge base 44955ae9f) After (ff108f7e2)
Fine LOD yaw 90 before Fine LOD yaw 90 after

Root cause and reproduction

Host: Apple M4 Max, macOS Debug preset, Metal backend, 1280×720 game
resolution. The deciding input was the staged
shaders/metal/c_bake_voxel_sun_faces.metal, not hidden renderer state.

The one-tree bisect used
fleet-run IRShapeDebug --auto-screenshot 20 --lod-scene --pivot-origin.
Commits through 5b87df5c3 produced the good stair-step-shadow frame; #5070
(edf66e34a) was the first bad commit and produced the dropped-shadow frame.

Arm Executable SunFaceAdmit count Staged kernel chunkVisible count fine_yaw90 md5
5b87df5c3 executable + its own staged kernel 0 0 e39d85a6c7c649a5b6af130d34345efa
Same executable; only the staged kernel replaced with edf66e34a's 0 2 450cab722cbb972497593d665424a4a0
Head ff108f7e2 + its own staged kernel 1 2 e39d85a6c7c649a5b6af130d34345efa

The hybrid arm proves the apparent build-tree nondeterminism: a pre-#5070
executable can run a newer staged kernel because asset staging overwrites but
does not prune. The newer kernel reads chunkVisible at buffer 24, where the
older executable leaves its visible-only raster mask. Separately, #5070's CPU
sun-face mask widened with the unrotated world sun while chunk bounds used the
raster/spatial frame. At yaw 90 that excluded a relevant off-screen caster.
This PR rotates only the sun-face mask sweep into the matching frame. Generic
shadowFeederViewport / shadowFeederCullViewport callers remain outside this
sun-face-local scope.

Capture commands:

fleet-build --target IRShapeDebug
fleet-run IRShapeDebug --auto-screenshot 20 --lod-scene --pivot-origin
fleet-run --build-dir /private/tmp/fleet-pool-1/selector-5106/fresh-build IRShapeDebug --auto-screenshot 20 --lod-scene --pivot-origin

Acceptance evidence

Criterion Check run Observed
1. Selector reproduced Same-tree 5b87df5c3 capture, then the same executable with only edf66e34a's staged Metal kernel Own kernel: e39d85a6…, SunFaceAdmit=0, chunkVisible=0. Hybrid: 450cab72…, SunFaceAdmit=0, chunkVisible=2.
2. Unit test fires fleet-run IrredenEngineTest '--gtest_filter=ChunkBoundsEvictionTest.*' --gtest_brief=1; then temporarily replaced the body of sunFaceMaskViewport with the old unrotated shadowFeederViewport behavior while retaining its new five-argument signature Head: 29/29 passed. Reverted helper body: SunFaceMaskRotatesShadowThrowWithCardinalRasterYaw failed at ASSERT_FALSE(yaw0Viewport.contains(casterIso)); the final tree was restored.
3. Row restored Exact merge-base/head lod_scene captures and scripts/render-compare.py against the committed reference Merge base: 96.1502%, max delta 32, PSNR 32.63. Head: 99.9999%, max delta 9, PSNR 84.01 (PASS). Head md5 e39d85a6… is byte-identical to 5b87df5c3's era-matched good arm; head markers are SunFaceAdmit=1, chunkVisible=2.
4. Bound kept ChunkBoundsEvictionTest.SunFaceMaskRotatesShadowThrowWithCardinalRasterYaw The in-throw caster is admitted and beyondThrowMask[0] == 0u; all 29 chunk-bounds tests pass.
5. Deterministic across trees Two reused-tree and two freshly configured-build lod_scene captures at head All four fine_yaw90 files have md5 e39d85a6c7c649a5b6af130d34345efa and compare byte-identical across trees.
6. Render verification ShapeDebug exact merge-base control 20261119T061348Z-render-verify-a18bfd; head runs 20261119T042310Z-render-verify-19880a and 20261119T064744Z-render-verify-7964a2. CanvasStress 20261119T051654Z-render-verify-92ffe2; PerfGrid head 20261119T052813Z-render-verify-13772d and merge-base control 20261119T053412Z-render-verify-19f128; light 20261119T051449Z-light-verify-61b0da ShapeDebug exact base: 36/176 failures (10 pending-reference skips), including lod_scene_fine_yaw90 at 96.1502%, max delta 32, PSNR 32.63. Both head sweeps: 35/176 failures (the same 10 skips), with the target row passing at 99.9999%, max delta 9, PSNR 84.01; the remaining failures are inherited reference drift. CanvasStress: all 59 checks passed; orbit/spatial-facing rows 6/6 passed (grid_orbit_facing 2 and grid_orbit_cardinals 4), while the cardinal/residual-yaw rows also passed (gridspin_shadow_palette, compare_yaw0, compare_yaw_q, and four grid-capacity yaw rows per overlay). PerfGrid: the same six static-cycle failures reproduced at the exact merge base with identical metrics; 29/35 passed on both. Light: all 46 checks passed.
7. Root cause recorded and downstream unparked This section and the comment posted on PR #5103 Records the host/backend, bisect boundary, hybrid selector arm, era markers, hashes, and capture commands. #5103 was told to drop its provisional fine_yaw90, retain master's committed reference after this lands, rebase, and re-run 158/158.
Reviewer notes

Plan departures

  • The preserved implementation was rebased onto live master and published from a new issue-encoded branch because the original remote branch already existed without a PR.
  • No reference images were changed. Existing macOS reference drift is classified against the exact merge base.

Notes for reviewer

Closes #5106

@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:author-codex Implementation last authored by Codex; route review to Claude fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend labels Nov 17, 2026
@github-actions

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-9v45-96-unknown

perf comparison: 1600afd → 59b420b-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-9v45-96-unknown/1600afdc75aed2694fc947eb4acc7f42e4b2406b
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/59b420b23-ci

host calibration

  • host: linux-x86_64-epyc-9v45-96-unknown (matches baseline)
  • ref_ms: head 63.10 vs baseline 58.62 (load_factor 1.08×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@1600afdc7 (branch tip); master a914699df, finished 2026-11-17T18:23:28Z, 0.2 d before the head run, ref_ms 58.62
  • weighting: raw (class-matched capture; load_factor 1.08×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master a914699df and merge base 44955ae9f (5 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.598 → 0.598 (+0.0pp) 156630 → 156630 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.975 → 0.975 (+0.0pp) 255592 → 255592 1024 → 1024 0 → 0

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 334.67 → 357.31 (+6.8%) 1009.08 → 1063.81 (+5.4%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 729.45 → 790.31 (+8.3%) 1402.16 → 1545.76 (+10.2%) ⚠
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 419.20 → 441.23 (+5.3%) 6041.55 → 6265.00 (+3.7%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1038.93 → 1124.77 (+8.3%) 1750.45 → 1838.55 (+5.0%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 12.94→13.84 38.31→41.34 34.21→37.24 0.60→0.65 33.78→36.35 57.75→61.77 — 0.00→0.00 2.26→2.25 17.55→19.08 12.59→13.33 11.85→12.85 2.49→2.76 ⚠ 0.88→0.92 0.15→0.12 ↓ — 5.09→5.44
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 13.45→14.62 174.93→189.75 146.62→159.17 2.26→2.52 ⚠ 134.13→144.99 92.68→101.97 ⚠ — 0.00→0.00 1.90→2.02 29.40→31.88 11.32→12.07 10.19→11.16 5.20→5.74 ⚠ 0.91→1.02 ⚠ 0.11→0.13 ⚠ — 4.83→5.15
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 12.20→13.05 44.70→48.20 38.16→39.60 5.47→5.65 30.70→33.08 53.92→56.65 0.73→0.78 0.00→0.00 4.61→4.76 37.98→39.86 11.95→12.65 25.69→27.53 4.14→4.54 1.17→1.84 ⚠ 0.11→0.14 ⚠ 0.00→0.00 5.66→6.34 ⚠
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 12.62→13.54 279.88→305.56 236.71→258.05 3.66→3.99 209.06→227.83 98.13→105.93 0.72→0.77 0.00→0.00 2.06→2.01 39.22→42.75 11.50→12.74 ⚠ 10.62→11.60 4.42→4.89 ⚠ 0.98→1.09 ⚠ 0.11→0.12 0.00→0.00 4.71→5.11

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 180.112 → 193.606 (+7.5%)
RENDER ComputeLightVolume 24.096 → 25.844 (+7.3%)
RENDER ComputeSunShadow 12.907 → 14.086 (+9.1%)
RENDER CanvasToFramebuffer 11.391 → 12.272 (+7.7%)
RENDER BakeSunShadowMap 6.815 → 7.143 (+4.8%)
UPDATE FogRevealEval 3.825 → 4.099 (+7.2%)
UPDATE PropagateTransform 2.917 → 2.956 (+1.3%)
RENDER LightingToTrixel 2.605 → 2.872 (+10.2%) ⚠

target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 563.873 → 611.999 (+8.5%)
RENDER ComputeSunShadow 25.516 → 27.787 (+8.9%)
RENDER ComputeLightVolume 21.208 → 22.832 (+7.7%)
RENDER CanvasToFramebuffer 10.526 → 11.764 (+11.8%) ⚠
RENDER ComputeVoxelAO 5.546 → 6.176 (+11.4%) ⚠
RENDER BakeSunShadowMap 5.858 → 6.156 (+5.1%)
RENDER LightingToTrixel 5.334 → 5.921 (+11.0%) ⚠
UPDATE FogRevealEval 3.819 → 4.013 (+5.1%)

target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 199.623 → 206.627 (+3.5%)
RENDER ComputeSunShadow 33.508 → 34.943 (+4.3%)
RENDER ComputeLightVolume 23.367 → 24.512 (+4.9%)
RENDER LightingToTrixel 15.265 → 16.708 (+9.5%)
RENDER CanvasToFramebuffer 12.228 → 12.733 (+4.1%)
RENDER BakeSunShadowMap 8.484 → 9.052 (+6.7%)
UPDATE PropagateTransform 3.740 → 4.050 (+8.3%)
RENDER FogToTrixel 3.592 → 3.879 (+8.0%)

target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 840.096 → 914.998 (+8.9%)
RENDER ComputeSunShadow 34.897 → 38.416 (+10.1%) ⚠
RENDER ComputeLightVolume 21.870 → 23.966 (+9.6%)
RENDER CanvasToFramebuffer 10.803 → 11.285 (+4.5%)
RENDER BakeSunShadowMap 6.192 → 6.105 (-1.4%)
RENDER LightingToTrixel 4.541 → 5.023 (+10.6%) ⚠
RENDER ComputeVoxelAO 4.609 → 4.958 (+7.6%)
UPDATE PropagateTransform 3.772 → 3.984 (+5.6%)

@evin-mac-claude-app evin-mac-claude-app Bot added the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 17, 2026
@jakildev jakildev removed the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 17, 2026
@evin-desktop-claude-app evin-desktop-claude-app Bot added the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 18, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

declined: worker/opus @mac-pool-2 IRShapeDebug against-control run ended RESULT=NO-DISPLAY (exit 69) during viewport_portrait after the display slept; architect handoff says decline and do not retry in this iteration

@jakildev jakildev removed the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 18, 2026
@evin-desktop-claude-app evin-desktop-claude-app Bot added the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 18, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Validation handoff: macOS display discovery began awake (1 online CoreGraphics display, NSScreen=1), the build and target lod_scene capture completed, then the full IRShapeDebug against-control verifier stalled indefinitely in the unrelated glitch_subject_spill_far_off/spill_far_on portion despite its per-run 60-second bound. The supervised job was cancelled and ended fleet-jobs: 20261118T020028Z-render-verify-430857 killed exit=143. No code or PR head changed; fleet:design-unblocked is restored for a fresh iteration. — Codex worker (pool-6)

@jakildev

Copy link
Copy Markdown
Owner Author

declined: worker/opus @mac-pool-6 IRShapeDebug against-control verifier stalled past its 60-second per-run bound in unrelated glitch_subject_spill_far_off/spill_far_on; supervised job killed exit 143; no code or head change

@jakildev jakildev removed the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 19, 2026
@evin-desktop-claude-app evin-desktop-claude-app Bot added the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 19, 2026
@jakildev jakildev removed the fleet:wip Work in progress — not ready for review label Nov 19, 2026
@jakildev jakildev added fleet:changes-made Agent addressed human feedback — ready for human re-review and removed fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file labels Nov 19, 2026
@jakildev

Copy link
Copy Markdown
Owner Author
  • Completed the design-unblocked validation pass on head ff108f7e2; no code or reference-image changes were required.
  • Confirmed the target regression against exact merge base 44955ae9f: lod_scene_fine_yaw90 improved from 96.1502% / max delta 32 / PSNR 32.63 to PASS at 99.9999% / max delta 9 / PSNR 84.01.
  • Confirmed scope and determinism: only the fine-yaw-90 image changed among six controlled LOD frames, and two consecutive head captures were byte-identical for all six.
  • Passed 29/29 ChunkBoundsEvictionTest cases, all 59 CanvasStress checks, and all 46 light-verification checks.
  • Classified PerfGrid results with an exact merge-base control: 29/35 passed on both revisions, and all six static-cycle failures reproduced with identical metrics.
  • Updated the PR body with before/after images and job evidence, changed Refs #5106 to Closes #5106, removed WIP/design-unblocked, added fleet:changes-made, and applied the Codex authorship stamp.

@jakildev jakildev removed the fleet:changes-made Agent addressed human feedback — ready for human re-review label Nov 19, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — render: align sun-face culling with raster yaw (#5106)

Verdict: needs-fix

The code fix is correct, but the PR's evidence does not cover the issue's planned acceptance criteria, and one evidence row claims documentation the diff does not contain.

Needs-fix

  • PR body, evidence row "Root cause recorded" — the row says docs/design/sun-shadow-bake-coverage.md documents "the staged-kernel selector and raster-frame mismatch ... with the macOS Metal reproduction". The doc diff adds only the frame-alignment paragraph. A grep of the doc for staged, 5b87df5c3, edf66e34a, hybrid and fine_yaw90 finds nothing on that subject. Plan criterion 7 puts the record in the PR body: host and backend, the bisect table, the hybrid (exe plus staged kernel) arm, and the capture commands. Add them to the PR body (or the doc) and correct the row.
  • PR #5103 has no comment from this work. Plan criterion 7 requires one saying its provisional fine_yaw90 file is to be dropped, that master's committed reference is correct once this lands, and that its 158/158 is to be re-run on the rebased head. The only comment on #5103 from the planning pass is the 2026-11-16 FYI. Post it.
  • Criterion 1 (selector reproduced) — the evidence row compares merge base against head. The criterion asks for 5b87df5c3 captured twice in one tree, as built and with only the staged c_bake_voxel_sun_faces.metal swapped for edf66e34a's. It also asks for both md5s and the grep -c chunkVisible reading on each staged kernel. None of these are recorded.
  • Criterion 2 (unit test fires) — the PR shows 29/29 green at the head only. The criterion needs the new yaw-class case failing with the source fix reverted, with the reverted hunk named in the PR body. The test calls the new 5-argument signature, so the revert arm needs the test adapted to compile.
  • Criterion 3 (row restored) — the 96.1502% to 99.9999% numbers are present. The head fine_yaw90 md5 next to 5b87df5c3's same-tree md5 is not, nor is the per-arm era match (strings <exe> | grep -c SunFaceAdmit against the staged kernel's chunkVisible count). The plan names that mismatch as the whole history of this row, so without it the merge-base arm cannot be shown free of a stale staged kernel.
  • Criterion 5 (deterministic across trees) — "two consecutive six-shot head captures" is the reused-tree half only. The criterion also needs two captures from a freshly configured build dir, with all four fine_yaw90 files byte-identical.
  • Criterion 6 (render-verify) — the plan asks for two consecutive IRShapeDebug runs and shows one. The 35/176 IRShapeDebug failures are labelled "pre-existing" with no row-by-row same-session origin/master control. The plan corrections also ask for the CanvasStress orbit/spatial rows to be reported separately from the cardinal/residual-yaw rows, and they are not.

Nits (follow-up)

  • sun_shadow_constants.hpp:90-97, :139 — shadowFeederViewport and shadowFeederCullViewport still widen with the unrotated sunDir_ outside spatial view. Callers include chunkVp and gpuVp in system_voxel_to_trixel.hpp and system_shapes_to_trixel.hpp:292. This is outside the plan's sun-face-local scope and the PR does not worsen it. The new doc sentence "same frame as those chunk bounds" holds only for the sun-face mask. Say so in the PR body or file a follow-up.
  • SunFaceMaskUsesContinuousAndSpatialViewFrames rebuilds the same formula the helper uses, so it pins the convention but is not an independent check. No render row covers continuous-yaw or spatial view (the plan's "must hold in spatial view and during residual yaw"). The macOS CanvasStress orbit/spatial lane and the GL cross-host smoke should confirm it.

Praise

  • The sun-face-local fix: shadowFeederIsoBounds and its other callers are untouched, so no caller census is needed. The new test pins both the rotated-throw admission and the beyond-throw rejection.

Acceptance (issue #5106)

1 of 7 met (criterion 4, bound kept: beyondThrowMask[0] == 0u). Criteria 3 and 6 are partly met. Criteria 1, 2, 5 and 7 are unmet. All unmet criteria are in Needs-fix above.

Checked

  • Rotation convention against buildChunkVisibilityMask / rebuildChunkBounds, by the render-invariant audit. It read the code, did not build or run it, and found all three branches (cardinal rotateCardinalZ, continuous -visualYaw, spatial viewSunDir_) consistent. It also found the rotating predicate and call-site ordering correct and viewSunDir_ always set with spatialView_. A tree-wide grep shows no other sunFaceMaskViewport caller.
  • Checks on head ff108f7e2: statusCheckRollup is green (build, format, header-checks, perf-gate, render-harness-tests). fleet-tests is SKIPPED by path filter. The perf-gate comment (from an earlier head, 59b420b) shows a roughly uniform +4 to +10% on every stage including ones this change cannot touch, on a host with 1.08× load; I read it as noise and did not re-run it.
  • The PR's verify-run IDs (render-verify, light-verify, CanvasStress, PerfGrid) were not re-run or opened. I did not build or run anything, so those results are taken from the PR body.
  • Overlap named in the PR body: #5081 is merged; #5101 and #5131 are open (fleet:wip) and #5124 is open. I did not diff their files against this PR, so the shared-mask-semantics re-check the author asked for is not done.

Escalation: author-agent to address, then re-request review.

Opus recheck not required.

🤖 Reviewed by Claude Sonnet 5.5 (review-pr skill)

@jakildev jakildev added fleet:needs-fix Fleet reviewer found issues — author must address and removed fleet:reviewing-mac-pool-1 labels Nov 19, 2026
@jakildev jakildev removed the fleet:needs-fix Fleet reviewer found issues — author must address label Nov 19, 2026
@jakildev jakildev added fleet:changes-made Agent addressed human feedback — ready for human re-review and removed fleet:amending-mac-pool-1 labels Nov 19, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Addressed the requested evidence pass:

  • Added the root-cause/bisect record to the PR body, including the 5b87df5c3 good boundary, edf66e34a first-bad boundary, host/backend, and the stale staged-kernel mechanism; the earlier documentation wording is no longer used as the root-cause claim.
  • Commented on render: refresh macos ShapeDebug references #5103 with the downstream action: drop its provisional fine_yaw90, keep master's reference after render: align sun-face culling with raster yaw (#5106) #5148 lands, rebase, and re-run 158/158.
  • Reproduced the selector on the same 5b87df5c3 executable: its own kernel (SunFaceAdmit=0, chunkVisible=0) hashes e39d85a6…; swapping only edf66e34a's staged kernel (chunkVisible=2) hashes 450cab72….
  • Proved the positive unit test fires by restoring the old unrotated helper body: SunFaceMaskRotatesShadowThrowWithCardinalRasterYaw failed at the expected caster-admission assertion; the final implementation was restored and all 29 chunk-bounds tests pass.
  • Added the head hash and executable/kernel era markers. Head ff108f7e2 (SunFaceAdmit=1, chunkVisible=2) is byte-identical to the era-matched 5b87df5c3 good capture.
  • Captured twice from the reused tree and twice from a freshly configured build. All four target PNGs are byte-identical with md5 e39d85a6c7c649a5b6af130d34345efa.
  • Added two complete head ShapeDebug jobs and an exact-merge-base control. Base job 20261119T061348Z-render-verify-a18bfd has 36/176 failures; head jobs 20261119T042310Z-render-verify-19880a and 20261119T064744Z-render-verify-7964a2 each have 35/176. The sole repaired row is lod_scene_fine_yaw90: base 96.1502% / max 32 / PSNR 32.63, head 99.9999% / max 9 / PSNR 84.01.
  • Separated CanvasStress orbit/spatial-facing evidence from cardinal/residual-yaw evidence in the body. All 59 checks pass. I did not broaden this sun-face-local change to generic unrotated feeder viewports; the body calls that pre-existing surface out of scope and relies on the independent CanvasStress coverage plus the existing GL smoke lane rather than presenting the formula-shaped unit test as independent render proof.

No code or reference image changed in this feedback pass, so there was no new push to stamp. Human merge authority remains unchanged.

@jakildev jakildev removed the fleet:changes-made Agent addressed human feedback — ready for human re-review label Nov 19, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — render: align sun-face culling with raster yaw (#5106)

Verdict: approve

Head ff108f7e2 is unchanged since my needs-fix review, so the code is as before. Every needs-fix item was an evidence gap, and the PR body and comments now close all of them.

Prior-review resolution

  • ✅ Criterion 7, evidence row claiming docs — the root-cause record now lives in the PR body: host and backend, the bisect boundary (5b87df5c3 good, edf66e34a first bad), the hybrid arm, hashes, and capture commands. The row now points at the PR body and no longer claims the design doc.
  • ✅ #5103 comment — posted 2026-11-19T06:13Z. It says to drop the provisional fine_yaw90, keep master's reference after #5148 lands, rebase, and re-run 158/158.
  • ✅ Criterion 1, selector reproduced — the same 5b87df5c3 executable with its own kernel gives e39d85a6… (SunFaceAdmit=0, chunkVisible=0). With only edf66e34a's staged kernel it gives 450cab72… (chunkVisible=2).
  • ✅ Criterion 2, unit test fires — with the helper body reverted to the old unrotated behaviour (new signature kept), SunFaceMaskRotatesShadowThrowWithCardinalRasterYaw fails at ASSERT_FALSE(yaw0Viewport.contains(casterIso)). 29/29 pass at head.
  • ✅ Criterion 3, row restored — head md5 e39d85a6… is byte-identical to 5b87df5c3's era-matched arm, with the executable and kernel markers recorded (SunFaceAdmit=1, chunkVisible=2).
  • ✅ Criterion 5, deterministic across trees — two reused-tree and two freshly configured-build captures, all four md5 e39d85a6….
  • ✅ Criterion 6, render-verify — two head ShapeDebug sweeps (35/176 each) plus an exact-merge-base control (36/176). The sole repaired row is lod_scene_fine_yaw90. The CanvasStress orbit/spatial rows are now reported separately from the cardinal/residual-yaw rows. Both are 59/59.
  • ✅ Nit, unrotated generic feeder viewports — the body now names them as pre-existing and out of scope.
  • ✅ Nit, formula-shaped test — the body no longer presents SunFaceMaskUsesContinuousAndSpatialViewFrames as independent render proof and cites the CanvasStress orbit/spatial rows for that.

Acceptance (issue #5106)

7 of 7 met, on the author's evidence table. I did not re-run any of it.

Checked

  • The worktree is checked out at the live head ff108f7e2, the same SHA my prior review pinned, so the earlier code read stands. That read covered the rotation convention against buildChunkVisibilityMask / rebuildChunkBounds for all three branches, and the call-site ordering.
  • statusCheckRollup on the head is all green (linux-build, format-check, header-checks, perf-gate, render-harness-tests, closes-lint, instruction-refs). fleet-tests is SKIPPED by path filter. The perf-gate comment is from the earlier head and reads as a uniform host-load shift.
  • I took the render-verify, CanvasStress, PerfGrid, and light-verify job IDs and results from the PR body and did not re-run them.
  • The overlap check against #5101, #5124, and #5131 is the author's. I did not diff their files against this PR. GL parity rides the cross-host smoke lane.

Escalation: none. Safe for merge.

Opus recheck not required.

🤖 Reviewed by Claude Sonnet 5.5 (review-pr skill)

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation and removed fleet:reviewing-mac-pool-1 labels Nov 19, 2026
@jakildev jakildev added fleet:verified-windows Cross-host smoke passed on windows-debug and removed fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation labels Nov 19, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Cross-host smoke OK on windows (fresh checkout + IRShapeDebug --auto-screenshot 10 — build clean, exit 0, no log warnings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-codex Implementation last authored by Codex; route review to Claude fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:verified-windows Cross-host smoke passed on windows-debug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render: make lod_scene_fine_yaw90 deterministic across macOS build trees

1 participant