Repository navigation
fix: an up after a down takes the changed stack file (#490) - #493
Merged
Merged
Conversation
The MCP tool `down` (POST /v1/down) stops the main tree and leaves the daemon its few seconds before it ends by itself; an `up` in that time ran in that daemon, with the stack file it read at its start. `ensure_daemon` now ends a daemon that read an older stack file and runs nothing (no service of the main tree, no lane) before it starts one, so every way to `up` (CLI, MCP, the hub's start) reads the file as it is. A daemon in which something runs stays. Bug-Class: stale-config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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
After a stack-file change,
devstack statussays it applies withdown+up. The CLI'sdownends the daemon (/v1/shutdown), but the MCP tooldown(and the dashboard's stop) only stops the tree (POST /v1/down); the daemon then ends by itself a few seconds later (ADR-0095,GRACE). Anupwithin that time reached the same daemon, which still held the stack file it read at its start: services restarted without the new variable, and the warning stayed (#490).ensure_daemon, which everyupgoes through (CLI, MCP, the hub's start), now ends a daemon that read an older stack file and runs nothing (no service of the main tree, no lane;/v1/shutdown?unless_lanes=true, so a lane started meanwhile keeps it) and starts a new one. A daemon in which something runs stays, andstatussays how the change applies.Closes #490
upthat finds a daemon uses it; a daemon reads the stack file once, and one that ran nothing afterPOST /v1/downwas still there for a few seconds.stale-config(sibling of #487, fixed in #489 for a lane)an_up_after_a_down_reads_the_changed_stack_file: red onmain(the service readoneafter the change totwo), green with the fix. A second, over-eager version (ending the daemon even while its services run) fails the test's second half (the daemon's pid must stay).devstack up(start_up), so through this fix. A main tree whose daemon serves lanes keeps its file untildown --all;statussays so since #489.No review card: a fix within ADR-0095 that makes the documented
down+uptrue.🤖 Generated with Claude Code