fix(dashboard): restart live server when its code goes stale#142
Merged
Conversation
…he running process The dashboard server keeps serving the code it booted with, so dashboard self-improvements (e.g. the -1 not-measured sentinel filter) never reach the live charts until it restarts. The loop only restarted on a dead server, so a 14h-old process kept emitting 12 stale -1 sentinel points the code already filters. Add restart_if_stale: find the listener bound to the port, compare its start time to the newest dashboard source mtime, and restart when newer. The existing down→start net recovers if the restart misfires. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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 dashboard server serves the code it booted with. The autonomous loop only restarted it when down, so dashboard fixes (e.g. the -1 sentinel filter merged at 13:46) never reached the 00:39-old live server — it kept emitting 12 stale
-1sentinel points the code already filters. Addsrestart_if_stale: find the port's listener, compare start time vs newest dashboard source mtime, restart when newer. Down→start net recovers on misfire. node --test (35) green; verified live (sentinels 12→0 after restart).🤖 Generated with Claude Code