Files
orca/cloud/apps
Neil 8ea8406c64 relay-edge: control liveness on any frame, signed drain op, small-volume alerts (#39706)
* relay-edge: any inbound control frame refreshes control liveness

A control that keeps sending commands or auth refreshes is alive even when
its pongs are late. Every inbound frame from an active control now refreshes
lastPongAt (field name kept so hibernated attachments read the same field);
pong_rtt_ms is still recorded for pongs only.

* relay-edge: signed admin op drain

POST /__admin/drain { relayHostId }, signed like assign/export/erase with
op 'drain'. Every control of the host gets the lease-expiry drain frame
(graceMs 0, resolve-director), closes 4503 'host leaving edge' and goes
through the normal socket-gone path. Returns 200 { outcome: 'idle' } or
{ outcome: 'drained', controls }. Assignment, devices and splices untouched.

* relay-edge: alerts that fire at small volume, and an edge probe

Absolute-count rules regardless of MIN_VOLUME: admin-failures (>= 3 admin
calls per 15 min whose label is not an expected outcome) and
auth-refusals-low-volume (>= 5 4401s below MIN_VOLUME). Optional
EDGE_PROBE_URL: each run sends an unauthenticated control upgrade and
alerts unless it gets 401 within 5 s (stateless: every failing run alerts).

* relay-edge: MVP checks for control liveness and the drain op
2026-11-07 19:51:09 -08:00
..