FN-5924: throttle OAuth expiry alerts across restarts
Persist OAuth expiry alert state so repeated provider expiry warnings are suppressed for 12 hours across engine restarts. - add a persisted OAuth alert state store under ~/.fusion/agent and share it between the expiry monitor and startup validity logger - throttle repeated oauth-token-expired notifications and startup expiry warnings per provider for 12 hours, while clearing stale state when providers disappear or change - cover persisted throttling, restart behavior, failure handling, and wiring updates in engine notification tests - document the persisted 12-hour OAuth alert throttle and add a patch changeset for @runfusion/fusion Files changed: .changeset/fn-5924-oauth-alert-throttle.md | 5 + docs/settings-reference.md | 4 +- packages/engine/src/__tests__/project-engine-soft-delete-merge-abort.test.ts | 3 + packages/engine/src/__tests__/project-engine.test.ts | 17 ++- packages/engine/src/__tests__/reliability-interactions/soft-delete-in-flight-abort.test.ts | 3 + packages/engine/src/auth-storage.ts | 6 +- packages/engine/src/notification/__tests__/oauth-alert-state.test.ts | 72 ++++++++++ packages/engine/src/notification/__tests__/oauth-expiry-monitor.test.ts | 148 ++++++++++++++++--- packages/engine/src/notification/__tests__/oauth-validity-logger.test.ts | 159 ++++++++++++++++++--- packages/engine/src/notification/index.ts | 3 + packages/engine/src/notification/oauth-alert-state.ts | 144 +++++++++++++++++++ packages/engine/src/notification/oauth-expiry-monitor.ts | 12 +- packages/engine/src/notification/oauth-validity-logger.ts | 16 ++- packages/engine/src/project-engine.ts | 13 +- 14 files changed, 554 insertions(+), 51 deletions(-) Fusion-Task-Id: FN-5924 Fusion-Task-Lineage: 83255a25-40c7-44d4-8302-b068ae51250e
This commit is contained in:
5
.changeset/fn-5924-oauth-alert-throttle.md
Normal file
5
.changeset/fn-5924-oauth-alert-throttle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
persist the OAuth expiry alert/notification throttle so users are alerted at most once per provider every 12 hours, even across server restarts.
|
||||
Reference in New Issue
Block a user