-- Add retry configuration settings to admin_settings table
INSERT INTO admin_settings (setting_key, setting_value, category, description) VALUES
  ('retry.max_attempts', '3', 'system', 'Maximum number of retry attempts for failed operations (1-10)'),
  ('retry.base_delay', '1000', 'system', 'Base delay in milliseconds before first retry (100-5000)'),
  ('retry.max_delay', '10000', 'system', 'Maximum delay in milliseconds between retries (1000-30000)'),
  ('retry.backoff_multiplier', '2', 'system', 'Multiplier for exponential backoff (1.5-3.0)'),
  ('circuit_breaker.failure_threshold', '5', 'system', 'Number of failures before circuit opens (3-20)'),
  ('circuit_breaker.reset_timeout', '60000', 'system', 'Milliseconds to wait before testing recovery (30000-300000)'),
  ('circuit_breaker.monitoring_window', '120000', 'system', 'Time window to track failures in milliseconds (60000-600000)')
ON CONFLICT (setting_key) DO NOTHING;