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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ no longer blocks every start.
it: every lane starts its own containers; a profile's `skip` leaves out
what a lane can do without.

### Fixed

- **The `devstack` skill and the plan no longer say `git worktree remove`
works while a lane runs.** With `prepare.link` it does not on Windows: Git
2.43 follows the junction and empties the lane's copy (measured again),
a newer Git leaves the worktree behind with the junction in it (ADR-0044).
Both now say what `docs/stack-file.md` already said: stop the lane first
when it links directories; without `link` the remove works while it runs.

### Added

- **`/v1/lanes/main/v1/...`** answers as the main working tree's `/v1/...`
Expand Down
6 changes: 4 additions & 2 deletions docs/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,10 @@ sends a `lanes` event, and the dashboard shows each lane under its stack,
named by its branch, the ones not started folded away. A lane's dev servers,
tools and hot-reload mode run from its snapshot, which follows the worktree
within 150 ms; `prepare` installs what the snapshot lacks (`npm ci`), so
`git worktree remove` works while the lane runs. `devstack lane stop` stops a
lane. `promote --lane` moves the ports
`git worktree remove` works while the lane runs, unless the lane links
directories into its worktree (`prepare.link`, ADR-0044): then
`devstack lane stop` comes first, which removes the links. `devstack lane stop`
stops a lane. `promote --lane` moves the ports
first and the main slot only when all of them moved; `--lane main` restarts
only what the main tree ran before; a dev server listening on `::1` only is
reached through the forward. Pruning keeps every build a started lane runs or
Expand Down
2 changes: 1 addition & 1 deletion skills/devstack/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Run from the repository root (devstack looks for `{{devstack:stack_file}}` there
| `devstack hot-reload <service> on\|off` | for a debugging session: the toolchain's watcher (e.g. `dotnet watch`) from the source tree instead of builds and candidates; needs `hot_reload` in the stack file. Switch it off again afterwards |
| `devstack up` refuses: "the stack `<other>` … runs on <ports>" | another repository's stack on this machine runs on the same ports. Nothing started. Ask the user, then `devstack up --shift auto` (MCP `up` with `shift: "auto"`): this stack runs on its ports + 1000 (2000, ...) on this machine, services, containers and links alike, its data unchanged, and keeps the shift until `devstack up --shift none`. Ports written into app config outside devstack's placeholders do not move. A stopped stack on the same ports only warns. `devstack status` shows `shifted +1000` |
| `devstack up` in a `git worktree` | starts that worktree's **lane** (every worktree is one) in the main tree's daemon: its own builds, ports moved by +100 (+200, ...), its own containers (a Compose project per lane, ports moved alike; the deprecated `shared` services come from the main tree), no background workers (`--workers` turns them on; `--force` skips the memory check). Every command in the worktree then acts on the lane (`devstack lane list` shows all) |
| `git worktree add <path> -b <branch>` | a new worktree is a lane at once, not started (devstack never creates or removes worktrees; use git or your tool); tell the user its dashboard page (`devstack ui --link` in it). A lane runs from a copy of its worktree, so `git worktree remove` works while it runs and stops it. `devstack lane stop <name>` stops a lane and keeps the worktree |
| `git worktree add <path> -b <branch>` | a new worktree is a lane at once, not started (devstack never creates or removes worktrees; use git or your tool); tell the user its dashboard page (`devstack ui --link` in it). A lane runs from a copy of its worktree, so removing the worktree stops the lane and takes its state along. `devstack lane stop <name>` stops a lane and keeps the worktree. **When the lane links directories into its worktree** (`devstack lane list`: `linked`, from `prepare.link`), run `devstack lane stop <name>` before `git worktree remove`: on Windows Git follows the junction and empties the lane's copy, or leaves the worktree behind with the junction in it; the stop removes the links. Without links the remove works while the lane runs |
| a directory in a worktree that `prepare` links (`node_modules`, see `devstack lane list`: `linked`) | it is **the lane's copy**, not the worktree's own: on Windows a junction, which looks like a folder. Do not reinstall, delete or clean it there (`npm ci`, `rm -rf`, `git clean -x`, an IDE's "delete node_modules"): that empties what the lane runs from (for a lane on a node, its copy from the store), and a running dev server then fails. To install your own, ask the user, then stop the lane (`devstack lane stop <name>` removes the link) or remove only the link (`cmd /c rmdir <dir>` on Windows, without `/s`; `rm <dir>` elsewhere, no trailing slash), then install. devstack prepares a copy emptied this way again (a notice says so), but the lane's dev server fails until then |
| `devstack lane start <name> [--on <node>]` | start a lane from the main tree (or anywhere in the repository), as `devstack up` in its worktree does; `status` in the main tree lists the lanes in one line. **To run another branch or commit beside the main stack** (an end-to-end run against a given commit, a review): `git worktree add <dir> <commit>`, `devstack lane start <name>` (its ports are the main ports plus its offset, `devstack lane list`), test against those, `devstack lane stop <name>`, `git worktree remove <dir>`. A commit without a stack file of its own runs with the main tree's. **For an acceptance run** use the stack file's profile if it has one (`status` lists none; `[profiles]` in the file): `devstack lane start <name> --profile <p> --run` starts the lane as the profile says (a build instead of a dev server, workers, fresh data, the suite's env) and runs its suite command. A worktree another tool or script created is a lane too: starting it gives its own ports, containers and database without building a separate environment |
| `devstack lane reset <name>` / `devstack lane prune [--older-than 7d] [--dry-run]` | throw a stopped lane's data away (it starts fresh, seeded again); remove what lanes whose worktree is gone left behind, here and on the pool's nodes. A lane on a node keeps its data there between starts. Ask the user before either: data goes |
Expand Down