Skip to content

feat(dashboard): show the store of what prepare makes (ADR-0062) - #295

Merged
7schmiede merged 2 commits into
mainfrom
feat/store-dashboard
Oct 26, 2026
Merged

7schmiede merged 2 commits into
mainfrom
feat/store-dashboard

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Closes #291

API (docs/dashboard-api.md)

  • ServiceView.prepare?: {source: "store"|"run", at, ms, key?, prepare_ms?, miss?, stored?}: where the service's last prepare outputs came from. It is kept in the supervisor's memory from when run_prepare ends (a lane's copy, a build's snapshot). miss says why the store gave nothing: no entry for these inputs on this machine, copying took longer than running, version failed, an output tracked in the repository, or the node gives the lane no store. It is absent when no prepare ran since the daemon started (no file format change).
  • GET /v1/store -> {owned, bytes, entries: [{service, key, outputs, bytes, files, created, last_used, prepare_ms, copy_ms?, used_by}]}, the largest first. used_by: the trees (lane names, "" the main tree) whose service's last prepare came from the entry or went into it. A lane's API answers from the same store (a lane on a node: the member's store there, owned: false).
  • DELETE /v1/store/{service}/{key}: 204. 404 when there is no such entry (or the name cannot be one). 409 while a prepare of that key in this daemon holds it (waits 5 s), or for a node's store.
  • Node report kept.store_bytes? (part of kept.bytes): optional, serde(default). Older nodes and coordinators omit it.

Views

  • ServiceDetailView.vue: a "Prepare" row in Details, e.g. from the store, copied in 2.4s; prepare took 2m 40s when it made them · 3 min ago · key … or prepare ran, 41.0s (store miss: no entry for these inputs on this machine); kept in the store.
  • UsageView.vue + new StoreLine.vue: "Store of what prepare makes: 3 entries, 1.2 GB". It opens a modal with the entries (service, short key, outputs, size, made/prepare/copy times, last used, used by) and a remove action per entry (with a confirmation). It always asks the main tree's daemon.
  • PoolView.vue: next to "N kept, X" a node shows "store Y". The kept figure then leaves out the store, when the node reports it.
  • Mocks for all of it; ui/src/lib/store.ts with vitest.

A lane's start phases (moving.phases) are the node's steps up to the point where the lane's daemon runs there. prepare runs after that, in that daemon, so it shows in the lane's service view (through the lane's API) and not as a new phase.

Tests

  • cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test -p devstack-daemon -p devstack-node: pass (new: a_service_says_where_its_prepare_came_from_and_the_store_lists_and_removes_entries, what_a_node_keeps_names_its_store_and_older_nodes_need_not)
  • cd ui && npm ci && npm run typecheck && npx vitest run && npm run build: pass (72 tests)

🤖 Generated with Claude Code

7schmiede and others added 2 commits October 26, 2026 21:33
A service's view says where its last `prepare` outputs came from
(`ServiceView.prepare`): copied out of the store (key, copy time, what
`prepare` took when it made the entry) or a run (its time, why the store
gave nothing, whether it went into the store). `GET /v1/store` lists the
store's entries with their size, last use and the trees that use them;
`DELETE /v1/store/{service}/{key}` removes one. A node reports its
members' stores apart in `kept.store_bytes` (optional, older nodes omit
it).

The dashboard shows the source in the service detail view, a store line
on the usage page opening the list with a remove action, and a node's
store beside what it keeps in the pool view.

Closes #291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s source on Windows only (no shim in a unit test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 3574551 into main Oct 26, 2026
13 checks passed
@7schmiede
7schmiede deleted the feat/store-dashboard branch October 26, 2026 20:47
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.

Dashboard: show the prepare store (hits in a lane's start, entries and their size)

1 participant