Skip to content

fix(core): harden routing reliability and add quiet-hours controls - #375

Merged
Dushyant-rahangdale merged 1 commit into
mainfrom
fix/audit-routing-reliability
Aug 25, 2026
Merged

fix(core): harden routing reliability and add quiet-hours controls#375
Dushyant-rahangdale merged 1 commit into
mainfrom
fix/audit-routing-reliability

Conversation

@Dushyant-rahangdale

@Dushyant-rahangdale Dushyant-rahangdale commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes three concrete reliability issues from the OpsKnight audit and adds explicit, user-controlled Quiet Hours.

  • authenticate inbound integrations before consuming the DB-backed per-integration rate limit, preventing invalid/caller-controlled IDs from creating arbitrary rate-limit rows or burning valid integration quota
  • preserve escalation terminal state so final routing failures remain FAILED instead of being overwritten as COMPLETED
  • replace the implicit LOW-urgency after-hours rule with a shared, user-configurable Quiet Hours policy
  • apply that policy consistently to direct escalation notifications and normal incident notifications
  • keep quiet-hours suppression out of delivery-failure reporting

Quiet Hours UX

Location: Settings → Profile & Preferences → Notification Preferences → Quiet Hours

Per-user controls:

  • enable/disable Quiet Hours
  • start time
  • end time
  • mute all day on weekends
  • uses the user's existing profile timezone

Behavior:

  • OFF by default for both existing and new users; Quiet Hours is explicit opt-in
  • LOW urgency: Push, SMS, and WhatsApp are suppressed only when the user has enabled Quiet Hours and the configured window is active
  • Email and in-app notifications remain available
  • MEDIUM and HIGH urgency bypass Quiet Hours
  • malformed time/timezone configuration fails open rather than suppressing paging

The setting remains under Profile because it is a responder preference. Settings → Notification Providers remains admin-only infrastructure configuration.

Data model

Adds typed user preference fields and a migration for:

  • quietHoursEnabled (default false)
  • quietHoursStartMinutes (initial editable value 18:00)
  • quietHoursEndMinutes (initial editable value 08:00)
  • quietHoursWeekendAllDay (initial editable value true)

The schedule values have no effect until the user explicitly enables Quiet Hours.

Documentation

Updates the v1.5 notification, user, escalation, and inbound-webhook docs to match the implemented behavior and console location.

Verification

  • branch is squashed to 1 commit on top of main
  • Prisma migration deploy/validation/health are covered by CI
  • unit and DB integration suites run in CI
  • dedicated TypeScript typecheck runs in CI
  • quiet-hours policy has targeted regression tests

Review focus

  1. webhook authentication/rate-limit ordering
  2. quiet-hours UX and opt-in behavior
  3. quiet-hours enforcement across notification paths
  4. escalation terminal-state handling
  5. schema defaults and migration safety

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🔒 Security: Results Summary

    4 files  ±0  4 suites  ±0   0s ⏱️ ±0s
   22 tests ±0  1 ✅ ±0  0 💤 ±0     21 ❌ ±0 
1 491 runs  ±0  1 ✅ ±0  0 💤 ±0  1 490 ❌ ±0 

For more details on these failures, see this check.

Results for commit 2e4d0d7. ± Comparison against base commit b95649b.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

✅ Passed Vitest Results

Metric Count
Total Tests 1350
Passed 1350
Failed 0
Skipped 0
  • DB smoke test: ✅ Passed

View Full Test Report

@Dushyant-rahangdale
Dushyant-rahangdale force-pushed the fix/audit-routing-reliability branch from 2ae8405 to f0ccd68 Compare August 25, 2026 19:55
@Dushyant-rahangdale Dushyant-rahangdale changed the title fix(core): harden webhook, quiet-hours, and escalation reliability fix(core): harden routing reliability and add quiet-hours controls Aug 25, 2026
@Dushyant-rahangdale
Dushyant-rahangdale force-pushed the fix/audit-routing-reliability branch 2 times, most recently from 78ac03a to 385d96d Compare August 25, 2026 20:33
@Dushyant-rahangdale
Dushyant-rahangdale force-pushed the fix/audit-routing-reliability branch from 385d96d to 2e4d0d7 Compare August 25, 2026 21:08
@Dushyant-rahangdale
Dushyant-rahangdale merged commit dd2810a into main Aug 25, 2026
16 checks passed
@Dushyant-rahangdale
Dushyant-rahangdale deleted the fix/audit-routing-reliability branch August 25, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant