Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .claude/skills/devstack-config/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: devstack-config
description: "Edits this repository's devstack stack file (devstack.toml): adding or changing a service, a Compose group, a command or a group; watch paths, health checks, background workers, promotion holds, environment from Compose, placeholders. Validates every change with `devstack check` and knows that a running daemon does not reload the file. Use it whenever devstack.toml is created or touched, e.g. \"add the worker to devstack\", \"devstack should restart X when Y changes\", \"add a seed command\", \"the service needs variable Z\", \"why does the candidate not switch\", \"set up devstack for this repo\". For running the stack, use the skill `devstack`."
---

<!-- generated by devstack 0.22.1 from devstack.toml (devstack skills install): edits here are overwritten; put project specifics into a skill of your own -->
<!-- generated by devstack 0.23.0 from devstack.toml (devstack skills install): edits here are overwritten; put project specifics into a skill of your own -->

# devstack-config: change the stack file

The reference for every key is **[docs/stack-file.md](https://github.com/nuetzliches/devstack/blob/v0.22.1/docs/stack-file.md)**
The reference for every key is **[docs/stack-file.md](https://github.com/nuetzliches/devstack/blob/v0.23.0/docs/stack-file.md)**
(this skill names the rules that are easy to get wrong; the reference has the
details). A complete example: [examples/devstack.toml](https://github.com/nuetzliches/devstack/blob/main/examples/devstack.toml).

Expand Down Expand Up @@ -63,6 +63,10 @@ without a stack file starts from `devstack init` (a draft with TODOs).
a `package.json` and no `prepare`). When git hooks need it (`npx eslint` in a
pre-commit hook), `prepare.link = ["web/node_modules"]` links it into the
worktree; `.gitignore` then needs `node_modules` without a trailing slash.
Name what it makes as `outputs = ["web/node_modules"]` (and `version =
"node --version"`): the next lane with the same lockfile copies it from
the machine's store instead of running `npm ci` again. `link` must be
one of `outputs` then; add `requires = "0.23.0"` to `[stack]`.
- **Lanes on other machines** (`devstack up --on <node>`) run in a Linux
container: `[lanes] image` (a toolchain image) or `[lanes] dockerfile`. Files
git ignores do not go there unless `[lanes] sync` names them (a dev
Expand Down Expand Up @@ -122,6 +126,14 @@ without a stack file starts from `devstack init` (a draft with TODOs).
the files' port as default (`${DEVSTACK_PORT_MEDIA_7881:-7881}`); keep
`ports` literal. Without the key, a lane's server announces the main
tree's port. Add `requires = "0.20.0"` to `[stack]`.
- **A per-lane value in a container** (a login cookie's name, which the
browser shares between the main tree and every lane on `localhost`): every
`docker compose` call (and every `exec` step) gets `DEVSTACK_LANE`
(`main` in the main tree) and `DEVSTACK_LANE_SUFFIX` (empty there,
`_<lane>` in a lane). Read them in the Compose file with a default
(`REFRESH_COOKIE: app_refresh${DEVSTACK_LANE_SUFFIX:-}`), never from
`COMPOSE_PROJECT_NAME`. For a native service use `{lane_suffix}` in its
`env`. Both give a lane on a pool node its own name too.
- **A container as a service** (`run = "docker run ..."`, for what needs
Linux tools but should get `watch` and candidates) needs three things: a
process in it that ends on `SIGINT` and `SIGTERM` (`docker run --init`,
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/devstack/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: devstack
description: "Runs and watches this repository's local stack with devstack (devstack.toml): checks that devstack is installed and current, starts and stops the stack, tells whether a code change is live yet, reads logs, promotes or rolls back builds, runs the stack's commands, and reports devstack problems upstream with the user's consent. Use it whenever the local stack, a service, its logs or its dashboard is involved, e.g. \"start the stack\", \"is my change live\", \"the API does not pick up my change\", \"restart the service\", \"show the logs\", \"run the seed\", \"devstack up/status/down\", \"the dev stack does not start\", \"port is taken\", \"Docker is not running\", and whenever a devstack command or its MCP server fails. Not for editing devstack.toml itself (skill `devstack-config`)."
---

<!-- generated by devstack 0.22.1 from devstack.toml (devstack skills install): edits here are overwritten; put project specifics into a skill of your own -->
<!-- generated by devstack 0.23.0 from devstack.toml (devstack skills install): edits here are overwritten; put project specifics into a skill of your own -->

# devstack: run the local stack (devstack)

Expand Down
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ and listed with their assets on the

## [Unreleased]

## [0.23.0] - 2026-10-26

One `npm ci` per lockfile and machine instead of one per lane: what
`prepare` makes is kept in a store per machine and repository, keyed by its
inputs, the platform and the toolchain's version, and the next lane or build
with the same key copies it (ADR-0062; on Windows 5 s instead of 23 s for a
`node_modules` of 24,500 files). Compose files are told the lane they run
for, and a lane on a node gives its native services its name (ADR-0064), so
a login cookie stays apart per tree in containers too. Fixed: a lane on a
node keeps its lease through a long first sync and is said when a reboot
lost it; a Linux tray menu shows no stale item.

### Added

- **`prepare.outputs` and `prepare.version`** (ADR-0062, #277), checked by
Expand Down Expand Up @@ -53,6 +65,26 @@ and listed with their assets on the
what a member reads from the coordinator ask once more when the
connection broke before an answer, instead of failing. On macOS this
showed as `Invalid argument (os error 22)`.
- **A lane on a node keeps its lease through a long first sync** (#276):
a start whose first sync took 90 s lost its lease, since nothing renewed
it between the grant and the first renewal of the followed lane; it is
renewed from the grant on. A file that changed between hashing and upload
no longer makes the node refuse the whole sync, a sync the lane's end
overtakes is dropped instead of reported as failed, and a lane being
removed (or whose worktree lost its `.git`) syncs no more, so a worktree
on its way out is not mirrored to the node as deleted.
- **A lane on a node lost to a reboot is said** (#275, ADR-0052 point 6):
after the developer's machine restarted, the next daemon showed such a
lane as merely stopped. It now finds the note the lane left while it was
followed, releases the lease if it still runs, and says with the lane why
it is gone and how to start it again. The first sync to a node hashes
files without a cached hash on several threads (22 to 90 s for 7,200
files on a machine with a slow virus scanner), and `node_lease_ended`
says why: released, expired or ended by an admin.
- **A Linux tray menu item keeps no label of the item before it** (#272):
when a stack started and its submenu grew, GNOME's AppIndicator extension
showed a second, greyed `Quit Tray`; each new menu layout now numbers its
items after the old one's.

## [0.22.1] - 2026-10-24

Expand Down Expand Up @@ -1642,7 +1674,8 @@ before are refused now, and a pool needs its nodes granted.
a paused log view keeps its line limit; the folder dialog no longer stays
"open" after the page gave up waiting.

[Unreleased]: https://github.com/nuetzliches/devstack/compare/v0.22.1...HEAD
[Unreleased]: https://github.com/nuetzliches/devstack/compare/v0.23.0...HEAD
[0.23.0]: https://github.com/nuetzliches/devstack/compare/v0.22.1...v0.23.0
[0.22.1]: https://github.com/nuetzliches/devstack/compare/v0.22.0...v0.22.1
[0.22.0]: https://github.com/nuetzliches/devstack/compare/v0.21.0...v0.22.0
[0.21.0]: https://github.com/nuetzliches/devstack/compare/v0.20.0...v0.21.0
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = ["crates/*"]
exclude = ["spikes"]

[workspace.package]
version = "0.22.1"
version = "0.23.0"
edition = "2024"
rust-version = "1.98"
license = "MIT OR Apache-2.0"
Expand Down
30 changes: 30 additions & 0 deletions crates/devstack-config/tests/compat/v1-0.23.0-store.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Frozen for 0.23.0: what `prepare` makes (`outputs`), kept in the store
# under its inputs and the toolchain's `version` (ADR-0062); its `link`
# names one of them (ADR-0044, ADR-0063).
version = 1

[stack]
name = "shop"
requires = "0.23.0"

[lanes]
port_step = 100

[services.web]
kind = "devserver"
cwd = "web"
run = "npx ng serve --port {port}"
port = 4200
prepare = { run = "npm ci", inputs = ["web/package-lock.json"], outputs = ["web/node_modules"], link = ["web/node_modules"], version = "node --version" }

[services.web-e2e]
kind = "static"
cwd = "web"
build = "npm run build"
output = "web/dist/web/browser"
port = 4300

[services.web-e2e.prepare]
run = "npm ci"
inputs = ["web/package-lock.json"]
outputs = ["web/node_modules"]
2 changes: 1 addition & 1 deletion devstack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version = 1
[stack]
name = "devstack"
requires = "0.20.0"
reviewed = "0.22.1"
reviewed = "0.23.0"

[services.dashboard]
kind = "devserver"
Expand Down
15 changes: 13 additions & 2 deletions docs/plan.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# devstack: plan

- **Status:** Active: phases 0 to 2 done (0.4.0), phase 3 done (lanes per worktree 0.7.0, each with its own infrastructure since 0.8.0, ADR-0030), phase 4 under way; the pool since 0.9.0: lanes on other machines, moved, shared, given the main ports; node policies, several pools, capacity over time, telemetry with consent (ADR-0025 to ADR-0037, 0.9.0 to 0.9.8; [pool.md](pool.md), §7.4, backlog §13); 0.10.0 (2026-10-18) carries the fixes of the review of 0.9.8: lanes confined on a node, nodes granted by an admin, the promotion gate and restore of ADR-0013/0016 as written, the hub's origin rules; 0.11.0 (2026-10-19): lanes that outlive the main tree's stop, keep their data on a node, run with a profile, and can be viewed when shared; a server updated by an admin (ADR-0038 to ADR-0041); 0.12.0 (2026-10-20): sharing a lane includes viewing it (ADR-0040 amended), a remote lane's containers controlled through its node, a dev server's rebuilds shown like builds (ADR-0042), a node's own lines in the pool's telemetry; 0.13.0 (2026-10-20): a dev server's fixed port is devstack's, forwarded to its instance (ADR-0043); 0.14.0 (2026-10-21): the pool places a lane where it starts warm (ADR-0026 point 3), where a lane starts without `--on` is the machine's choice (ADR-0025 amended), a lane's start on a node shows its phases; 0.15.0 (2026-10-21) carries the fixes of a review of the whole code base: a node runs the Compose model it checked, several agents share one engine, the supervisor keeps edits and stops, stack file paths stay in the repository; 0.16.0 (2026-10-21): desktop notifications from the hub and lanes of other members shown (ADR-0045), winget on Windows, a stack's folder opened in one's own programs (ADR-0046), the share switch removed (ADR-0031 amended); 0.17.0 (2026-10-21): a lane made from a branch in the dashboard (ADR-0047), containers on the main ports (ADR-0048), a lane's need measured where it ran, disk included (ADR-0049); 0.18.0 (2026-10-21): notices for what no request reports (ADR-0050), a lane whose worktree is removed shown while it goes (ADR-0024 point 7 amended); 0.19.0 (2026-10-22): a restart of the stack carries its lanes over (ADR-0052), the agent skills where the stack file says, a node's policy says what part of what is free it offers (ADR-0031 amended); 0.20.0 (2026-10-23): macOS in preview with Homebrew (ADR-0054), UDP ports of a lane on a node relayed (ADR-0056), announced ports moved with their lane (ADR-0057); 0.21.0 (2026-10-23): a tray icon on every desktop, a client of the hub (ADR-0060), profiles that leave out containers (ADR-0058), a service's `stop` command (ADR-0059); 0.22.0 (2026-10-24): the dashboard opens in its installed app (ADR-0061) ([CHANGELOG](../CHANGELOG.md))
- **Date:** 2026-10-14, status updated 2026-10-24
- **Status:** Active: phases 0 to 2 done (0.4.0), phase 3 done (lanes per worktree 0.7.0, each with its own infrastructure since 0.8.0, ADR-0030), phase 4 under way; the pool since 0.9.0: lanes on other machines, moved, shared, given the main ports; node policies, several pools, capacity over time, telemetry with consent (ADR-0025 to ADR-0037, 0.9.0 to 0.9.8; [pool.md](pool.md), §7.4, backlog §13); 0.10.0 (2026-10-18) carries the fixes of the review of 0.9.8: lanes confined on a node, nodes granted by an admin, the promotion gate and restore of ADR-0013/0016 as written, the hub's origin rules; 0.11.0 (2026-10-19): lanes that outlive the main tree's stop, keep their data on a node, run with a profile, and can be viewed when shared; a server updated by an admin (ADR-0038 to ADR-0041); 0.12.0 (2026-10-20): sharing a lane includes viewing it (ADR-0040 amended), a remote lane's containers controlled through its node, a dev server's rebuilds shown like builds (ADR-0042), a node's own lines in the pool's telemetry; 0.13.0 (2026-10-20): a dev server's fixed port is devstack's, forwarded to its instance (ADR-0043); 0.14.0 (2026-10-21): the pool places a lane where it starts warm (ADR-0026 point 3), where a lane starts without `--on` is the machine's choice (ADR-0025 amended), a lane's start on a node shows its phases; 0.15.0 (2026-10-21) carries the fixes of a review of the whole code base: a node runs the Compose model it checked, several agents share one engine, the supervisor keeps edits and stops, stack file paths stay in the repository; 0.16.0 (2026-10-21): desktop notifications from the hub and lanes of other members shown (ADR-0045), winget on Windows, a stack's folder opened in one's own programs (ADR-0046), the share switch removed (ADR-0031 amended); 0.17.0 (2026-10-21): a lane made from a branch in the dashboard (ADR-0047), containers on the main ports (ADR-0048), a lane's need measured where it ran, disk included (ADR-0049); 0.18.0 (2026-10-21): notices for what no request reports (ADR-0050), a lane whose worktree is removed shown while it goes (ADR-0024 point 7 amended); 0.19.0 (2026-10-22): a restart of the stack carries its lanes over (ADR-0052), the agent skills where the stack file says, a node's policy says what part of what is free it offers (ADR-0031 amended); 0.20.0 (2026-10-23): macOS in preview with Homebrew (ADR-0054), UDP ports of a lane on a node relayed (ADR-0056), announced ports moved with their lane (ADR-0057); 0.21.0 (2026-10-23): a tray icon on every desktop, a client of the hub (ADR-0060), profiles that leave out containers (ADR-0058), a service's `stop` command (ADR-0059); 0.22.0 (2026-10-24): the dashboard opens in its installed app (ADR-0061); 0.23.0 (2026-10-26): what `prepare` makes kept in a store per machine (ADR-0062), Compose told the lane (ADR-0064) ([CHANGELOG](../CHANGELOG.md))
- **Date:** 2026-10-14, status updated 2026-10-26
- **Inputs:** [problem-statement.md](problem-statement.md), [ADR index](adr/README.md)

This document is the planning artefact. Decisions it relies on are recorded as
Expand Down Expand Up @@ -816,6 +816,17 @@ notification open it there instead of in a browser tab, on Linux and
Windows (ADR-0061). The tray's menu on Windows follows dark mode. The
details are in the [changelog](../CHANGELOG.md).

**0.23.0 (2026-10-26): one `npm ci` per lockfile, Compose told the lane.**
What `prepare` makes is kept in a store per machine and repository, keyed
by its inputs, the platform and the toolchain's version; the next lane or
build with the same key copies it instead of running `prepare` (ADR-0062,
measured: 5 s against 23 s for `npm ci` on NTFS). Every Compose call and
`exec` step is told `DEVSTACK_LANE` and `DEVSTACK_LANE_SUFFIX`, and a lane
on a node gives its native services its name too (ADR-0064). A lane on a
node keeps its lease through a long first sync and is said when a reboot
lost it. The store on a node and the worktree link of a lane on a node
(ADR-0063) follow. The details are in the [changelog](../CHANGELOG.md).

## 8. Open questions

| # | Question | Where it is tracked |
Expand Down
4 changes: 2 additions & 2 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "devstack-dashboard",
"private": true,
"version": "0.22.1",
"version": "0.23.0",
"license": "MIT OR Apache-2.0",
"type": "module",
"description": "Web dashboard for devstack, served by the hub",
Expand Down
Loading