add active host diagnostics endpoint#201
Conversation
Adds GET /diagnostics that synchronously probes external DNS, outbound TCP egress, and free disk on the data dir, returning a per-check result with name, ok, duration, and optional error/detail fields. Push-based OTEL metrics silently fail when a host is partially unreachable, so the control plane has no signal for network or DNS breakage. This endpoint is designed to be polled from a control-plane scheduled workflow so the inability to even reach the host becomes its own observable signal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ hypeman-go studio · code · diff
✅ hypeman-typescript studio · code · diff
✅ hypeman-openapi studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Summary
Adds
GET /diagnosticsthat synchronously probes:kernel.shvia the host's stub resolver1.1.1.1(no DNS dependency)Each check returns
{name, ok, duration_ms, error?, detail?}. The top-levelokis true iff all checks pass.Why
Push-based OTEL metrics silently fail when a host is partially unreachable, so the control plane has no signal for network or DNS breakage. This endpoint is designed to be polled from a control-plane scheduled workflow so the inability to even reach the host becomes its own observable signal — and per-check breakdowns localize the failure (DNS vs network vs disk).
The companion control-plane workflow lives in a separate kernel-kernel PR.
Test plan
probeDisk(success and missing path)runDiagnosticChecksreturns all three named checksHypemanMonitorScheduledWorkflowconsumes the response shape correctlyNotes
/diagnosticsrequires bearer auth like the other authenticated endpoints🤖 Generated with Claude Code