Skip to content

fix(channel): start lanes from origin's default branch and diff against their base - #144

Merged
iamnbutler merged 1 commit into
mainfrom
codex/lane-base-96
Oct 6, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
codex/lane-base-96

Conversation

@iamnbutler

@iamnbutler iamnbutler commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

New lanes fetch origin's advertised default branch before creating their worktree, or use an explicit base. Remote bases are fetched; local branches, tags, and commits work offline. The project checkout stays unchanged. If origin is unavailable, the error explains how to select a local base.

Each lane stores its comparison target in pi. Both the Diff file list and patches use the merge-base with that target, so changes already on the target stay out of the lane's diff. Passing a base when switching an existing lane retargets the comparison without moving its files. Starts memoize their selected commit for crash recovery, and lane ownership is rechecked inside the claiming transaction.

The version 2 ace.lanes migration preserves existing lane ownership and paths. Legacy lanes compare against local origin/HEAD, retaining project-HEAD comparison only for repositories without origin. A missing local default produces a repair instruction.

Fixes #96. Part of #5.

Validation

  • bun types, bun run ci, and git diff --check pass after rebasing onto main.
  • Real Git repositories and Ace model runs covered stale project checkouts, explicit local/remote bases, target advancement and merging, upstream changes, switches between chats, offline behavior, and invalid refs.
  • Killing a worker during worktree creation and advancing the remote confirmed that recovery reused the selected commit without resetting the worktree.
  • An isolated copy of an existing Canary backup preserved all 129 original entries, three chats, and two lanes; persisted version 2; and continued with a real model after restart. Source backup checksums and original lane state stayed unchanged.

The fetch-time ownership race and a crash before the worktree directory exists were reviewed in code but not exercised at runtime.

Built in Ace

Implementation, Git/model smokes, migration validation, checks, and PR creation used an Ace channel and its tools. Initial inspection, coordination, and parallel review used Codex because Ace cannot continue this external harness session yet (#9).

@iamnbutler
iamnbutler merged commit b9afde3 into main Oct 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant