allod change begin --resume: pick up an existing agent branch #229
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#229
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
allod change begin --resume <description> <repo>picks up anagent/<description>branch that already exists on origin, so a session asked to continue another session's branch gets a worktree the same way it gets a fresh one instead of rebuildingbegin's layout by hand.Primary goals:
allod change begin --resume <description> <repo>creates a worktree under~/changeson a localagent/<description>that tracksorigin/agent/<description>, and prints the path, exactly as-ddoes for a new branch.recordandsubmitwork from the path — the resumed worktree carries the sameallod-change-branchhandoff file thatbegin -dwrites, so the rest of thechangeflow needs no special case.--resumedies when the branch does not exist on origin, when it already exists locally or is checked out in another worktree, and when-dis also given; the existing-dbehavior is unchanged and still refuses a branch that exists.allod change beginusage text anddocs/name the flag beside-d.Current state and specifics
begin -dalways cuts a new branch from the default branch and refuses to reuse one.cmd/allod/change.go:131dies with "branch already exists locally" andcmd/allod/change.go:134with "branch already exists on origin"; there is no flag that takes the second case as the intended starting point. The worktree is created atcmd/allod/change.go:154withgit worktree add <path> -b <branch> origin/<base>, andcmd/allod/change.go:162writes the branch name to<git-dir>/allod-change-branch, whichrecordandsubmitread.A session that has to continue an existing branch currently mirrors that by hand:
That works, but it is three git commands a reader has to know about, it bypasses the tool's own checks, and it is exactly the manual sequence
agent-behavior.mdsays a project tool should replace. It came up on theallod/nexus#66rename, where the branch had been started by one session and finished by another.Default:
--resumereuses the-dcode path with the start point switched fromorigin/<default>toorigin/agent/<description>and the "exists on origin" check inverted into a requirement. It does not fetch anything beyond thegit fetch originbeginalready runs, does not rebase, and does not touch the shared checkout.Scope
In scope: the flag, its refusals, the handoff file, usage text and docs, and tests in the existing
changetest suite covering resume of an existing branch, refusal when the branch is missing on origin, and refusal when-dand--resumeare combined. Out of scope: resuming a branch that has diverged from origin locally, and any change torecord,submit,list, orcleanup.