feat(orchestrator): C5 telemetry SSE source + dashboard server#47
Merged
feat(orchestrator): C5 telemetry SSE source + dashboard server#47
Conversation
Implements component C5 — the read-side observability plane. Two new modules: - telemetry.rs: TelemetrySource builds TelemetrySnapshot from live state (DriverPool snapshot + CommandDispatcher log slice + StatsCollector per-cluster latest), broadcasts to subscribers via tokio::broadcast. - sse_server.rs: minimal HTTP/SSE server (no extra deps; raw TCP + HTTP/1.1) on `GET /telemetry/stream`. Per-connection task subscribes and writes `data: <json>\n\n` events. Wire format uses serializable types (no Instant on the wire) — internal Instants are converted to ms-age fields relative to snapshot time so subscribers don't depend on the orchestrator's monotonic clock. Adds DriverPool::snapshot() and StatsCollector::latest_per_cluster() to expose the data the source needs without breaking existing callers. Out of scope (follow-up): - A binary `orchestrator-cli` that consumes the SSE stream and renders a terminal dashboard. The acceptance test for "CLI connects, renders, reconnects" is exercised by a generic SSE client which verifies the server-side reconnect tolerance — the CLI binary lands when there's a real terminal UX to ship. Closes #25. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #25 — orchestrator component C5 (read-side observability plane).
What this does
Two new modules:
Wire format uses serializable types (no `Instant` on the wire). Internal `Instant` values are converted to ms-age fields relative to snapshot time so subscribers don't depend on the orchestrator's monotonic clock.
Supporting changes
Out of scope (deliberate follow-up)
Test plan
Acceptance tests covered
All 4 from issue #25:
Closes #25.
🤖 Generated with Claude Code