Skip to content

fix: a lane takes its changed stack file at the up after its down (#487) - #489

Merged
7schmiede merged 1 commit into
mainfrom
fix/lane-rereads-stack-file
Nov 9, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/lane-rereads-stack-file

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

devstack down in a worktree stops the lane's services (/v1/down to the lane's API) but keeps the lane in the daemon's map. A lane reads its worktree's stack file only when it is opened, so the up that followed found it still open and ran with the old file: a new env variable took no effect, without a word, while the main tree's daemon ran (#487).

Now a started lane of which nothing runs, whose worktree's stack file changed since it was opened (hash, line endings aside), is opened again from the file as it is at the up (the lane's POST /v1/up, and POST /v1/lanes). A file that does not load now is the answer (409) and the lane stays as it was. A lane that runs, or serves the main ports, keeps what it read; devstack status already said the file changed and now says how it applies in a lane, and, for the main tree, that its daemon stays while lanes run. Docs (docs/stack-file.md), the dashboard's Activity text and the changelog say the same.

Closes #487

Cause A lane's supervisor reads the stack file once, when the lane is opened; down in a lane does not close it, so the next up reused it.
Bug class stale-config
Proof New integration test a_lane_started_again_reads_its_changed_stack_file (no SDK needed): red on main (after down + up the service ran with the old value), green with the fix. Locally on Windows also a_worktree_runs_as_a_lane (.NET) and edits_become_candidates.
Siblings The main tree: its daemon reads the file only at its start and stays while lanes run; left as it is (reloading the main supervisor that hosts the lanes is a change of its own), status now says so. A lane on a node: down + up there goes to the node's daemon, which keeps the file synced at the lane's start; not reproduced here (needs a node), to be looked at separately.
Guard The test above, in the integration suite of every platform.

No review card: no trust, concept, contract or term point; the change makes the documented "applies with devstack down + devstack up" true for a lane. Decided on my own: a lane that runs anything (or holds the main ports) is not reopened at up; the reopened lane keeps its workers setting and profile.

🤖 Generated with Claude Code

`devstack down` in a worktree stops the lane's services but keeps the lane
in the daemon, and the lane kept the stack file it read when it was first
opened: the `up` that followed ran without a new variable, silently.
Now `up` (and a start through `POST /v1/lanes`) opens a lane of which
nothing runs again when its worktree's file changed; a file that does not
load is the answer and the lane stays as it was. `status` says how a
change applies, for a lane and for the main tree (whose daemon stays while
lanes run).

Bug-Class: stale-config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 2251ee3 into main Nov 9, 2026
@7schmiede
7schmiede deleted the fix/lane-rereads-stack-file branch November 9, 2026 14:33
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.

A lane keeps an old stack file: a changed devstack.toml in its worktree takes no effect while the main tree's daemon runs

1 participant