Repository navigation
fix: a restart under way keeps the daemon - #481
Merged
Merged
Conversation
Since the daemon ends with the last tree (ADR-0095), the idle check could fall into a restart's gap: the service stopped, not yet started, nothing else running. On Windows the stop takes seconds, so the daemon ended there and its integration tests failed now and then with "connection refused". A restart under way now counts as running. Bug-Class: a state between two steps of one operation read as the end state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 6, 2026
Merged
7schmiede
added a commit
that referenced
this pull request
Nov 9, 2026
A candidate of a service without a proxy takes over by a stop and a start (`take_over`), from the watcher, with no request holding the daemon: when the idle check ran in the gap, the daemon ended and the start ran in a daemon on its way out (`an_edit_while_exited_follows_the_restart`, Windows CI, twice). #481 guarded `restart` alone; `switching` is now the one guard, used by restart, take-over, relaunch and the hot-reload switch. Bug-Class: race-on-idle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
added a commit
that referenced
this pull request
Nov 9, 2026
…art (#491) * fix: every stop followed by a start holds the daemon, not only a restart A candidate of a service without a proxy takes over by a stop and a start (`take_over`), from the watcher, with no request holding the daemon: when the idle check ran in the gap, the daemon ended and the start ran in a daemon on its way out (`an_edit_while_exited_follows_the_restart`, Windows CI, twice). #481 guarded `restart` alone; `switching` is now the one guard, used by restart, take-over, relaunch and the hot-reload switch. Bug-Class: race-on-idle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: one Fixed section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <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.
What and why
Since 0.41.0 the daemon ends with the last tree (ADR-0095): once a second passes with nothing running and no request holding it, it ends. A restart (
restart_on,devstack restart, a rebuild, a hot-reload restart, a dependent's restart) stops the service before it starts it again; in that gap nothing runs. On Windows the stop takes seconds, and the daemon ended in it:That is the "connection refused" the Windows integration jobs showed now and then today (#470, #478, the release pull request #480, and
mainafter #472 and #469), in whichever test restarted a service. A user sees it as a dashboard and CLI that find no daemon after a restart, until the nextup.Supervisor::runs_anythingnow counts a restart under way (restarts_under_way, whichrestartalready kept) as running.Checked
a_restart_under_way_counts_as_running: red without the fix, green with itrestart_on_a_folder_restarts_for_each_file_in_itandan_edit_while_exited_follows_the_restartgreencargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test -p devstack-daemonSiblings looked at: a lane's restart is covered already (
lanes.restarting()); hot reload,restart_runningand a dependent's restart go throughrestart. Not covered: a Compose container'sdocker restart, if it were the only thing running.🤖 Generated with Claude Code