You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving a firework or multishot shot in Admin could time out because the database's timeline-safety triggers re-validated every show and every published preset on every write, instead of just the ones the write could affect.
Root cause: assert_show_timeline_non_overlapping() (3.6s) and assert_all_published_show_presets() (2.6s) ran unscoped on every catalogue_items / fireworks / multishot_fireworks write; fan-out repeated this once per multishot reusing an edited firework (reproduced a >60s hang on a firework used in 17 multishots)
Fix: migration platform/supabase/migrations/20260810120000_scope_show_timeline_safety_checks.sql scopes both checks to the shows/catalogue items actually affected, and adds WHEN guards so duration-propagation triggers skip when nothing relevant changed
Verified: full unscoped audit still passes (0 overlaps across 67 shows / 163 published presets), existing 27-test overlap-safety suite passes unchanged, and a genuine unsafe duration change is still correctly rejected
Result: firework save >60s timeout → 274ms; multishot shot save 9.0s → 246ms
Saving a firework or multishot shot in Admin could time out because the database's timeline-safety triggers re-validated every show and every published preset on every write, instead of just the ones the write could affect.
assert_show_timeline_non_overlapping()(3.6s) andassert_all_published_show_presets()(2.6s) ran unscoped on everycatalogue_items/fireworks/multishot_fireworkswrite; fan-out repeated this once per multishot reusing an edited firework (reproduced a >60s hang on a firework used in 17 multishots)platform/supabase/migrations/20260810120000_scope_show_timeline_safety_checks.sqlscopes both checks to the shows/catalogue items actually affected, and addsWHENguards so duration-propagation triggers skip when nothing relevant changedplatform/docs/firework-timeline-safety-performance.md