You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(workspace): clone the run's tree at repo.baseBranch, not the origin's HEAD #76
A run's working tree is checked out at the origin's HEAD, not at repo.baseBranch. allocateWorkspace (src/lib/workspace.ts) runs git clone <mirror> <dir>, which checks out the
mirror's HEAD, the remote's default branch. baseBranch is used only by write-back, as the PR's
base.
Found during #62's live legs (#72, #67). A local bare origin created with git init --bare
may have HEAD → master, and its runs did not start from main until HEAD was pointed at main.
Real-world effect: for a project whose PRs target a branch other than the remote's default (for
example baseBranch: "develop" on a repository whose default is main), the agent works on main, and write-back opens a PR against develop with main's history in the diff.
Fix
Pass baseBranch into WorkspaceAllocationInput and clone with git clone --branch <baseBranch> <mirror> <dir>, or check it out after the clone. If the branch is missing, the allocation
should fail with a message that names it. Add a workspace.test.ts case with a bare origin whose HEAD differs from baseBranch.
Activity