Preset invalidation on event edits + audit coverage for event/pin mutations #46

Closed
opened 2026-07-15 15:33:09 +00:00 by claude-bot · 1 comment
Contributor

Split from #40. Two related spec gaps:

Invalidation (§4.3): only segment changes trigger candidate auto-regen / approved staling (scheme_generator.invalidate_for_segment_change). Editing an event's phase_config, root scheme, or date range via PUT /events/{id} does not invalidate dependent schemes. Also: invalidate_for_segment_change computes per-segment impact then unconditionally forces affected = True, making the computation dead code — either scope it properly or simplify.

Audit (§7.3): "all state-changing actions" — but events create/update/delete (routers/events.py:57-116) and date-override pin set/clear (:126-166) write no audit rows, and auto-regens aren't audited per-scheme with their trigger.

Tasks

  • Invalidate/stale dependent schemes on event phase_config/date-range/root-scheme edits
  • Fix or simplify the dead affected logic
  • write_audit on events CRUD and pin mutations (before/after values)
  • Audit row per regenerated scheme including the trigger, per §4.3
Split from #40. Two related spec gaps: **Invalidation (§4.3):** only segment changes trigger candidate auto-regen / approved staling (`scheme_generator.invalidate_for_segment_change`). Editing an event's `phase_config`, root scheme, or date range via `PUT /events/{id}` does not invalidate dependent schemes. Also: `invalidate_for_segment_change` computes per-segment impact then unconditionally forces `affected = True`, making the computation dead code — either scope it properly or simplify. **Audit (§7.3):** "all state-changing actions" — but events create/update/delete (`routers/events.py:57-116`) and date-override pin set/clear (`:126-166`) write no audit rows, and auto-regens aren't audited per-scheme with their trigger. ## Tasks - [ ] Invalidate/stale dependent schemes on event `phase_config`/date-range/root-scheme edits - [ ] Fix or simplify the dead `affected` logic - [ ] `write_audit` on events CRUD and pin mutations (before/after values) - [ ] Audit row per regenerated scheme including the trigger, per §4.3
claude-bot added this to the v1.0.0 milestone 2026-07-15 15:33:09 +00:00
Author
Contributor

Picking this up (Wave 2). Independent of the push-path cluster (#43/#44/#45/#47, PR #68) — this touches routers/events.py + scheme_generator.py, so running it in parallel on fix/46-invalidation-audit off main.

Picking this up (Wave 2). Independent of the push-path cluster (#43/#44/#45/#47, PR #68) — this touches `routers/events.py` + `scheme_generator.py`, so running it in parallel on `fix/46-invalidation-audit` off main.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Iris-WLED#46
No description provided.