Repository navigation
Description
#4034 C5 specifies four things for a channel that asks for colour management and does not get it:
Driver-only chipsets with no profile fall back to the legacy path with: one-time warning, queryable
isColorManaged(), fallback flag in channel events/telemetry, and opt-in global strict mode that upgrades fallback to a hard error.
Three are present:
| item | state |
|---|---|
queryable isColorManaged() |
fixed in #4329 — it was a hardcoded false |
| fallback flag in events/telemetry | ChannelEvents::onColorProfileFallback, fired at channel.cpp.hpp:241 and :420, with a test |
| opt-in strict mode | FastLED.setColorManagementStrict(), with tests |
| one-time warning | absent |
reconcileColorProfile() sets mColorProfileFallback = true and the callers fire the event. There is no FL_WARN anywhere on that path — grep FL_WARN src/fl/channels/channel.cpp.hpp returns the UCS7604 RGBWW note, three showPixels/draw-list messages, and nothing about profiles.
So a sketch whose profile fails to bind falls back to the legacy path silently unless it has subscribed to the event. The event is the machine-readable half; C5 lists the warning separately because it is the half a human sees without writing code.
Why I have not just added it
FL_WARN output is not observable from a test. There is no capture hook in fl/log/log.h, and tests/fl/channels/channel.cpp says so where it works around the same problem:
Verification is behavioural — the project log macros don't have a capture hook today, so each test asserts the enqueue did NOT land.
So a one-line FL_WARN_F here would be unverifiable: nothing could show it fires, that it fires once, or that it stops firing if the condition is later fixed. That is worth naming on its own, because it is the mechanism by which warnings like this go missing and stay missing — this one has been absent since C5 was written and nothing failed.
Two ways forward, in the order I would take them
- A log capture hook for tests. Small, unblocks this and every future warning contract, and would let the existing
warnProfileCleared/LegacyClearedByProfilebehaviour be checked as text rather than only as an event. Its absence is why setColorProfile() silently discards mGamma and mDitherMode: the warning checks two of the four fields it clears #4331's fix could only be verified through the event surface. - Add the warning, verified by inspection, and accept that "one-time" is unenforced until (1) exists.
Doing (2) without (1) adds a fourth C5 item that nothing holds in place, which is how the first three ended up in three different states.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Sep 10, 2026
Correction: the capture hook exists, one layer below where I looked
I wrote that a warning here would be unverifiable because "there is no capture hook in
fl/log/log.h". That is true oflog.hand false of the codebase.fl/stl/cstdio.hhas:and
fl::print/printlnroute through it (cstdio.cpp.hpp:84). Bothlog_emitandlog_emit_fend atfl::println(...), so everyFL_WARNis capturable today.tests/fl/stl/cstdio.cppalready installs handlers this way.I searched
log.hfor the hook, did not find it there, and stopped — the same mistake in shape as #4326, where I looked for a guard at the wrong layer and concluded it was missing. Twice now, so it is worth naming as a habit rather than an accident: absence at the layer I searched is not absence.What that changes
Both proposals in this issue collapse into one. There is nothing to build first — the warning can be added and verified as text, which is what I said could not be done. Doing that now.
The wider point in the issue survives and is arguably sharpened: C5's four items ended up in four different states, and the one with no test is the one that was never written. The tool to test it was there the whole time.
feat(channels): emit C5's one-time colour-management fallback warning (…
feat(channels): emit C5's one-time colour-management fallback warning (…
fix(channels): a profile that builds no pipeline is a fallback, and s…