githubnext/ace2Public

Ace: a collaborative coding environment on the team's own machines

Start lanes from origin's default branch and measure their diff against it

IA

An agent asked to work from the latest `origin/main` cannot do so through the supported lane flow, and the Diff tab then reviews the lane against the wrong base.

## Reproduction

1. The project checkout (`~/code/ace2`) is on `feat/github-cache` at `ce1bd9b`, 45 commits behind `origin/main` (`1ab91be`). Agents must not edit or switch the project checkout. 2. In a channel, the agent starts a lane with the `lane` tool. The tool has no base option and always runs `git worktree add -b <channel>/<name>` from the project's current HEAD, so the lane starts at `ce1bd9b`. 3. The agent runs `git reset --hard origin/main` in the lane and makes a 2-file, +20 change. 4. The channel's Diff tab shows `image-paste-91 -> ce1bd9b` with 35 files, +3580/-128, including CI and native-desktop changes that already landed on main. `git diff --shortstat origin/main` in the lane shows the real change: 2 files, +20.

## Cause

- `packages/channel/src/lanes.ts` creates the worktree from the project checkout's HEAD. - `packages/channel/src/changes.ts` measures a lane from `merge-base HEAD <project HEAD>`. When the project checkout is behind or on an unrelated feature branch, that base predates commits the lane already contains.

## Expected

- Starting a lane can branch from the up-to-date remote default branch (or an explicit base) without touching the project checkout. - The Diff tab compares a lane against the base its PR will target, so it matches the eventual PR diff.

Observed while dogfooding #91 in Ace Canary 0.0.11. Related to #28. Part of #5.

  1. iamnbutlerparent-issue-addedlast month on GitHub

  2. iamnbutlerreferenced this in feat(ui): attach images pasted into the composer #104last month on GitHub

  3. iamnbutlerreferenced this in feat(app): open GitHub items on GitHub or in a new channel #109last month on GitHub

  4. iamnbutlerreferenced this in chore(desktop): release canary 0.0.12 #110last month on GitHub

  5. IA
    Author

    This happened again while releasing canary 0.0.12 (#110) in Ace Canary 0.0.11. The project checkout was still on `feat/github-cache`, 38 commits behind `origin/main`, so the `lane` tool created `calm-ladder/canary-0-0-12` from that stale HEAD. The agent reset the lane to `origin/main` before making the one-line version bump. Release lanes need to branch from the commit that will ship, so an explicit base (or origin's default branch) is required for releasing from Ace without this manual step.

  6. iamnbutlerreferenced this in Finish development-run isolation: helper conflict diagnostics, loopback test hosts, and reload #97last month on GitHub

  7. iamnbutlerreferenced this in chore(desktop): release canary 0.0.13 #115last month on GitHub

  8. iamnbutlerreferenced this in chore(desktop): release canary 0.0.14 #130last month on GitHub

  9. iamnbutlerreferenced this in fix(channel): start lanes from origin's default branch and diff against their base #144last month on GitHub

  10. iamnbutlerclosedlast month on GitHub

  11. iamnbutlerreferenced this in chore(desktop): release canary 0.0.15 #152last month on GitHub

  12. iamnbutlerreferenced this in feat(desktop): authorize coordinate actions from pixel snapshots #156last month on GitHub