Add incident coalescing (D-0052) #129
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/incident-coalescing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Adds incident coalescing (D-0052). It merges same-source events that arrive within a settle window into a single incident and a single final decision, fixing the observed bug where two events seconds apart produced two separate decisions instead of one.
Design is Option B (debounced-final, withdraw-pending, superseded-always-visible):
CoalesceUntildeadline.MaxCoalesceWindow) without re-enqueuing.CoalescingFinalizerWorkereither reopens and re-classifies a grown incident, emitting one merged final decision that supersedes the still-pending provisional one, or closes an unchanged incident.The three settings (
Enabled,SettleWindowSeconds,MaxCoalesceWindowSeconds) are exposed via the read-only API and are editable in the Admin UI behind a step-up gate, with an audit record written on change. Superseded decisions show a badge and are non-actionable in the review queue.Includes the EF migration
AddIncidentCoalescing, in-memory and Postgres config stores with change notification, and documentation updates (DECISIONS.md D-0052, ARCHITECTURE.md, AGENT-README.md, TODO.md, docs/read-only-api.md).How was this tested?
dotnet build- 0 errors, 0 warningsdotnet test- Application 564/564, AdminApi 212/212, and Postgres integration 87/87 (against a disposable Postgres 17 container) all passChecklist