v7.41.1
Guard against orphan parent toggles in AI apply
When the AI returned a feature toggle (critical_css, preconnect, dns_prefetch, lcp_preload, preload_key_requests, delay_third_party) without the companion data key in the same response, the plugin used to flip the toggle on with empty data — a no-op in the rendered HTML but a confusing UI state, and PSI variance could blame it for unrelated score drops (a real run showed -19pts attributed to critical_css alone).
Two layers of defence:
- Server-side: post-validate apply_recommendations and force any parent toggle back to false if its required data is empty.
- Client-side: pre-filter detects orphan parent toggles before the apply loop and skips them, logging the reason. Saves a ~30-second mobile retest per orphan and the key is added to the session already-applied set so the AI is told.