Skip to content

Integration branch: a merged preview of multiple stacks #1244

Description

@ed-irl-codebot

Problem

When work is split across several parallel stacks, there is no single
ref that combines them for local testing or preview. Developers
manually merge tips together to get an integrated view, then have to
redo it by hand every time any stack changes.

Proposal

Add an integration branch feature: a managed, throwaway ref that
merges a configured, ordered set of stack tips onto trunk. It is a
derived artifact — rebuilt from its configured tips on demand — giving
one combined branch for local testing without being load-bearing state.

Components:

  • State model: repo-scoped integration info carrying the singleton
    integration branch name, upstream branch, last-pushed hash (for
    --force-with-lease leasing), and an ordered list of tips with the
    hashes recorded at the last rebuild. Includes persistence of a paused
    rebuild so a merge conflict can be resolved and resumed.
  • Git helpers: Merge, IsClean, and CheckoutNewBranch worktree
    primitives needed to build the merged branch.
  • Handler package: orchestration for rebuild/advance/clean and
    conflict-resume logic.
  • CLI: the gs integration command tree.
  • Hooks: auto-rebuild and auto-submit integration on relevant
    operations.
  • Conflict handling: regenerate conflicted derived files during the
    rebuild merge rather than surfacing them as raw conflicts.

Tracked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions