HydraIssues

Streaming observability batch 4: Sunshine health probe + session log access
open unclassified Project: hydracluster Reporter: 22 May 2026 00:17

Description

Tracks the next batch of streaming observability improvements. Builds on the session health system shipped in batch 3 (v2.0.54–v2.0.87, v0.2.145–v0.2.146).

## Open items

### #349 — Sunshine health probe (hydrabody)
Poll ListApps() on the idle tick. If unreachable, report ProviderStatus = "sunshine_api_unreachable" in the next body status POST. hydracluster emits a structured event visible in the event stream and streaming monitor. Gives agents and operators an immediate signal when Sunshine is hung, without requiring a user report first. No auto-restart in this issue.

### #350 — Session-correlated log fetching (hydracluster)
Add GET /api/v1/nodes/{id}/body-logs mirroring the existing head logs endpoint. Add ?since= and ?until= RFC3339 query params to both log endpoints. Add GET /api/v1/sessions/{id}/logs that returns head + body logs for the session time window in one parallel call. Turns session debugging from a multi-step exec+filter process into a single API call.

## Context

The session health infrastructure (bi-directional heartbeats, UUID correlation, streaming monitor columns, session lifecycle logging) is now in place. This batch adds the remaining observability layer: knowing when Sunshine itself is unhealthy, and being able to pull the relevant log window for any session without manual exec.

Workflow target: report comes in → agent checks event stream → sees sunshine_api_unreachable or session UUID mismatch → calls GET /api/v1/sessions/{id}/logs → full picture in one step.