Skip to content

fix: a service without watch builds from the tree after a daemon restart (#562) - #564

Merged
7schmiede merged 1 commit into
mainfrom
fix/static-restore
Nov 18, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/static-restore

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

The first start after a daemon start (devstack down/up, lane stop and up again) ran the build last promoted to main (ADR-0016), and only a service with watch gets the tree's changes as a candidate afterwards. Without watch nothing ever replaced the restored build: a static bundle of an acceptance profile served the code of its first run until devstack restart, and the suite ran against it.

restorable now restores only a service with watch. A service or job with build and without watch goes through its build at that start; the build id covers every file of the tree then, so an unchanged tree reuses its artifact at once (build_reused) and only a changed one builds. up reports it healthy once the tree's code runs.

  • ADR-0016: addendum 2026-11-18
  • docs/stack-file.md: how a service without watch follows the tree
  • CHANGELOG.md: Fixed

Review card

Category Point Beats Cost of reversing
Contract A service or job with build and without watch builds from the tree at its first start after a daemon start; same inputs reuse the existing artifact. Restoring the last promoted build, which nothing replaces without watch One condition in restorable
Concept ADR-0016 point 4 (restore without building) gets an addendum: it holds for services whose changes arrive as candidates (watch). Restore plus a later candidate: fast start, but up --run would still test the old build Addendum text
Contract watch stays refused on a profile's service; the stack file does not change. The issue's suggestion of a new key (*_SINCE, profiles grow) Can come later without a break

Approved by the owner 2026-11-18: points 1, 2 and 3.

Decided on my own: no hint in status that a static artifact predates the tree (the issue's third suggestion); the fix makes it unnecessary.

Bug report

Cause restorable started the promoted build also for services without watch, and follow_restore makes no candidate for those
Bug class stale-artifact
Proof without_watch_the_first_start_builds_from_the_tree (daemon_lifecycle.rs) red on main: after an edit while down, up started the same build id; green with the fix, an unchanged tree keeps its id
Siblings none: searched every watch-dependent path in the daemon; the prebuild uses restorable and is fixed with it
Guard the new integration test; a_failed_first_start_restores_again keeps restoring for services with watch

Tested on Windows: fmt, clippy, daemon_lifecycle (20 passed, 8 need .NET/Docker), devstack-daemon (218). Not reproduced on a pool node (--on); the path there is the same function.

Closes #562

🤖 Generated with Claude Code

…art (#562)

The first start after a daemon start (down/up, lane stop and up again)
ran the build last promoted to main, and only a service with `watch`
gets the tree's changes as a candidate afterwards. Without `watch`
nothing replaced the restored build: a static bundle of an acceptance
profile served the code of its first run until `devstack restart`.

`restorable` now restores only a service with `watch`. One without goes
through its build; the build id covers every file then, so an unchanged
tree reuses its artifact and a changed one builds. ADR-0016 gets an
addendum, stack-file.md says how a service without `watch` follows the
tree.

Bug-Class: stale-artifact
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 756530f into main Nov 18, 2026
14 checks passed
@7schmiede
7schmiede deleted the fix/static-restore branch November 18, 2026 10:05
@7schmiede 7schmiede mentioned this pull request Nov 18, 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.

Static service in a profile reuses its old build after a source change (no watch allowed)

1 participant