issue-work: Phase 1.6 worktree branches off origin/$DEFAULT_BRANCH (closes #61)#76
Merged
Merged
Conversation
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
issue-workPhase 1.6 instructed the LLM to callEnterWorktreewith abase_branchparameter that doesn't exist on the tool. Result: every worktree created by/issue-workbranched off the session's current HEAD instead of the default branch — silently wrong whenever the skill was invoked from inside another worktree (the common case in this repo) or from a trunk parked on a feature branch.This PR rewrites Phase 1.6 to a three-step pattern: resolve
{TRUNK_ROOT}(now bound explicitly at the end of Phase 1.4), rungit -C "{TRUNK_ROOT}" worktree add -b {branch} {path} "origin/$DEFAULT_BRANCH"against the trunk, thenEnterWorktree(path: ...)to switch in. Mirrors the precedent set by #68 and the{TRUNK_ROOT}placeholder convention from #72. Adjacent drift fixed alongside: Phase 1.5's two$TRUNKshell-var references rename to{TRUNK_ROOT}for consistency, andreferences/repo-resolution.md:113corrects its description ofEnterWorktree's contract.Test plan
frontmatter-lint.yml— runs locally clean (14 agents, 18 skills validated)docs-lint.yml— relative trailing-slash pattern returns no matchesversion-check.yml—CHANGELOG.mdentry under[Unreleased] / Fixed;plugin.jsonversion unchanged so non-release path applies/issue-work {ticket}from inside another worktree, confirmgit log --oneline -1 issue-{N}-{slug}^resolves to the tip oforigin/mainThree review passes via
/pr-self-review(correctness / security / simplicity) ran in pre-pr mode after the initial commit; 8 findings accepted in-loop, 2 pushed back as out-of-scope (kebab-slug path-traversal tightening — threat model is the user's own tickets,git check-ref-formatrejects..-style branch names; 60-char cap truncation under-spec — over-specifying for a non-issue). No critical or major findings outstanding. Full triage record in the state dir'ssummary.md.Acceptance criteria from #61, all met:
EnterWorktreebase_branchorbranch_nameparameter.{TRUNK_ROOT}bound explicitly in Phase 1.4 beforegit worktree addruns.origin/\$DEFAULT_BRANCH.Changelog