Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

chore(notifications): remove end-of-day customer-success health check

merged#2510CedarCopilot

CedarCopilot wants to merge 0 commits into staging from chore/remove-eod-health-check

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 16, 2026, 12:38 PM
  2. Merged
    Aug 16, 2026, 1:01 PM
  3. Live on prod
    Aug 16, 2026, 1:01 PM
  4. Observed 2 days
    Aug 16, 2026, 1:01 PM
  5. Pipelines steady after this deploy
    Aug 16, 2026, 1:01 PM
  6. Unobserved

    Live on prod, no production signal yet

    Aug 19, 2026, 1:41 AM

Behaviors Libra is checking

The scheduled end-of-day health check no longer sends Customer Success Slack recaps of meeting/CRM processing, active-user draft send rates, or per-user automation run counts.Inconclusivelow confidence

OTEL fallback found no prod spans matching runEndOfDayHealthCheck cron task / Slack Customer Success channel since deploy.

prod, checked Aug 19, 2026, 1:41 AM

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

What

Removes the end-of-day health check that posted per-user metrics to the #customer-success Slack channel.

The feature was a single self-gating cron , runEndOfDayHealthCheck, dispatched hourly by EventBridge and gated to midnight UTC , that emitted three recap messages:

  1. Daily summary , meetings + CRM events processed, by provider
  2. Draft send rate per user , every active user's send rate (with a below-threshold call-out)
  3. Automations processed per user , runs-per-user, per AOP

Why

We no longer want this daily recap going to customer-success.

Changes

  • Delete apps/server/src/services/notifications/internal/health-checks.ts , all three report builders + the orchestrator (no other callers).
  • cron/cron-task-registry.ts , remove the runEndOfDayHealthCheck entry and its per-UTC-date dedup guard.
  • aws/lib/stacks/app-stack.ts , remove the hourly cron registration; tidy an adjacent comment that referenced it.
  • services/notifications/types.ts , remove the daily_summary / low_send_rate_summary / automations_processed notification types, their union members, and the now-unused SimplifiedSourceSummary import.
  • services/notifications/internal/slack-notifier.ts , remove the three rate-limit keys, the three Slack formatters, the isDailyRecap logic, and the customer-success channel routing branch.
  • trpc/routes/admin-notifications.ts , remove the two admin test-send cases + the now-unused today local.
  • services/analytics/draft-analytics.ts , remove getActiveUsersSimplifiedDraftSummary (the health check was its only caller).

Notes

  • CEDAR_SLACK_CHANNELS.CUSTOMER_SUCCESS is retained , still used by the deal-audit step.
  • Lower-level analytics helpers getActiveUsersDraftSummaryBySource / toSimplifiedSourceSummary are retained as general module API.
  • No test edits required: the cron-registry wiring test derives task names from the registry source, so it stays green.
  • @zero/server typecheck shows no new errors on any touched file.

šŸ¤– Generated with Claude Code

Greptile Summary

The PR removes the end-of-day customer-success health check and its supporting analytics, cron, Slack formatting, routing, notification types, and server-side test cases.

  • Removes the hourly infrastructure schedule and cron registry entry.
  • Deletes the health-check implementation and its now-unused analytics wrapper.
  • Removes recap payload types, Slack formatters, rate-limit keys, and customer-success routing.
  • Removes server-side admin test cases, but leaves the corresponding mail playground controls and calls in place.

Confidence Score: 4/5

This needs the stale admin playground controls and calls removed before merging so the client and server notification contracts remain consistent.

The server no longer accepts two recap notification values that the retained mail playground still submits through rendered controls, causing typed-client incompatibility and runtime validation failures.

Files Needing Attention: apps/server/src/trpc/routes/admin-notifications.ts and apps/mail/app/(routes)/playground/notification-test.tsx

Important Files Changed

FilenameOverview
apps/server/src/cron/cron-task-registry.tsRemoves the health-check registry entry and its process-local date deduplication guard consistently with the schedule removal.
aws/lib/stacks/app-stack.tsRemoves the corresponding hourly task registration and updates the adjacent calendar-sync comment.
apps/server/src/services/notifications/internal/health-checks.tsDeletes the end-of-day report queries and orchestrator; no remaining module importers were found.
apps/server/src/services/notifications/internal/slack-notifier.tsRemoves recap formatting, rate-limit handling, and customer-success routing while retaining exhaustive handling for remainin
Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/mail/app/(routes)/playground/notification-test.tsxno production surface mapped
  • apps/server/src/cron/cron-task-registry.tsno production surface mapped
  • apps/server/src/services/analytics/draft-analytics.tsno production surface mapped
  • apps/server/src/services/notifications/internal/health-checks.tsno production surface mapped
  • apps/server/src/services/notifications/internal/slack-notifier.tsno production surface mapped
  • apps/server/src/services/notifications/types.tsno production surface mapped
  • apps/server/src/trpc/routes/admin-notifications.tsno production surface mapped
  • aws/lib/stacks/app-stack.tsno production surface mapped