Quieter notifications: quiet resolves, per-type reopen window, self-clearing overflow alert #48
Open
KofTwentyTwo wants to merge 5 commits from
feature/quieter-notifications into develop
pull from: feature/quieter-notifications
merge into: QRun-IO:develop
QRun-IO:develop
QRun-IO:release/0.3
QRun-IO:merge/develop-into-release-0.3-rc2
QRun-IO:perf/scheduled-job-statements
QRun-IO:release/0.1
QRun-IO:fix/reconcile-interrupted-rc
QRun-IO:docs/forge-release-notes
QRun-IO:fix/liquibase-header-comments
QRun-IO:main
QRun-IO:qualification/central-actions-20261031
QRun-IO:dependabot/maven/develop/maven-minor-and-patch-9930ea90ec
QRun-IO:dependabot/github_actions/develop/github-actions-0fdda1077f
QRun-IO:feature/orb-0.8-track
QRun-IO:feature/orb-0.7.18
QRun-IO:feature/orb-0.7.17
QRun-IO:feature/orb-main-hotfix-standardization
QRun-IO:feature/shared-codeql
QRun-IO:feature/stable-gate-canary
QRun-IO:feature/orb-rc-ref-fix
QRun-IO:feature/orb-rc-recovery
QRun-IO:feature/orb-0.7.11
QRun-IO:feature/orb-rc-worker
QRun-IO:feature/central-ci
QRun-IO:test/recipient-full-access
QRun-IO:feature/service-principal
QRun-IO:ci/release-rc-secrets-inherit
QRun-IO:feature/ui-api-1.6
QRun-IO:feature/runtime-fields-not-audited
QRun-IO:fix/alerts-system-session-instance
QRun-IO:fix/producer-version-from-build
QRun-IO:fix/help-bundle-version-test
QRun-IO:fix/help-bundle-version
QRun-IO:feature/help-bundle
QRun-IO:feature/notify-email-requested-v2
QRun-IO:feature/foreign-keys
QRun-IO:feature/alerts-join-indexes
QRun-IO:feature/bootstrap-subscription-once
QRun-IO:feature/tables-populated-defaults
QRun-IO:feature/notification-preferences-section
QRun-IO:feature/recipients-widget-json
QRun-IO:feature/slack-routing
QRun-IO:feature/quiet-hours-digests
QRun-IO:feature/reminders-escalation
QRun-IO:fix/team-sources-mute-scope
QRun-IO:feature/email-api
QRun-IO:feature/orb-0.6.9
QRun-IO:feature/email-qbit
QRun-IO:feature/arch-follower-fanout
QRun-IO:feature/arch-core-notify
QRun-IO:feature/arch-ui-api-extension
QRun-IO:feature/notify-email-requested
QRun-IO:feature/arch-rc5-standins
QRun-IO:feature/release-rc-automation
QRun-IO:feature/notifications-de
QRun-IO:feature/notifications-c-jobs
QRun-IO:feature/notifications-a-tables
QRun-IO:feature/notifications-spec
QRun-IO:feature/sink-stop-drains-in-flight
QRun-IO:feature/alerts-external-channels-p4
QRun-IO:screenshots/p1-p3
QRun-IO:feature/alerts-core-p1-p3
QRun-IO:feature/ga-only-release-tags
No Reviewers
Labels
Clear labels
architecture
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
release:rc
secuurity
ux
wontfix
Architecture review: coupling, cohesion, UI API
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Pull requests that update GitHub Actions code
Good for newcomers
Extra attention is needed
This doesn't seem right
Pull requests that update java code
Further information is requested
Merging this develop PR cuts the next release candidate
Admin UX / information architecture
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: QRun-IO/qbit-alerts#48
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of KofTwentyTwo/Website-Backend#306
Notifications should be things a person needs to see or act on. This PR removes five sources of noise, one commit each.
Changes
A resolve no longer marks the bell entry unread. The in-app channel updates the alert's existing bell entry in place: the title becomes "Resolved: ..." and the read state stays as it was. A resolve never adds a bell entry for someone who did not have one. A subscription whose
eventsname RESOLVED and differ from the default set (AlertRouter.DEFAULT_SUBSCRIPTION_EVENTS, now shared by the three places that hard-coded it) still gets the old unread behavior. Email, Slack and webhook resolve notices are unchanged. If a reopen is suppressed as a duplicate (10-minute window), the bell entry's text is still refreshed, so it never keeps saying "Resolved" while the alert is open.Per-type reopen window. A raise of the same (type, dedupKey) reopens the previous alert, and its existing bell entry, within:
alerts_type.reopenWindowMinutes(new nullable column, changeset 55, H2 test DDL, entity, Tuning section, help); otherwiseAlertsQBitConfig.reopenWindowMinutesByTypePrefix(defaulthealth.= 360 minutes; validated); otherwisereopenWindowMinutes(30, unchanged).Flapping detection is unchanged: reopens still count toward
flapThresholdwithinflapWindowMinutes.Sink overflow alert clears itself.
alerts.sink.overflownow has a stable dedup key. It is the key earlier versions used implicitly, so an alert they left open also resolves. The drain thread resolves it once the queue has stayed below half full for 60 seconds, then re-arms the flag so a later overflow raises it again. Still ERROR and visible to admins only. The declared resolve mode is PRODUCER. Existing type rows keep their stored label, and the behavior does not depend on it."API key created" notice removed (
AlertsNotices.apiKeyCreated). No callers were found outside this repo. The API key expiry, access-changed and share notices stay. "New sign-in" is unchanged: the qbit has no sign-in, device or IP history (core has no sign-in events, andnewSignInreceives only a display string), so it cannot tell a new device from a known one. The host has to make that call. The Javadoc and docs now say to call it only for a device or address not seen recently.Job notices only for runs nobody was watching.
AlertsProcessListenercan tell fromRunProcessInput.getFrontendStepBehavior(). The process screens run with BREAK and end on the result screen. Scheduled, API, queue, ESB and automation runs use SKIP (or FAIL). Only non-BREAK runs notify now.Before / after
health.*6 h, others 30 min, per-type override)alerts.sink.overflow"Alert signals are being dropped"alerts.producer.floodalerts.monitor.failing,alerts.channel.failingTests
QuietNotificationsTest: a resolve keeps the entry read and marks it resolved; an unread entry stays unread; a resolve adds no entry; an explicit RESOLVED subscription still gets unread; a quick reopen restores the title; a health blip 2 h later reopens the same alert and bell entry, 7 h later it creates a new one, and other types keep 30 min; a per-type override wins both ways; prefix resolution (longest wins) and validation.SinkOverflowTest: the alert is raised once with the dedup key; the drain must last 60 s (a new overflow restarts the wait); it then resolves and re-arms; a later overflow raises it again.NotificationEmailAndNoticesTest: no "API key created" notice.JobNotificationsTest: an interactive (BREAK) failed run sends nothing;isInteractivecases../mvnw verifypasses locally (checkstyle, guardrails, JaCoCo gate).CHANGELOG and UPGRADE are updated. Hosts calling
apiKeyCreatedneed to delete the call.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.