Skip to content

Reconcile stale active sessions on gateway restart (TASK-S21-006).

POST
/api/internal/sessions/reconcile-failover

Called by the tunnel gateway during startup to mark any sessions that are still in status=‘active’ (or ‘pending’) as ended with exit_reason=‘gateway_failover’. This covers sessions that were open when the gateway process was killed or restarted — those sessions could never be resumed because the in-memory grace context was lost. Idempotent: sessions already in a terminal state are skipped silently. Auth: X-Gateway-Token (shared secret).

Parameters

Header Parameters

x-gateway-token
Any of:
string

Responses

200

Successful Response

Response body for POST /internal/sessions/reconcile-failover.

object
ok
required
boolean
reconciled
required
integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string