Skip to content

feat: restart, rebuild or cold; a lane restarts where it runs; groups take their containers along (ADR-0072) - #351

Merged
7schmiede merged 2 commits into
mainfrom
feat/restart-levels
Oct 28, 2026
Merged

7schmiede merged 2 commits into
mainfrom
feat/restart-levels

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Points 2b, 3 and 4 of the owner's dashboard review: warm/cold restarts in the UI, a lane's actions in one place, and group actions for a group of containers.

Review card

Approved by the owner in the conversation on 2026-10-28: points 1–5.

# Category Point Beats Cost of reversing
1 term A restart has three levels, named as ADR-0038 names them: Restart (warm: from the artifact/store entry there is for the inputs, data kept), Rebuild (built again even for the same inputs, data kept), Cold (built again and data from the seed jobs again; lanes only). Warm/cold only, where "cold" is either misnamed or throws data away unannounced Low: labels and docs
2 concept Every restart control (service row, group head, lane header) is a split button: a click restarts warm, the arrow offers Rebuild (and Cold for a lane); only Cold asks. A confirmation dialog on every restart Low: UI only
3 contract New POST /v1/lanes/{lane}/restart {"mode": "warm"|"rebuild"|"cold"} on the requester's daemon: the lane restarts where it runs (same node, same ports); cold resets in between. Plus rebuild as a group action. Stop + start in the client: on a node the lease ends and the lane may start cold on another node Medium: a published route stays or gets an alias
4 contract POST /v1/groups/{name}/start|stop take the group's containers along, as restart already does; a lane's shared containers are skipped. Every group with services or containers gets head actions. Head actions only for groups with services Medium: changed behaviour of an existing route (a group's stop now stops its database containers)
5 concept All lane actions in one menu at the top right (main button Restart/Start; menu Rebuild, Cold…, Stop, Discard data…, Remove worktree…); the same menu via "…" and right click on a lane in the lane picker; the separate "Stop worktree" and "Discard data" buttons go. Scattered buttons, removal only through the branch picker Low: UI only

Decided without the owner: no Cold for the main tree (its data goes through a profile with data = "fresh"); the CLI keeps restart --rebuild, no --cold alias, no new CLI or MCP command for a lane restart; Remove worktree also stays in the branch picker; a lane's warm restart and rebuild restart its running services only (stopped ones stay stopped, containers stay up); a cold restart answers once the lane is started again, its services start after (on a node moving shows it); the main header button of a stopped lane starts it on this machine (the start card below still offers the pool); a node must run 0.28.0 for a group's start/stop/rebuild that name containers (the requester says so otherwise).

What changed

  • Daemon (supervisor/lifecycle.rs): group_action takes rebuild and acts on container members on every action through group_containers (start before services, stop after, restart after; shared skipped in a lane; NODE_DID_NOT_ACT on a node as before). restart_running restarts a tree's running services at the same time.
  • Lanes (lanes.rs Lanes::restart, api.rs lanes_restart, remote.rs RemoteLane::restart_services/up): warm/rebuild in place, locally through the lane's supervisor, on a node through the lane's API; cold = stop → reset → start at the same place (activate/activate_remote with its profile and workers), then up.
  • Node agent (devstack-node laneinfra::named, node.rs): a group's start, stop and rebuild name its containers (rebuild restarts them); containers_need asks 0.28.0 for these.
  • Dashboard: SplitButton.vue; lib/laneActions.ts (one model for the header, the branch picker and the command palette); ServiceRow, OverviewView (group head shown for groups with containers too), StackHeader, BranchPicker, CommandPalette; store restartLane/laneAction; journal labels; mock routes.
  • Docs: ADR-0072, docs/adr/README.md, docs/dashboard-api.md, docs/stack-file.md (groups), skills/devstack/SKILL.md, CHANGELOG.

Checked

  • cargo fmt, cargo clippy --all-targets -p devstack-daemon -p devstack-node -p devstack -- -D warnings: clean.
  • cargo test -p devstack-daemon -p devstack-node -p devstack: all pass (new/changed: the_node_looks_at_service_routes_that_may_name_containers, a_route_names_the_containers_the_daemon_would_act_on, a_request_that_names_containers_needs_a_node_that_acts_on_them). The ignored integration tests got a warm-restart step (a_worktree_runs_as_a_lane, a_lane_runs_on_a_node_of_the_pool); not run here (they need the .NET SDK / Linux + Docker).
  • ui: npm run typecheck, npm test (84 passed; new laneActions.test.ts, journal labels).
  • Visually against the mock (Edge, dark): the service row's and group head's restart menus, the lane header menu, the branch picker's lane menu.
  • Not tried against a real stack: a cold restart of a lane on a node, and group start/stop with real containers.

Note: #348 gives rows a fixed actions column of 60 px; a row's restart now has an arrow beside it (restart 28 + arrow 16 + stop 28), so --col-actions needs about 76 px once both are in. CHANGELOG [Unreleased] will conflict with #347/#348.

🤖 Generated with Claude Code

7schmiede and others added 2 commits October 28, 2026 14:07
… take their containers along (ADR-0072)

- Three restart levels, named as ADR-0038 names them: Restart (warm, from
  the build there is for the inputs, data kept), Rebuild (built again,
  data kept), Cold (lanes only: built again and seeded again; asks).
- POST /v1/lanes/{lane}/restart {"mode"}: warm and rebuild restart the
  running services in place (on a node through the lane's own API, so the
  lease, node and ports stay); cold stops the lane, resets its data and
  starts it again at the same place with its profile and workers.
- POST /v1/groups/{name}/rebuild; a group's start and stop take its
  container members along as its restart did (a lane leaves the main
  tree's shared ones alone; on a node the agent acts on them, 0.28.0).
- Dashboard: one SplitButton for every restart (service row, group head,
  lane header); the lane's actions in one menu in the header and behind a
  "…" or right click in the branch picker; the command palette has them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the feat/restart-levels branch from a0f6d45 to eb1a0c6 Compare October 28, 2026 13:07
@7schmiede
7schmiede merged commit a1c2f8b into main Oct 28, 2026
13 checks passed
@7schmiede
7schmiede deleted the feat/restart-levels branch October 28, 2026 13:14
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.

1 participant