Skip to content

fix(daemon): a change saved while a lane's dev server starts reaches it (#631) - #634

Merged
7schmiede merged 1 commit into
mainfrom
fix/copy-sync-while-starting
Nov 26, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/copy-sync-while-starting

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

Closes #631.

A lane's copy takes the worktree's changes only while a service runs from
it (copy_changed). That test looked at main, which a service becomes
once it is ready. A dev server whose first build failed on a half-made
change is never ready, so the save that completed the change never reached
its copy: it stayed starting until its health timeout (300 s), and the
services after it waited. The pool's telemetry showed it: six
remote_lane_synced on the node between 11:30 and 11:32Z, no
copy_synced (why: change) until the restart made the service healthy.

Now a service that is still starting from the tree (no artifact) counts
too (from_tree), for a lane here and on a node. The notice about changed
prepare inputs (#630) had the same gap and uses the same test. The other
main.is_some() checks mean "serves requests" and stay.

Not in this pull request: that a failed first build shows as failed
instead of starting for the whole health timeout, and that services
waiting for it say so (follow-up issue).

Verified

  • Unit test a_dev_server_that_is_starting_runs_from_the_copy: red first
    at "did not take the worktree's changes", green with the fix; a built
    service that is starting does not count.
  • Reproduced in a local lane (a dev server that answers after 40 s, a file
    saved while it is starting): with 0.53.0 the copy kept the old content
    8 s later; with this build it has the new one.
  • cargo fmt, cargo clippy --workspace --all-targets -D warnings,
    cargo test --workspace (918 passed).

Bug-Class: race-on-start

🤖 Generated with Claude Code

…it (#631)

A lane's copy took the worktree's changes only once a service running from
it was main, which it becomes when it is ready. A dev server whose first
build failed on a half-made change never got the save that completed it
and stayed `starting` until its health timeout, the services after it
waiting. Now a service that is still starting from the tree counts too
(`from_tree`), here and in a lane on a node; the notice about changed
`prepare` inputs (#630) uses the same test.

Bug-Class: race-on-start
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 7f159a2 into main Nov 26, 2026
14 checks passed
@7schmiede
7schmiede deleted the fix/copy-sync-while-starting branch November 26, 2026 15:27
@7schmiede 7schmiede mentioned this pull request Nov 26, 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.

Pool lane: dev server doesn't rebuild a change saved during its failed first build; service stays 'starting' for the whole health timeout

1 participant