Skip to content

fix(daemon): a lane on a node keeps its copy in step with its mirror - #375

Merged
7schmiede merged 1 commit into
mainfrom
fix/remote-lane-copy
Oct 29, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/remote-lane-copy

Conversation

@7schmiede

Copy link
Copy Markdown
Member

A lane on a node did not hot-reload. The node received every synced edit into its mirror (/src), but the lane's dev server runs from a copy (/src/.devstack/lanes/main/src), and that copy stayed as the lane started. Found in use: a dashboard lane on int-baumeister served the code from its start, although the files in /src were current.

Cause:

  • watch.rs decided whether to keep a copy in step by !sup.lane.is_empty().
  • A lane's daemon on a node is its own main tree there, so its lane name is empty.
  • It still runs from a copy (runs_from_copy: !lane.is_empty() || remote_lane()).
  • So the watcher never called copy_changed. For a stack with only a dev server (no restart_on), it watched the stack file alone.

Fix: the watcher asks runs_from_copy(), which is now pub(crate).

No review card: a bug fix, no category point.

Checked

  • cargo fmt, cargo clippy -p devstack-daemon --all-targets: clean.
  • cargo test -p devstack-daemon (Windows): green.
  • Not added: a regression test. remote_lane() reads its environment once per process, so a test would need a lane run on a node. The remote-lane CI job starts one.
  • Effect needs a release: a node's lane runs the node's devstack binary, so the fix shows on a node only after a release reaches it.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 0ea6c4e into main Oct 29, 2026
13 checks passed
@7schmiede
7schmiede deleted the fix/remote-lane-copy branch October 29, 2026 21:08
@7schmiede 7schmiede mentioned this pull request Oct 30, 2026
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.

1 participant