Skip to content

test(ci): scan the gamut mapper for iterative solvers, which is the point (#4335) - #4336

Merged
zackees merged 1 commit into
masterfrom
fix/4041-solver-guard-scope
Sep 11, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/4041-solver-guard-scope

Conversation

@zackees

@zackees zackees commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Fixes #4335.

The hole

test_no_iterative_solver_per_pixel.py exists so that "a future edit that wires one in fails here rather than in a frame-rate report on someone's bench". It scanned five stage files; its companion test_no_rgb8_intermediate.py lists eight for the same per-pixel path.

The three missing were pipeline.cpp.hpp, gamut_map.cpp.hpp and white_allocation.cpp.hpp.

gamut_map.cpp.hpp is the one that matters. processPixelQ16 calls it per pixel:

mapAndSolveDrivesQ16(pipeline.gamut, xyz, drives);   // pipeline.cpp.hpp:94

and gamut mapping is the stage A3 is about:

embedded per-pixel path is matrix + clamp/compress (+ optional LUT) — iterative solves (incl. nnls3) never run per-pixel

So the guard covered four stages where nobody would put a solver, and skipped the one where someone would.

Measured, not assumed

// injected into src/fl/gfx/gamut_map.cpp.hpp
static void mut_probe() { nnls3(nullptr, nullptr); }
result
old list 2 passed, 20 subtests passed — blind
new list SUBFAILED(stage='gamut_map.cpp.hpp', symbol='nnls3')

All three files are clean today, so the suite stays green — 32 subtests instead of 20 — and this closes the hole rather than reporting one.

Relationship to #4330

Found while narrowing the sibling guard's stated scope. That one over-claimed what it covered; this one under-covered what it claimed — opposite failures in a matched pair of files. Both now carry a note to keep the two lists in step, since the gap was invisible until they were read side by side.

bash lint clean. Test-only; no source changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage to verify that all streaming stages avoid per-pixel iterative solvers.
    • Added checks for pipeline, gamut mapping, and white allocation stages.

…oint

test_no_iterative_solver_per_pixel.py scanned five stage files. Its
companion test_no_rgb8_intermediate.py lists eight for the same per-pixel
path, and the three missing here were pipeline.cpp.hpp, gamut_map.cpp.hpp
and white_allocation.cpp.hpp.

gamut_map.cpp.hpp is the one that matters. processPixelQ16 calls
mapAndSolveDrivesQ16(pipeline.gamut, ...) per pixel, and gamut mapping is
the stage A3 names when it says iterative solves never run per-pixel. The
guard covered four stages where nobody would put a solver and skipped the
one where someone would.

Verified rather than assumed: injecting `nnls3(nullptr, nullptr)` into
gamut_map.cpp.hpp leaves the old list green at 20 subtests, and fails the
new one with SUBFAILED(stage='gamut_map.cpp.hpp', symbol='nnls3').

All three files are clean today, so this stays green -- 32 subtests rather
than 20 -- and closes the hole instead of reporting one. Both lists now
carry a note to keep them in step.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: df4aeb1f-15e1-4b87-bd0a-67ff62aad4d2

📥 Commits

Reviewing files that changed from the base of the PR and between 7bd1b1f and 4c361a6.

📒 Files selected for processing (1)
  • ci/tests/test_no_iterative_solver_per_pixel.py

Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The per-pixel iterative-solver guard now scans eight streaming stages instead of five. It includes pipeline.cpp.hpp, gamut_map.cpp.hpp, and white_allocation.cpp.hpp.

Changes

Per-pixel solver guard

Layer / File(s) Summary
Expand per-pixel stage coverage
ci/tests/test_no_iterative_solver_per_pixel.py
The stage list now includes pipeline.cpp.hpp, gamut_map.cpp.hpp, and white_allocation.cpp.hpp. The test documentation describes the expanded coverage.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 4c361

The CI guard expansion covers the requested per-pixel stages and introduces no actionable merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating CI to scan the gamut mapper for iterative solvers. It is specific and related to issue #4335.
Linked Issues check ✅ Passed The change adds pipeline.cpp.hpp, gamut_map.cpp.hpp, and white_allocation.cpp.hpp to the per-pixel stage scan. This satisfies issue #4335, including coverage for iterative solvers such as nnls3 in gam…
Out of Scope Changes check ✅ Passed The changes are limited to the CI guard stage list and directly support the linked issue. No unrelated production changes are described.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4041-solver-guard-scope

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Sep 11, 2026
@zackees
zackees merged commit e39c1df into master Sep 11, 2026
27 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 11, 2026
@zackees
zackees deleted the fix/4041-solver-guard-scope branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The A3/B11 iterative-solver guard does not scan the gamut mapper, which is the stage A3 is about

1 participant