• v0.5.0 3e3cb9a004

    v0.5.0
    All checks were successful
    release / release (push) Successful in 4s
    test / changelog (push) Successful in 5s
    test / lint (push) Successful in 13s
    test / scripts (push) Successful in 32s
    Stable

    city-root released this 2026-11-12 06:33:28 +00:00 | 66 commits to main since this release

    Added

    • The worktree setup command, gc roles worktree setup [--checkout <dir>] <work dir> [<default branch>], which makes the Worker's directory a linked worktree of its repository, detached at origin/<default branch>, and leaves a directory that is one already as it is. The repository is --checkout, else the rig's (GC_RIG_ROOT), else the city's (GC_CITY_PATH). It does what assets/scripts/worktree-setup.sh does for the Worker's pre_start, which now calls the same script.

    Fixed

    • A Worker on a box that runs no pre_start, as gc's ACP runtime runs none, no longer halts its bead in Part 2 of mol-worker-work. gc creates the Worker's work_dir for every transport, as an empty plain directory that it stages files into, and starts the session there, so the directory was no linked worktree and under the city's checkout, where gc roles worktree branch refuses it and git reads the city's repository, whichever rig the Worker works for. Part 2 now runs gc roles worktree setup "$GC_DIR" <base_branch> before any git command, and halts the bead, without touching the checkout, when it fails. The Worker's pre_start keeps its own call for the boxes that run it, and the command does nothing for a directory that is a worktree already. Part 2 passes it ${GC_DIR:-$(pwd)}, the directory gc made for the Worker, and the current directory only where GC_DIR is unset; the current directory alone, from a subdirectory of the worktree, made a worktree nested there, and the command also refuses a directory inside a linked worktree.
    • A Worker that halts no longer runs git switch --detach outside a linked worktree: a Worker halting before Part 2 had made its directory one detached the city's own checkout. The Halting section tells the two apart by comparing git rev-parse --git-dir and --git-common-dir with --path-format=absolute; without it, in a plain directory under a checkout git prints the first as an absolute path and the second as a relative one, the strings differ, and the check took the directory for a linked worktree.
    • worktree-setup.sh fills the work directory it finds, empty or holding staged files, in place instead of moving it aside and creating it again, so a session already running in the directory keeps its working directory. It arms the restore of the files it moves aside before it empties the directory, so a delete that fails half way leaves them in place, and it refuses a directory whose .git is a dangling symlink, which the copy-back would have put over the new worktree's .git: no worktree, and git there reading the city's repository.
    Downloads