Skip to content

Let heartbeats re-register testrunners the server has forgotten - #272

Merged
soulgalore merged 2 commits into
mainfrom
heartbeat-reregister
Aug 9, 2026
Merged

soulgalore merged 2 commits into
mainfrom
heartbeat-reregister

Conversation

@soulgalore

Copy link
Copy Markdown
Member

The index page showed "Waiting for test runners to come online" while the API kept accepting and running jobs. The online state comes from an in-memory registry fed only by a runner's start broadcast, while API queue routing lives in separate add-only maps. The registry prune only needs the local clock, but heartbeat delivery needs Redis — so a Redis outage longer than the stale window got a perfectly healthy runner pruned. Once pruned, its heartbeats were deliberately ignored and nothing ever asked it to announce itself again, so the state stuck until a process restart.

Heartbeats now carry the runner's serverConfig so the server can re-register an unknown-but-alive runner on the next beat, making the registry self-healing within one heartbeat interval. Old runners without the payload keep the previous behavior. Heartbeat jobs are also cleaned up on completion now — they fire every 30s and were accumulating in Redis forever.

Co-authored-by: Claude Fable 5 noreply@anthropic.com

The index page showed "Waiting for test runners to come online" while the API kept accepting and running jobs. The online state comes from an in-memory registry fed only by a runner's start broadcast, while API queue routing lives in separate add-only maps. The registry prune only needs the local clock, but heartbeat delivery needs Redis — so a Redis outage longer than the stale window got a perfectly healthy runner pruned. Once pruned, its heartbeats were deliberately ignored and nothing ever asked it to announce itself again, so the state stuck until a process restart.

Heartbeats now carry the runner's serverConfig so the server can re-register an unknown-but-alive runner on the next beat, making the registry self-healing within one heartbeat interval. Old runners without the payload keep the previous behavior. Heartbeat jobs are also cleaned up on completion now — they fire every 30s and were accumulating in Redis forever.

Co-authored-by: Claude Fable 5 noreply@anthropic.com
@soulgalore
soulgalore merged commit a8056f0 into main Aug 9, 2026
10 checks passed
@soulgalore
soulgalore deleted the heartbeat-reregister branch August 9, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant