Skip to content

feat(prepare): warm the store for a ref before a lane needs it, here and on nodes (ADR-0065) - #296

Merged
7schmiede merged 6 commits into
mainfrom
feat/prepare-warm
Oct 26, 2026
Merged

7schmiede merged 6 commits into
mainfrom
feat/prepare-warm

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Closes #290. Builds ADR-0065 (accepted).

  • Config: [prepare] warm = ["origin/main"] (PrepareSettings); a ref devstack hands to git (no option, no range, no whitespace); an error without a service whose prepare names outputs; WARM_SINCE = 0.24.0 warning.
  • Here (crates/devstack-daemon/src/warm.rs): the main tree's daemon reads each ref's commit every minute (never fetches); a new commit, quiet for two minutes, is checked out under .devstack/warm/ with an index of its own (read-tree, checkout-index), so the key is a checkout's (line endings, filters) and the worktree/index/worktree list stay untouched. Inputs first; the rest only for a key the store lacks; prepare under the one-at-a-time lock (Supervisor::warm_service). Last commit per ref in .devstack/warm/done.json; a failure is a notice, retried at the next commit.
  • Nodes (lanes.rs warm_nodes, remote.rs RemoteLane::warm): the nodes of ran_on whose slots hold a lane of the repository get a warm lease (lane warm--<ref>), on a fresh checkout (not the one with this machine's outputs): lease → sync → start → GET /v1/warm until done → release. The node (devstack-node): warm in LeaseRequest/Lease/NodeLease/NodePolicy (false anywhere refuses), no Compose group for a warm lease, DEVSTACK_WARM → the lane's daemon runs warm_lane only. A node before 0.24.0 is not asked (it would start a whole lane); a 404 from /v1/warm ends at once.
  • Docs: docs/stack-file.md, docs/pool.md, docs/dashboard-api.md, ADR-0065 paths as built, CHANGELOG.
  • Tests: config validation; warm_here with the key in the store (only inputs checked out) and, on Windows, without it (whole ref, prepared into the store, then a hit). remote-lane CI: warm = ["HEAD"] in the fixture, timing via DEVSTACK_WARM_EVERY_MS/_QUIET_MS; after a commit on the main branch the daemon log must show prepare_warmed with place local and remote.

Merged with #295 (the store dashboard): run_prepare returns PrepareView.

🤖 Generated with Claude Code

@7schmiede
7schmiede merged commit 02a010d into main Oct 26, 2026
13 checks passed
@7schmiede
7schmiede deleted the feat/prepare-warm branch October 26, 2026 21:12
7schmiede added a commit that referenced this pull request Oct 26, 2026
The release now also carries #295 (the dashboard shows the store of what
prepare makes) and #296 (`[prepare] warm`, ADR-0065): the summary, plan.md
and the devstack-config skill say so, and a frozen compat file holds
`[prepare] warm`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede 7schmiede mentioned this pull request Oct 26, 2026
7schmiede added a commit that referenced this pull request Oct 26, 2026
* chore: 0.24.0

A lane on a pool node now gets what its `prepare` makes without a second
install: its worktree here is linked to a copy from this machine's store, so
a pre-commit hook with `npx eslint` runs there (ADR-0063), and the node keeps
a store per member and repository, so the next lane with the same lockfile
copies `node_modules` instead of running `npm ci` (ADR-0062). The daemon in a
lane's container sends its own lines through its requester, under the
member's consent (ADR-0037 addendum).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: 0.24.0 with the warm store and the store dashboard

The release now also carries #295 (the dashboard shows the store of what
prepare makes) and #296 (`[prepare] warm`, ADR-0065): the summary, plan.md
and the devstack-config skill say so, and a frozen compat file holds
`[prepare] warm`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

prepare store: warm a ref's key before a lane needs it (warm = ["origin/main"])

1 participant