feat(tmq): always allocate a worktree for dispatched issues#6
Open
jakecelentano wants to merge 1 commit into
Open
feat(tmq): always allocate a worktree for dispatched issues#6jakecelentano wants to merge 1 commit into
jakecelentano wants to merge 1 commit into
Conversation
Prior behavior: only `feature` dispatches got a worktree; `fix` and `chore` went in-place on the main checkout on `main`. The dispatch-loop skill (Step 1) requires every dispatched agent to isolate its work, and the in-place path was slipping into merged-but-uncommitted-on-main PRs (see tower-fleet#200 for the concrete failure mode: `feat/ui-e2e-convention` branched in /root/tower-fleet on main instead of a worktree). This change makes tmq honor the dispatch-loop convention uniformly: - All non-review dispatched types (`feature`, `fix`, `chore`) in a worktree-enabled repo get an isolated worktree at /root/wt-<short>-<num> on a typed branch (`feat/`, `fix/`, or `chore/`). - Review dispatches and work in a worktree-disabled repo are unchanged (review edits live on the PR's branch; non-worktree repos opt out). - New `_branch_name(issue_number, title, issue_type)` produces the type-prefixed branch; `_feature_branch_name` stays as a thin shim for callers that imported it before the refactor. Bumps to 0.2.0 — this is an observable behavior change (dispatched agents will start landing in worktrees even for fix/chore types). Tests: `test_fix_in_worktree_repo_creates_worktree` and `test_chore_in_worktree_repo_creates_worktree` cover the new paths; `test_review_in_worktree_repo_uses_main_checkout` locks the unchanged review behavior. Full suite: 58 passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prior behavior: only `feature` dispatches got a worktree; `fix` and `chore` went in-place on the main checkout on `main`. The dispatch-loop skill (Step 1) requires every dispatched agent to isolate its work, and the in-place path was slipping into merged-but-uncommitted-on-main PRs (see `tower-fleet#200` for the concrete failure mode: `feat/ui-e2e-convention` branched in `/root/tower-fleet` on `main` instead of a worktree).
This change makes tmq honor the dispatch-loop convention uniformly:
What changed
Net: +92 / -23. Bump to 0.2.0 — observable behavior change (dispatched agents will start landing in worktrees even for fix/chore types).
Out of scope
Review
@Reviewer / @reviewer-m3 — please verify:
Test plan
Verification
Follow-ups
Closes: the in-place-on-main gap from the dispatch-loop skill's Step 1.
References: `bogocat/tower-fleet#202`, `bogocat/tower-fleet#200`, dispatch-loop skill Step 1.