e2e: the whole worktree lifecycle, retention cases included #88

Closed
opened 2026-08-24 09:38:54 +01:00 by naps62-yolo · 0 comments
Collaborator

Cover the lifecycle end to end in crates/maestro-e2e, against real git and tmux with a temp $HOME and TMUX_TMPDIR, following the harness already there.

  • A second spawn onto an occupied path gets the suffixed directory, and both worktrees work.
  • A spawn whose target path is occupied by a directory the daemon never made sidesteps it rather than adopting or failing.
  • Killing a session with uncommitted changes is refused, the session keeps running, and the worktree is untouched.
  • Committing and pushing that work, then killing again, succeeds and removes the tree.
  • Killing with unpushed commits is refused; --force ends the session and the worktree is retained.
  • A session that exits on its own with a dirty worktree leaves it retained; one that exits pristine leaves nothing behind.
  • GET /api/worktrees lists the retained trees with their reasons, and reclaim removes the directory while the branch survives.
  • The retained store survives a daemon restart.

The retention cases are the ones that must not be skipped: they are what the whole redesign rests on, and every earlier version of this behaviour passed its unit tests while being wrong in practice.

Depends on: #81, #82, #80

Cover the lifecycle end to end in `crates/maestro-e2e`, against real `git` and `tmux` with a temp `$HOME` and `TMUX_TMPDIR`, following the harness already there. - A second spawn onto an occupied path gets the suffixed directory, and both worktrees work. - A spawn whose target path is occupied by a directory the daemon never made sidesteps it rather than adopting or failing. - Killing a session with uncommitted changes is refused, the session keeps running, and the worktree is untouched. - Committing and pushing that work, then killing again, succeeds and removes the tree. - Killing with unpushed commits is refused; `--force` ends the session and the worktree is retained. - A session that exits on its own with a dirty worktree leaves it retained; one that exits pristine leaves nothing behind. - `GET /api/worktrees` lists the retained trees with their reasons, and reclaim removes the directory while the branch survives. - The retained store survives a daemon restart. The retention cases are the ones that must not be skipped: they are what the whole redesign rests on, and every earlier version of this behaviour passed its unit tests while being wrong in practice. Depends on: #81, #82, #80
naps62-yolo added this to the Worktree lifecycle milestone 2026-08-24 09:38:54 +01:00
naps62-yolo added the area/daemontype/testdifficulty/medium labels 2026-08-24 09:38:54 +01:00
naps62-yolo added a new dependency 2026-08-24 09:39:01 +01:00
naps62-yolo added a new dependency 2026-08-24 09:39:01 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#88