Vigil
← All news

v1.9.0 — per-encounter mit-audit aggregate ("how mit usage is going")

Ship 2 of 3 in the consumer-side push. T-303 mit audit already computes per-fight planned-vs-actual; the consumer Home needed an encounter-level rollup so the user can see at a gl…

Why

Ship 2 of 3 in the consumer-side push. T-303 mit audit already computes per-fight planned-vs-actual; the consumer Home needed an encounter-level rollup so the user can see at a glance: which mits are dropping most often, which raidwide mechanics are taking the most damage unmitigated. Without rollup, the per-fight signal stays hidden inside PullDetail.

Added — mit_audit_aggregate_for_encounter()

  • New function in analysis/mit_audit.py walks every watched fight for an encounter (same watchlist-scoping pattern as v1.8.0 cartography) and calls mit_audit_for_fight on each. Aggregates two perpendicular views:
    • Per-mit-ability (worst_mits): for each planned mit ability, how many planned occurrences vs how many actually fired. Sorted by miss-rate desc, tiebroken by absolute miss count — so "3/3 missed" surfaces above "5/20 missed", but a totally clean mit doesn't bury one that's missed 1/1.
    • Per-raidwide-mechanic (worst_mechanics): for each raidwide ability, how many occurrences hit us across watched fights + how many planned mit slots missed on it. Sorted by absolute miss count.
  • Also returns top-line totals: fights_aggregated, raidwide_casts, planned_slots_total, missed_mits_total, mit_hit_rate.
  • Ability name lookup folded in via one JOIN to abilities so the UI doesn't need a second roundtrip.

Added — GET /api/encounters/{id}/mit-audit-aggregate

  • Context-scoped; uses current static's watchlist. Returns the aggregate above as JSON.

Added — Home section "How mit usage is going"

  • New MitAuditSection in web/src/Home.jsx, placed between "What's killing us" and "Who's contributing to wipes".
  • Empty-strat empty state: when no plan is configured anywhere for the encounter, the section points the user at the Strat sub-tab instead of showing a blank table.
  • Stat strip: mit hit rate (color-graded — green ≥90, yellow ≥75, red below), total missed mits, total raidwide casts seen.
  • "Mits dropping the most" table — top 5 mits by miss rate with planned/missed counts.
  • "Raidwides taking the most damage unmitigated" table — top 5 raidwides with non-zero misses by absolute miss count. Hidden when nothing's missing.

Tests

  • 5 new in tests/test_mit_audit_aggregate.py: empty-watchlist returns zero shape; two-raidwide one-fired-one-missed yields 0.5 hit rate; worst-mit ranks Reprisal correctly; worst-mechanic ranks the raidwide correctly; foreign (unwatched) fights don't contaminate the aggregate.
  • 413 tests passing (408 → 413, +5).

No schema change. No new env vars.