Make two effect IDs mean what their comments claim (#132) #133
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!133
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/132-effect-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #132.
Found while starting #14, by checking the codebase's hardcoded effect IDs against a real 16.0.0 controller's
/json/effinstead of against the comments next to them.The aurora scheme pushed the wrong animation — my bug
aurora.pyset"fx": 44under a comment I wrote in #20:44 is
Tetrix— falling blocks. Aurora is 38. The feature is env-gated and off by default so nobody has seen it, but anyone who setAURORA_ENABLEDwould have got a puzzle game during a geomagnetic storm. I asserted the number rather than reading it — the same mistake asleds.segsin #62 and the transition range in #52.The AI's fallback catalogue had five of seven pairs wrong
Used whenever no controller is reachable, which is the path a new user hits before wiring hardware — and the default experience #63's demo mode will create.
{id: 9, name: "Chase"}{id: 65, name: "Colorful"}{id: 66, name: "Traffic"}{id: 57, name: "Fire 2012"}{id: 108, name: "Twinkle"}The model picks an effect by name — "Twinkle suits a winter scene" — and gets the number beside it. So it asked for Sine and meant Twinkle. Replaced with ten verified pairs, chosen to span genuinely different looks so the model has something to choose between.
The guard is the point of the change
An effect ID is an opaque integer everywhere except the one place a human decides what it means. Nothing in the suite could ever have caught either bug — the check has to be against the device's own answer.
tests/fixtures/wled/16.0.0/eff.jsonis that answer, captured verbatim from the real controller back in #62. That fixture already existed; this is what makes it load-bearing rather than decorative.I reintroduced both bugs to confirm the test fails with the right diagnosis before keeping the fixes:
schemes/builtin.yamlwas audited at the same time and is clean — all eight IDs it uses (0, 2, 9, 21, 45, 57, 65, 66) are real effects and plausible for their schemes. A range check now keeps it that way, plus a check that the walker actually finds something, so it can't pass on an empty set.Verification
10 new tests,
ruff/mypyclean, 759 backend tests passing.🤖 Generated with Claude Code