Files
coder/codersdk
Mathias Fredriksson 9bbc20011a fix(enterprise/coderd/diagnostic): handle peer_update_lost and fix disconnect semantics
Previously the diagnostic handler classified sessions only from
disconnect_reason strings, never detecting client_disconnected or
peering-event-based control_lost. The peer_update_lost event was
silently dropped by the default case in mergePeeringEventsIntoTimeline,
and peer_update_disconnected was mislabeled as "Peer lost contact"
when it actually represents a clean coordinator disconnect.

Changes:
- Add DiagnosticTimelineEventPeerDisconnected constant for the clean
  coordinator disconnect event (peer_update_disconnected).
- Handle peer_update_lost in the switch to emit peer_lost timeline
  events with error severity.
- Reclassify peer_update_disconnected as info severity with correct
  "Peer disconnected" description.
- Add classifyStatusFromTimeline to upgrade session status based on
  peering events: sessions with peer loss but no clean coord disconnect
  become control_lost, sessions with no peering events become
  client_disconnected.
- Include client_disconnected in the "lost" summary bucket.
2026-02-13 13:09:50 +00:00
..
…
…