Files
fusion/plugins/fusion-plugin-telemetry-watcher/vitest.config.ts
Semih 3947528fec plugin(telemetry-watcher): Phase 1 — Grafana webhook ingestor
New workspace package fusion-plugin-telemetry-watcher that turns a
Grafana Alerting webhook payload into a Fusion incident task in the
triage column. Hooks the dedup/severity/rate-limit primitives that
PostHog/Sentry/Slack sources will reuse in Phase 2.

Pipeline:
  POST /api/plugins/fusion-plugin-telemetry-watcher/grafana-webhook
    → bearer-secret check
    → parseGrafanaPayload (one signal per firing alert; resolved alerts
      are dropped — recovery is verified post-deploy by the QA agent)
    → classifySeverity P0/P1/P2/P3 with critical-path keyword
      escalation (payment/auth/billing/subscription)
    → DedupCache 4h fingerprint window — repeat fires log against the
      existing task instead of opening duplicates
    → IncidentRateLimiter 5/h, 20/d — overflow becomes a "telemetry
      storm" mega-task in a future phase
    → taskStore.createTask({ column: "triage", priority })
    → optional auto-assign to Triage Agent

14 unit tests cover severity buckets, critical-path escalation, dedup
windowing/eviction, hourly+daily rate caps, and the Grafana payload
parser (firing vs resolved, label-based domain inference).

Settings expose all thresholds + secret + dedup window + rate limits
through the dashboard plugin settings UI. README documents the deploy
+ register + Grafana contact-point wiring.
2026-05-09 16:55:38 +00:00

9 lines
165 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["src/__tests__/**/*.test.ts"],
reporters: ["dot"],
},
});