FN-8691: suppress repeated task wedge notifications
Prevent resolved-and-rewedged tasks from flooding operator notification channels.
- Persist per-reason notification timestamps with a six-hour cooldown.
- Apply cooldown claims consistently in durable storage and in-memory fallback paths.
- Cover reason transitions, legacy state, invalid timestamps, and cooldown expiry.
Files changed:
.changeset/fn-8691-wedge-notification-cooldown.md | 7 ++
docs/architecture.md | 4 +-
.../postgres/store-wedge-resolution.pg.test.ts | 67 +++++++++++-
packages/core/src/index.ts | 1 +
packages/core/src/store.ts | 21 +++-
packages/core/src/task-store/task-mutation-ops.ts | 6 ++
packages/core/src/types.ts | 2 +
packages/core/src/types/task-core.ts | 15 +++
.../__tests__/task-wedge-notification.test.ts | 117 ++++++++++++++++++++-
.../src/notification/notification-service.ts | 30 +++++-
10 files changed, 261 insertions(+), 9 deletions(-)
Fusion-Task-Id: FN-8691
Fusion-Task-Lineage: b7460508-f9b0-488b-828c-a51e9477304d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>