Skip to content

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

Closed

Description

@zackees

ci/tests/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 scans five stage files:

PER_PIXEL_STAGES = (
    "transfer.cpp.hpp",
    "source_xyz.cpp.hpp",
    "chromatic_adaptation.cpp.hpp",
    "device_solve.cpp.hpp",
    "flux_scalar.cpp.hpp",
)

Its companion test_no_rgb8_intermediate.py lists eight for the same per-pixel path. The three missing here are 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 precisely the stage A3 is talking about when it says iterative solves never run per pixel:

Gamut mapping: hue-preserving chroma compression in OKLCh computed by a host optimizer; embedded per-pixel path is matrix + clamp/compress (+ optional LUT) — iterative solves (incl. nnls3) never run per-pixel.

So the guard covers four stages where nobody would put a solver and skips the one where someone would.

Measured

Injecting a call into the mapper:

// src/fl/gfx/gamut_map.cpp.hpp
static void mut_probe() { nnls3(nullptr, nullptr); }

Current guard:

2 passed, 20 subtests passed

It does not notice. With the three files added:

SUBFAILED(stage='gamut_map.cpp.hpp', symbol='nnls3')
1 failed, 2 passed, 31 subtests

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

Related

Found while narrowing the sibling guard's stated scope in #4330. That one over-claimed what it covered; this one under-covers what it claims. The two lists should be kept in step, and both now carry a note saying so.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions