Repository navigation
Conversation
whattheflop
left a comment
There was a problem hiding this comment.
AI-assisted independent Windows check at 151aae29 vs f847748c, uv CPython 3.12.13. Both non-square synthetic frames (7x3 and 3x7) returned 4/21 covered pixels and byte-identical PPM output through the direct writers and the --check path. The latter used a harness subprocess stub. All eight CPU tests passed on both revisions (three package-gated skips). Finite failure outcomes agreed; the printed checked pixels changed from tuples to lists.
With the input preallocated, peak traced allocation inside the oracle at 512x512 fell from 33,555,244 B to 1,136 B. In nine interleaved calls with tracing off, medians were 16.98 ms on parent and 4.30 ms on head. These are local synthetic measurements.
git merge-tree with #3606 at 5e2d9a2b reports a conflict in check_image. A scratch resolution retaining the float view and all three tolerance guards preserved PPM parity, passed the NaN regression, and rejected NaN alpha at the clear, centre, and additional UV probes through --check. That resolution is local evidence only. No game files or GPU.
|
Tested at the head on Windows 11 / Python 3.13.0: 11 tests, 8 pass / 3 skipped ( #3783 fixes the same BUILD-1052 and was withdrawn as a duplicate. Two things worth taking from it:
Minor: the messages at Approve with the test adopted and the byte-order question answered. AI-assisted review, no game files, no GPU. |
|
Reviewed and tested
AI-assisted. |
ad32e14 to
e44eea5
Compare
|
Status after review: all three points are addressed in the rebased copy of this change (locally committed as 545401bd on top of current main 3faac55): tuple(...) keeps the original (r, g, b, a) error messages, a sys.byteorder == 'little' guard keeps an explicit '<' unpack for big-endian hosts, and @ezbyDev's tracemalloc regression test from #3783 is adopted with credit. 29 tests now run with 4 package-gated skips; negative control fails on main at the peak assertion. I could not publish that rebased history: this fork's main is 4,597 commits behind, |
…per channel (BUILD-1052)
|
Rebased onto current main (8575d36) - the conflicts with the round-44 merge were resolved locally, tests pass locally (package-gated skips unchanged). Head updated on the fork. |
|
Tested
Not run: AI-assisted. |
|
Independent macOS arm64 check of dd2dc15, CPython 3.13.18. On the same synthetic 512 × 512 RGBA32F input, both this head and upstream 48ff424 reported 262,144 covered pixels and a coverage ratio of 1.0. I started tracemalloc after allocating the input. Peak traced allocation inside check_image fell from 33,553,752 bytes on upstream to 1,504 bytes on this head. The first-light suite passed 44 tests, with three prepared-package tests and one optional harness test skipped. The CPU memory regression ran. AI-assisted with Codex. |
Closes BUILD-1052 (finding @shdann). Claim: #3574 comment 7085952474.
check_imagebuilt one Python float object per channel viastruct.unpackand kept the whole tuple alive: a512x512 RGBA32F frame peaked at ~33 MB of traced allocation to count alpha coverage and inspect a few pixels.
The frame is now a native-order float memoryview:
floats[3::4]), same NaN semantics (NaN > 0.5is false either way);write_ppmreads the returned view unchanged (tests passstats["pixels"]straight through).Measured on this machine (CPython 3.13, Windows): traced peak inside
check_imagefor a 512x512 frame33,555,456 -> ~900 bytes; coverage count 27.3 -> 8.5 ms. Native order is little-endian on every platform the
runtime supports (x86-64/ARM64 Windows and Linux); the explicit
<struct reads stay elsewhere, as the findersuggested. Vectorized alpha counting stays out: stdlib only, per the tool's rule.
Tests:
python -I tests/test_first_light.py11 OK / 3 package-gated skips. No game files, no GPU.AI-assisted (Claude Code).