From d2b4057bfcd9243bd17ebd075b6c3307a8d46512 Mon Sep 17 00:00:00 2001 From: Sebastian Gieseler Date: Thu, 29 Oct 2026 21:20:45 +0100 Subject: [PATCH] fix(daemon): a lane on a node keeps its copy in step with its mirror A lane's daemon on a node is its own main tree there (its lane name is empty) and runs its dev servers from a copy of the mirror all the same (runs_from_copy). The file watcher asked the lane name alone whether to keep a copy in step, so the copy stayed as the lane started: the node got every edit, its dev server served the code of before. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 7 +++++++ crates/devstack-daemon/src/supervisor/copy.rs | 2 +- crates/devstack-daemon/src/watch.rs | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3970bd66..f958d1fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ and listed with their assets on the ## [Unreleased] +### Fixed + +- **A lane on a node picks up edits**: its dev servers ran from a copy of + the worktree that its daemon there never brought up to date, so hot + reload showed the code of the lane's start; the file watcher took the + lane's daemon on the node for a main tree, which runs in place. + ## [0.30.0] - 2026-10-29 The skills of a pool's set can be taken one by one: each switched on or diff --git a/crates/devstack-daemon/src/supervisor/copy.rs b/crates/devstack-daemon/src/supervisor/copy.rs index e78198fa..a1397c11 100644 --- a/crates/devstack-daemon/src/supervisor/copy.rs +++ b/crates/devstack-daemon/src/supervisor/copy.rs @@ -15,7 +15,7 @@ impl Supervisor { /// A lane runs from a copy of its worktree, never from the worktree itself /// (ADR-0024): git and the tools that manage worktrees can remove one at /// any time, and a process inside it would hold it open (Windows). - pub(super) fn runs_from_copy(&self) -> bool { + pub(crate) fn runs_from_copy(&self) -> bool { // A lane on a node runs from a copy of its mirror too: `prepare` // installs there what the mirror lacks (ignored files, node_modules). !self.lane.is_empty() || crate::remote_lane() diff --git a/crates/devstack-daemon/src/watch.rs b/crates/devstack-daemon/src/watch.rs index 6e480939..3080eb5d 100644 --- a/crates/devstack-daemon/src/watch.rs +++ b/crates/devstack-daemon/src/watch.rs @@ -315,7 +315,10 @@ fn watch(sup: Arc) -> Result { .filter_map(move |(s, p)| set(p).map(|set| (g.clone(), s.clone(), set))) }) .collect(); - let lane = !sup.lane.is_empty(); + // What runs from a copy of the tree, to keep in step with it: a lane + // here, and a lane's daemon on a node, which is its own main tree there + // (its `lane` is empty) and runs from a copy of the mirror all the same. + let lane = sup.runs_from_copy(); let only_stack_file = built.is_empty() && devservers.is_empty() && containers.is_empty() && !lane; let stack_rel = sup