[PR #2040] Reject non-finite channels in First Light readbacks (FIRST-LIGHT-FINITE-READBACK) #2046

Open
opened 2026-11-26 21:19:51 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2040
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/first-light-finite-readback


📝 Commits (1)

  • 4171724 Reject non-finite channels in First Light readbacks

📊 Changes

2 files changed (+12 additions, -1 deletions)

View changed files

📝 tests/test_first_light.py (+9 -0)
📝 tools/first_light.py (+3 -1)

📄 Description

Claimed in the coordination issue as: FIRST-LIGHT-FINITE-READBACK

What and why

First Light checks image coverage and selected pixels. A non-finite color outside those probes can leave both checks passing and produce a successful render verdict. Reject non-finite readback channels before calculating coverage or comparing probes. The standalone preview writer still handles those values when it is used for diagnostics.

Tested

  • The new synthetic regression for an unprobed covered pixel fails with NaN and both infinities on 9f9a7c5f3, then passes with the fix.
  • python -I tests/test_first_light.py ran 49 tests with 8 environment-dependent skips. tests/test_first_light_mesh_draw.py (3 tests) and tests/test_first_light_bad_json.py (12 tests) all passed. Tested on Windows 11 with Python 3.11.17.
  • git diff --check and the source-only check passed.

GPUs tested: n/a (synthetic readbacks)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2040 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/first-light-finite-readback` --- ### 📝 Commits (1) - [`4171724`](https://github.com/ubiquitarianism/leonida/commit/4171724fb3db097f0a6ba70cccf9f8357f6d0201) Reject non-finite channels in First Light readbacks ### 📊 Changes **2 files changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_first_light.py` (+9 -0) 📝 `tools/first_light.py` (+3 -1) </details> ### 📄 Description Claimed in the coordination issue as: [FIRST-LIGHT-FINITE-READBACK](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171370282) ### What and why First Light checks image coverage and selected pixels. A non-finite color outside those probes can leave both checks passing and produce a successful render verdict. Reject non-finite readback channels before calculating coverage or comparing probes. The standalone preview writer still handles those values when it is used for diagnostics. ### Tested - The new synthetic regression for an unprobed covered pixel fails with NaN and both infinities on `9f9a7c5f3`, then passes with the fix. - `python -I tests/test_first_light.py` ran 49 tests with 8 environment-dependent skips. `tests/test_first_light_mesh_draw.py` (3 tests) and `tests/test_first_light_bad_json.py` (12 tests) all passed. Tested on Windows 11 with Python 3.11.17. - `git diff --check` and the source-only check passed. GPUs tested: n/a (synthetic readbacks) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2046
No description provided.