Repository navigation
fix(daemon): the main tree runs prepare when its inputs changed (#630) - #632
Merged
Merged
Conversation
The main tree ran its dev servers in place and never ran `prepare` there: after a merge that brought packages, a restart kept the dev server on the old node_modules, and only its import errors said so. Now `prepare` runs in the main tree before a service starts when the files of its `inputs` changed since it last ran there (a mark under .devstack/prepared-tree/) or one of its `outputs` is gone. A restart that prepares stops the running instance first, so `npm ci` can replace files Windows keeps locked. While a service runs, here or in a lane, a change to its inputs is a notice. ADR-0062 amended (the main tree prepares in place, without the store); the first start after this release prepares once. Bug-Class: stale-cache Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Closes #630.
The main tree ran its dev servers in place and never ran
preparethere(ADR-0044 point 5, ADR-0062). After a merge that brought packages, a
restart kept the dev server on the old
node_modules; only its importerrors said so, and a hand-made
npm cifailed with EPERM on Windows whilethe dev server ran.
up,start,restart), itsprepareruns in the tree itself when the files of itsinputschangedsince it last ran there (a mark under
.devstack/prepared-tree/) or adirectory of its
outputsis gone. Never prepared there counts aschanged: the first start after this release prepares once.
the proxy, instead of starting a candidate beside it: Windows keeps the
files
npm cireplaces locked.inputsis a notice namingdevstack restartandrestart_on.Review card
inputsof its lastprepare(in.devstack/)node_modulesdropped: the restart prepares by itself (the owner chose the automatic variant)devstack restart <svc> --preparerestart_onwith the lockfile doesnpm ciin the middle of workApproved by the owner on 2026-11-26, points 1, 2, 4, 5, with the
automatic variant: "Breaking changes are accepted as long as we create a
lasting solution; no
version = 2. Choose the technically right way."Verified
prepareruns as a process): red first at theexpected assertions, green with the fix. In-place prepare, same inputs
keep what is there, new inputs prepare again, missing outputs prepare
again, a failing
preparestops the start with its tail.change and
restart; this build shows the notice, the restart serves thenew file, and a second restart with the same inputs does not prepare.
cargo fmt,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(917 passed), anda_worktree_runs_as_a_lanewith
DEVSTACK_INTEGRATION=1.Bug-Class: stale-cache
🤖 Generated with Claude Code