You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Two per-pixel stage headers have no self-containment coverage: transfer.h and chromatic_adaptation.h #4337
ci/tests/test_fixed_point_headers_are_self_contained.py compiles each listed header as a translation unit's only include. Its list names six of the eight per-pixel stage headers, omitting transfer.h, source_xyz.h, chromatic_adaptation.h and flux_scalar.h.
Two of those four had coverage anyway, by accident: pipeline.h is on the list and includes flux_scalar.h and source_xyz.h, so breaking either fails — attributed to pipeline.h rather than to the header at fault, but it fails.
transfer.h and chromatic_adaptation.h are included by no listed header. They had no coverage at all.
Measured
Removing #include "fl/gfx/color_profile.h" from transfer.h, leaving it dependent on an include it does not make:
$ uv run pytest ci/tests/test_fixed_point_headers_are_self_contained.py -q
15 passed
All four are self-contained today, so adding them keeps the suite green — 19 tests instead of 15 — and closes the gap rather than reporting one.
transfer.h matters more than its size suggests: it is the decode stage, the "one semantic conversion" B3 is written around, and the only stage whose correctness the reference corpus checks numerically.
this — the self-containment guard covers six of eight stage headers, two with no coverage at all
Three structural guards over the same per-pixel path, each with a different list, none agreeing. The lists are maintained by hand and drift independently; a guard's list is itself the thing nothing checks.
Worth considering whether the stage set should be declared once and imported by all three, so adding a stage cannot silently skip a guard. That is a larger change than any of the three fixes and is offered as a question, not a plan.
Doing the cheap half, and leaving the structural question open (#4341)
I raised "declare the stage set once and import it" here as a question rather than a plan, and it still is. But there is a smaller move that gets most of the protection without imposing a structure, and #4339 is the argument for it.
That issue added a source profile to the P5 corpus. Five places name the source set there — generator, exporter, a set literal in a test, a generated enum, a C++ switch — and every one that could object, did:
ValueError: linear_srgb-rgb-00 names an unknown source linear_srgb
AssertionError (allowed-set assertion)
error: enumeration value 'LinearSrgb' not handled in switch [-Werror,-Wswitch]
Same shape of duplication as the three guard lists here. Opposite outcome, and the reason is not that there are fewer copies — it is that each copy fails loudly when the set changes. The guard lists had no such property, which is why #4330, #4335 and #4337 each sat undetected.
So #4341 gives the guard lists that property and nothing more: a test asserting the two PER_PIXEL_STAGES tuples are identical, that every scanned stage file exists, and that each stage's header is on the self-containment list. No shared module, no restructuring of the three files.
Verified by replaying both historical regressions:
replayed
caught by
drop gamut_map.cpp.hpp from the solver guard (#4335)
test_the_two_stage_scanners_cover_the_same_files
drop fl/gfx/transfer.h from self-containment (#4337)
Both would now fail at the point of drift rather than waiting to be read side by side.
The structural question is still yours. A shared stage module is strictly better than three lists that check each other, and this does not block it — it just means the next divergence is not free. I would rather not restructure three guards on my own reading of a question I asked.
Activity
test(ci): cover the two stage headers nothing was compiling (#4337) (#…
zackees commentedon Sep 11, 2026
Doing the cheap half, and leaving the structural question open (#4341)
I raised "declare the stage set once and import it" here as a question rather than a plan, and it still is. But there is a smaller move that gets most of the protection without imposing a structure, and #4339 is the argument for it.
That issue added a source profile to the P5 corpus. Five places name the source set there — generator, exporter, a set literal in a test, a generated enum, a C++ switch — and every one that could object, did:
Same shape of duplication as the three guard lists here. Opposite outcome, and the reason is not that there are fewer copies — it is that each copy fails loudly when the set changes. The guard lists had no such property, which is why #4330, #4335 and #4337 each sat undetected.
So #4341 gives the guard lists that property and nothing more: a test asserting the two
PER_PIXEL_STAGEStuples are identical, that every scanned stage file exists, and that each stage's header is on the self-containment list. No shared module, no restructuring of the three files.Verified by replaying both historical regressions:
gamut_map.cpp.hppfrom the solver guard (#4335)test_the_two_stage_scanners_cover_the_same_filesfl/gfx/transfer.hfrom self-containment (#4337)SUBFAILED(stage='transfer.cpp.hpp', header='fl/gfx/transfer.h')Both would now fail at the point of drift rather than waiting to be read side by side.
The structural question is still yours. A shared stage module is strictly better than three lists that check each other, and this does not block it — it just means the next divergence is not free. I would rather not restructure three guards on my own reading of a question I asked.
test(color): put the default source profile in the P5 reference corpus (
test(ci): make the per-pixel stage lists check each other (#4337) (#4341
test(ci): pin the named source spaces against the standards (#4351) (#…