Repository navigation
first_light: honor explicit minimum coverage on recheck - #3751
Desamodeth wants to merge 3 commits into
Conversation
|
Second check on Windows at NaN, both infinities, and values below zero or above one exited 2 on this head before launching the stub. These checks used synthetic bytes and a stub harness. The GPU measurements are from the author's run. AI-assisted. |
kacper-serewis
left a comment
There was a problem hiding this comment.
At 00097b9 a 4/16 synthetic draw passed the explicit 0.25 boundary, failed at 0.250001, and used the saved 0.3 when omitted. Failed runs preserved the manifest byte for byte. Nonfinite arguments exited 2 before the harness. 19 suite tests passed and three skipped. CPU CLI review, AI-assisted.
|
Independent CPU review at
AI-assisted. |
AI-assisted-by: Codex Astra 6.2 High
00097b9 to
22d8c9c
Compare
|
Independent Windows check of
CPU only, with synthetic fixtures. AI-assisted. |
|
Tested 22d8c9c on Linux, CPU only: pass
AI-assisted (Devin); no game files |
|
Independent check on Windows 11 (Python 3.14.6) — CPU only, no game files, no GPU. PASS at
Checked the contract beyond the tests:
Nothing else references the flag (no |
|
Reviewed
AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Review: head 22d8c9cd5 (base 3faac557b, Windows 11)
python -I -m pytest tests/test_first_light.py -q-> 26 passed, 8 skipped, 13 subtests passedgit diff --check-> clean
Skips are environmental: LEONIDA_FIRST_LIGHT_DIR unset (3), symlink creation not permitted (4), vk_harness not built (1) — none are in the touched recheck path.
The new tests check that an explicit --min-coverage overrides only that recheck, does not change the saved manifest bytes or its min_coverage, records the used threshold under result.min_coverage, and that the next plain recheck returns to the saved value; values outside [0, 1] exit 2. A new draw still records 0.5 by default.
Verdict: pass.
AI-assisted-by: Codex Astra 6.2 High
|
Tested
No game files. AI-assisted (Claude Code). |
|
Checked the red macOS job against the job on the exact base, 561b65a8. Both fail the same two MoltenVK GPU cases, |
AI-assisted-by: Codex Astra 6.2 High
|
Merged main On Windows (MSVC 19.44 Release, RTX 5070, driver 621.24), I rebuilt the Vulkan harness and ran the same synthetic textured draw against main and this head. Both drew 288 of 1,024 pixels. Main accepted a 28.5% minimum. This head rejected 28.5%, accepted exactly 28.125%, and used the saved 28% on the next recheck. Changing the texture color still failed the color probe at the same coverage. All five First Light test files ran (66 tests, no failures, four symbolic-link subcases skipped on this Windows account). AI-assisted. |
|
Tested 205afd1 on Linux (WSL), Python 3.13: pass. Ran: Code read: moving the 0.5 / 0.2 default below the recheck branch is safe, AI-assisted review (Claude Code). |
|
Tested 205afd1 on CPU-only, Pop!_OS 24.04 LTS (Linux x86_64 7.2.15), Python 3.12.3: pass Checks run (no game files, no GPU):
Code looks clean and minimal; no issues found. AI-assisted: yes |
|
Code read of
AI-assisted (Claude Code). |
isfcrctfs
left a comment
There was a problem hiding this comment.
Read 205afd12 on Linux (CPython 3.12.16): the change is correct.
Moving the 0.5/0.2 default below the recheck branch lets an explicit --min-coverage apply to that one draw through the copied criteria dict, while the saved manifest keeps its own value and result.min_coverage records the threshold actually applied. python3.12 -I tests/test_first_light.py: 49 ran, 45 passed, 4 skipped (the LEONIDA_FIRST_LIGHT_DIR / vk_harness skips). With tools/first_light.py reverted to bf85ff70 the new recheck test fails with SystemExit not raised, so it pins the change.
I also checked the one in-repo consumer of the saved minimum: runtime/test/d3d12_first_light_test.cpp:293 reads the top-level min_coverage, which this PR deliberately leaves alone, so the D3D12 oracle is unaffected. No defect found.
AI-assisted.
|
Tested
Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047. |
BUILD-1069 (claim).
On main (
f847748c), rechecking a prepared output with--min-coverage 0.285exited 0 for a draw covering 288/1024 pixels (0.28125). The parser accepted the flag, but the recheck only consulted the manifest's saved minimum of 0.28.An explicit minimum now applies to that recheck. A successful draw records the effective threshold in
result.min_coverage; the top-level minimum still governs subsequent runs without the flag. A new preparation still defaults to 0.5. Main already rejects thresholds outside [0, 1], including nonfinite values, via #6611. This PR adds test coverage for that existing validation. Its regression test covers the explicit threshold being ignored on recheck.Tested on Windows 11 with an RTX 5070, driver 621.24, and a synthetic triangle. With the patch, the same command exits 1 at 0.285 and succeeds exactly at 0.28125. A following run without the flag uses 0.28. Also checked an older manifest with no minimum. Both First Light test files pass (22 tests), including the new regression, which failed on main. The same suite passes when combined locally with #3606 (23 tests). No game data used.
AI-assisted (Codex Astra 6.2 High).
Textured GPU recheck at
22d8c9cd. Native Windows, MSVC 19.44, RTX 5070 (621.24), Releasevk_harnessbuilt from this head. A synthetic indexed triangle sampled a fully transparent RGBA8 texture. The raw 32x32 frame contained 288 transparent green pixels and 736 clear pixels. On the same input, main (3faac557) accepted a 28.5% minimum. This head rejected it, accepted exactly 28.125%, and used the saved 28% on the next plain recheck. Switching the texture to transparent blue kept coverage identical and failed the green color probe; updating the expected color passed. All 9 targeted FirstLightTests and OracleTests passed without skips.