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
Plugin reliability protector. If a plugin trips its runtime limits or returns errors more than N times per minute (default 5), it is circuit-broken: marked degraded, hooks skipped for 60s, then re-tried. After 3 consecutive circuit-break cycles in an hour the plugin is auto-deactivated, an admin event is fired, and the operator is notified.
Design reference
docs/02-plugin-system.md §4.5 (last paragraph)
Acceptance criteria
CircuitBreaker struct with Allow(slug) bool, RecordFailure(slug, err), RecordSuccess(slug)
Sliding window: 5 failures in 60 seconds opens the breaker for 60 seconds
Half-open probe after the cool-down; one trial dispatch decides whether to re-close
After 3 consecutive open cycles within 1 hour: plugin transitions to failed state, auto-deactivated, audit event fired, admin notification dispatched
Summary
Plugin reliability protector. If a plugin trips its runtime limits or returns errors more than N times per minute (default 5), it is circuit-broken: marked degraded, hooks skipped for 60s, then re-tried. After 3 consecutive circuit-break cycles in an hour the plugin is auto-deactivated, an admin event is fired, and the operator is notified.
Design reference
Acceptance criteria
CircuitBreakerstruct withAllow(slug) bool,RecordFailure(slug, err),RecordSuccess(slug)failedstate, auto-deactivated, audit event fired, admin notification dispatchedplugin_breaker_state{slug},plugin_breaker_trips_total{slug},plugin_breaker_auto_deactivations_total{slug}breaker.Allow(slug)before invoking, skips handler if breaker open (filter: value unchanged; action: skip silently)Dependencies
#15 (limits), depends on lifecycle issue for
failedstate transitionsComplexity
M