Repository navigation
feat(pool): a lane's need is measured where it ran, disk included (ADR-0049) - #193
Merged
Merged
Conversation
…d (Proposed) A lane's need gets disk (split into the repository's images and the lane's slot) and a GPU ask. The node measures each run; the coordinator keeps the maximum of the last five runs per repository and profile. Without a footprint the requester estimates from its main tree. The stack file's [lanes.need] is a floor, not an override. Disk is counted per candidate (what its slots already hold), against free plus prunable space, and held per lease like memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…R-0048) ADR-0048 accepted, point 9 amended (a lane here checks what it adds). - A need is CPU, memory, disk (the repository's images, the lane's slot) and GPUs (`share::Need`, a superset of `Amount` on the wire). - A node measures each lease's run (memory and CPU over a minute each round, slot, volumes and images every five minutes and at its end) and reports it; a run counts after three minutes. - The coordinator keeps the last five runs per repository and profile (`footprints.json`); the need is the most of them, else the requester's estimate, raised to the stack file's floor. - Disk counts per node (nothing where the lane is kept, its own part where the repository ran), against free plus what kept lanes take, held per lease until written; kept lanes go before a lane needing their room starts. A named node is checked like a placed one. - GPUs asked for go to nodes that offer them. - The requester estimates from the main tree (peaks of the last ten minutes, tree, state, volumes and Compose images) and sends the floor of `[lanes.need]` / `[profiles.<name>.need]` and its profile. - A node short of disk says so with each renewal (`remote_lane_disk`); a local lane checks the disk of its worktree's drive. - The lease offer says the need and where it came from; the dashboard shows the disk a lane needs on each node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sion locks them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/adr/README.md
… first Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # docs/adr/README.md
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.
Implements ADR-0049 (accepted; point 9 amended): a lane's need is measured where it ran, disk included, and the stack file sets a floor.
What changes
share::Need): CPU, memory, disk (split into the repository's images and the lane's slot) and GPUs. On the wire it is a superset ofAmount, so older peers read its CPU and memory.runs.rs): memory and CPU (averaged over a minute) each round, slot, volumes and images every five minutes and at the lease's end. A run counts once its lane ran three minutes; it goes to the coordinator with the node's report.footprint.rs,footprints.json): the last five runs per repository and profile. The need is the most of each part over those runs, else the requester's estimate, raised to[lanes.need]/[profiles.<name>.need]. The lease offer says the need and where it came from.disk_room), with 5 GiB to spare. Each lease holds its disk until it has written it, so nothing counts twice. A node removes kept slots (least recently used first) before a lane that needs their room starts. A named node (--on) is checked the same way as a placed one.--gpus) is still open (ADR-0036 point 4).Sampler::estimate): the peaks of the last ten minutes, plus as disk the tree without.gitand its state, the snapshot, artifacts, logs, volumes and Compose images. It sends that estimate with the floor and its profile.remote_lane_disk. A local lane checks the disk of its worktree's drive (--forceskips the check).devstack-configskill, and ADR-0049's as-built note (what is not built yet is listed there).Compatibility
All fields are additive. An older node ignores the disk need and admits by CPU and memory; an older coordinator places by
disk_free. Stack files load as before; a file withneedshould sayrequires = "0.17.0".Lanes may now fit fewer nodes than before: the need is the measured or estimated peak, where it used to be the main tree's memory at that moment and 0.5 CPU for every stack. A node also needs the lane's disk plus 5 GiB.
Tests
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(416), UI typecheck and vitest all pass locally on Windows. The Linux-only ignored tests (remote_lane,lanerun) run in CI. Not yet tried against a real pool.🤖 Generated with Claude Code