collabSupport/tests
jmcqueen 21fa8f1436 Clean up SD-WAN alarm rendering + explain overlay vs physical
The wanAlarms check was pasting raw Prisma `info` JSON blobs (nested
`vpn_reasons` arrays with element/site/vpnlink ids) into the chat
message field. On a store with 20 NETWORK_ANYNETLINK_DOWN flaps this
produced a wall of unreadable stringified JSON where the actual
signal ("SD-WAN overlay tunnels are flapping") was lost.

Introduces a shared alarmSemantics module that:
  - Buckets each code into overlay / physical / device / other so
    the check + renderer stay consistent
  - Humanizes codes (NETWORK_ANYNETLINK_DOWN → "SD-WAN overlay
    tunnel down") with a Title-Cased fallback for unknown codes
  - Rolls up (code + severity) tuples so 20 identical alarms show as
    a single line with ×20 and a "just now / Nm / Nh / Nd" age

Rewrites wanAlarms.run() to use those helpers + cross-reference the
site's physical link state so operators aren't left wondering why 20
alarms fired while every metric shows green: overlay flaps get a
"physical WAN paths are all up per Link State" clarifier, and
physical alarms point back at the Link State check. The label loses
its hardcoded "(last 1h)" suffix since the alarm window is now
dynamic (defaults to 24h to match the WAN window).

The follow-up renderer used by /phonestatus imports the same helpers
so the two surfaces cannot drift.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 10:19:15 -04:00
..
alarmSemantics.test.js Clean up SD-WAN alarm rendering + explain overlay vs physical 2026-07-09 10:19:15 -04:00
dectDiscovery.test.js DECT relay Phase 1: WSS hub + agent + /phonestatus follow-up 2026-07-02 17:03:32 -04:00
dectRelayHub.test.js DECT relay Phase 1: WSS hub + agent + /phonestatus follow-up 2026-07-02 17:03:32 -04:00
httpDigestAuth.test.js Add Cisco DBS-210 DECT base spike (HTTP Digest client + safe probes) 2026-07-02 15:30:42 -04:00
igmpFixPayload.test.js Detect and inline-remediate Meraki IGMP snooping in /phonestatus 2026-07-02 14:10:33 -04:00
igmpSummarizer.test.js Detect and inline-remediate Meraki IGMP snooping in /phonestatus 2026-07-02 14:10:33 -04:00
markdownToAdf.test.js Initial commit: CollabFinder Webex bot 2026-07-01 16:55:03 -04:00
paloalto.client.test.js Add Prisma SD-WAN voice-quality enrichment for /phonestatus + /voicediag 2026-07-09 09:45:29 -04:00
paloalto.metrics.test.js Add Prisma SD-WAN voice-quality enrichment for /phonestatus + /voicediag 2026-07-09 09:45:29 -04:00
paloalto.sites.test.js Add Prisma SD-WAN voice-quality enrichment for /phonestatus + /voicediag 2026-07-09 09:45:29 -04:00
pollerAdf.test.js Initial commit: CollabFinder Webex bot 2026-07-01 16:55:03 -04:00
renderers.test.js DECT relay Phase 1: WSS hub + agent + /phonestatus follow-up 2026-07-02 17:03:32 -04:00
renderers.wan.test.js Add Prisma SD-WAN voice-quality enrichment for /phonestatus + /voicediag 2026-07-09 09:45:29 -04:00
sdwanEnrichment.test.js Default WAN window to 24h + surface /voicediag in /help 2026-07-09 09:50:30 -04:00
statusXml.test.js Add DBS-210 status.xml parser + health verdict 2026-07-02 15:35:34 -04:00
voiceDiag.checks.test.js Add Prisma SD-WAN voice-quality enrichment for /phonestatus + /voicediag 2026-07-09 09:45:29 -04:00
voiceDiag.wan.test.js Clean up SD-WAN alarm rendering + explain overlay vs physical 2026-07-09 10:19:15 -04:00
voiceDiagRenderer.test.js Clean up SD-WAN alarm rendering + explain overlay vs physical 2026-07-09 10:19:15 -04:00