Skip to content

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

Description

@iamnbutler

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.

Activity

  1. iamnbutler commented on Oct 5, 2026

    @iamnbutler
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions