Skip to content

Automate Anomaly Detection Worker for 'Bus Factor' Drop-offs #45

Description

@SHAURYASANYAL3

Context

We calculate the "Bus Factor" for repositories (how many developers would need to leave for a project to stall), but we don't proactively alert users when it becomes dangerously low.

Requirements

  • Create a new scheduled Inngest function (apps/web/src/inngest/functions/detectBusFactorAnomaly.ts).
  • The job should run weekly, query the Drizzle database for all tracked repositories, and compare the current Bus Factor against the 30-day historical moving average.
  • If the Bus Factor drops by more than 50% or falls below 2, trigger an anomaly.detected event.
  • (Bonus) Wire up a simple email notification using Resend for when this event fires.

Why this is awesome

This shifts Forge-Lens from being a passive dashboard to an active, intelligent monitoring tool. You'll be working directly with our event-driven architecture. If you want to claim this, comment .take below!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions