-
fix(leds): five tests asserted a spec the board stopped using in August · 8dd2b710
Master was red and nobody had noticed, because these five never fail alone — they fail in a full-suite run, and the habit had become running subsets. Four of them still described PLN's original six-step LED ramp, three of whose steps were dim. value_ramp moved to the DAYLIGHT ramp — five steps, every one full brightness — on his own ruling of 2026-08-21: "top brightness always would make more readable signals even in day perfs". The code carried that reasoning in its docstring; the tests were never brought along. So the tests now assert the shipped ramp, and the six-step spec keeps a test of its own under LCXL_DIM_RAMP=1, because it is still live behaviour for a dark stage — superseded as the default, not deleted. Two of them needed a different LENS, not a different number: * Monotonicity was measured as (green, red) ascending, which held only because the dim ramp never took red away. The daylight ramp walks amber -> yellow -> green by REMOVING red at full green, so red has to count downwards. Same property; the lens has to match the control. * The DJ filters' exemption from the ramp was tested by comparing the two functions at the centre value only — and the daylight ramp's midpoint is also 63, so the two coincided there and the test failed while the exemption was perfectly intact. A one-point comparison cannot tell a bipolar mapping from a unipolar one. It now asserts the exemption exactly (a DJ filter is painted by filter_colour at every one of the 128 values), that the two mappings disagree on 69 of 128, and that the bypass detent is narrow where the ramp's amber is wide. And one thing worth keeping: the old monotonicity test read assert ranks == sorted(ranks) or len(set(ranks)) == 6 The six-step ramp has exactly 6 distinct ranks, so the second clause was ALWAYS true and the assertion could not fail. It was hiding a real fact — the dim ramp genuinely doubles back, dim red -> bright red then bright amber -> dim green — which is the measured reason the daylight ramp is the better default, not just a brightness preference. That is now asserted as the truth it is. The fifth was tools/at/tests/test_lens.py pinning the OPAL setlist at exactly 13 tracks. That file is GENERATED from backlog.md, PLN's SSOT for set membership and order, so its length changes whenever he changes the set — it went 13 -> 16 when OPAL was recorded as-performed, and the test failed for the set doing exactly what it is supposed to do. A hardcoded count on a human-edited artifact is a stale binding. What the assertion is really for is non-vacuity (an unparsed setlist would make the loop below run zero times and pass), so it is a floor now, plus every path in the setlist must resolve on disk. before 885 passed, 5 failed after 892 passed, 0 failedPLN (Algolia) authored8dd2b710
×