Replace GetNode heartbeat hack with proper Heartbeat RPC#109
Merged
Replace GetNode heartbeat hack with proper Heartbeat RPC#109
Conversation
The agent heartbeat was piggybacking on GetNode RPCs, which gave GetNode a write side-effect and discarded the telemetry the agent collected (always sending 0,0 for cpu_load/free_memory_mb). - Add unary Heartbeat RPC (replaces both the GetNode hack and the unused streaming Heartbeat stub) that carries real telemetry - Remove write side-effect from GetNode (now a pure read) - Return NotFound for heartbeats from unregistered nodes so agents get visibility into controller state mismatches - Remove inline string-matching recovery from update_heartbeat; node recovery is handled solely by check_node_health via the state machine (admin_locked flag, not reason strings) - Delete dead WalOperation::NodeHeartbeat (never proposed, heartbeat telemetry is ephemeral and does not belong in the WAL) - Remove redundant tests covered by existing state machine and health check unit tests - Remove unused tokio-stream dependency and streaming stub from spurctld - Update spur-k8s heartbeat to use the new RPC; remove the re-register-on-NotFound fallback (Raft WAL preserves node state across restarts, registration is the node watcher's job) Made-with: Cursor
powderluv
approved these changes
Apr 19, 2026
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.
The agent heartbeat was piggybacking on GetNode RPCs, which gave GetNode a write side-effect and discarded the telemetry the agent collected (always sending 0,0 for cpu_load/free_memory_mb).