Demo mode's showcase schemes are approved with no segments, so every showcase night pushes nothing #171
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#171
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Bug
In demo mode (#63), the showcase schemes the seeder approves (Halloween and the others) are stored with zero segments. Every one of those nights pushes
{"on": true, "bri": 200, "seg": []}, and the calendar, the side panel and the season preview (#151) all show them unlit. #63's whole promise is that "the calendar has colour in it", and it doesn't.This was confirmed in a running demo container while building #151:
halloween_2026_midis approved with"segments": []. The season preview reports it accurately; the preview is right, the data is wrong.Cause
demo_seed.seed()approves the showcase schemes in the same call that creates the segments, which is beforemain.py's startup regeneration pass. The regeneration then skips them, becausegenerate_schemes_for_eventdeliberately never touches approved rows. So they stay as they were when approved: empty.Fix
Order the operations so the schemes have segments before they are approved:
main.py's lifespan,seed()into two calls: segments and events first, then approve once the schemes have been generated.Add a test that starts the app with
DEMO_MODE=trueon an empty database and asserts that every approved showcase scheme has one segment per themed segment, and a non-empty pushedseglist.Also
CI's
docker-e2ejob doesn't setDEMO_MODE, so nothing covers demo mode end to end. Consider running at least one E2E spec against a demo-mode container. That would have caught this.