Close the remaining validation gaps: "Push now" off the day plan, unbounded segment fields, import paths, and the AI's effect list #169
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#169
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?
Found while building #149 (#162) and #150 (#167). The two most important are the first two below.
1. "Push now" resolves the night on its own
POST /wled/push(routers/wled.py) finds its own scheme instead of callingday_plan.plan_for_date. It is guarded by #150's translator, but it doesn't followunapproved_policy, it returns 404 on an unapproved night, and it can drift from what the on job pushes. That is exactly the #93 failure, which #74 had already had to fix once for this same button. Move it ontoplan_for_date, and add a parity test between Push now and the on job.Other places that still resolve a night themselves, as candidates for the same change:
schedule_service._active_brightness_baselinecalendar_feed._resolve_day2.
SchemeSegmentUpdatehas no boundseffect_speed,effect_intensity,paletteandbrightnessaccept any integer. #150 boundedeffect_idat the endpoint. Add schema bounds of 0–255 (palette bounded bypalcount, the same wayeffect_idis bounded byfxcount). First check for existing rows that are out of range: building a response model from a bad row would then return a 500, so either clamp on read or add a data migration.3. Preset and config import don't bound
effect_idPOST /import/config(#23) and preset import (preset_io) accept any effect id. Apply the samefxcountbound, and reject the file with a message that names the offending scheme.4. The AI never sees the live effect list
Neither
generate_schemenorrefine_scheme(routers/schemes.py) passeswled_effects, so generation always getsFALLBACK_EFFECTSand refinement gets no catalogue at all. Pass the live list, from the controller when it can be reached and the shipped 16.0.0 catalogue otherwise. #150 already filters unsafe effects out of that path.5. Small UI gaps
EffectPicker's "Custom ID" box can select an effect that the photosensitivity guard hides. The API still guards it, but the picker should warn./remote's speed and intensity sliders may push a stale value on keyboard input. The same stale-closure pattern that #150 fixed for effect selection is used inonValueCommit.