Skip to content

merge: Use native ranges when available - #1401

Draft
abhinav wants to merge 1 commit into
submit-native-stacksfrom
merge-native-ranges
Draft

merge: Use native ranges when available#1401
abhinav wants to merge 1 commit into
submit-native-stacksfrom
merge-native-ranges

Conversation

@abhinav

@abhinav abhinav commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Merge selected linear paths atomically when a repository implements
WithMergeRange. Prepare each change and verify its published base,
head, and commit before scheduling the operation, then use the existing
timeout for asynchronous acceptance and final change-state polling.

Treat runtime ErrUnsupported as a signal to resume the ordinary
bottom-up merge sequence. Divergent heads remain separate queue
dependencies, so one native linear path can merge without consuming an
unselected sibling.

ShamHub constructs merge and squash range results before one
compare-and-swap target update. Propagate request cancellation through
validation, commit construction, and publication so a canceled operation
cannot advance the target or mark changes merged.

A GitHub-only integration scenario registers A-B-C as a native stack,
merges it atomically, and verifies that divergent D remains open,
unstacked, and mergeable on B with its head branch and commit unchanged.
Its cassette remains deliberately unrecorded for a human operator to
capture.

A provider-native atomic range may differ from the linear paths inferred from
the selected local branch forest.
Build the complete desired stack state and ask `WithStacks` to plan merge
ranges from provider membership instead.

Overlay executable native plans onto the ordinary merge queue.
Changes omitted from every plan retain individual bottom-up merging, and
`ErrUnsupported` selects that ordinary path before execution begins.
Divergent heads remain separate queue dependencies, so one native path can
merge without consuming an unplanned sibling.

Prepare every selected change and verify its published base, head, and commit
before scheduling the operation.
Use the existing timeout and completion polling for asynchronous acceptance
rather than introducing another polling layer.
Custom merge commands continue to use per-change execution.

A GitHub-only integration scenario atomically merges A-B-C and verifies that
divergent D remains open and mergeable on B with its head unchanged.
@abhinav
abhinav force-pushed the merge-native-ranges branch from 290f9a9 to 57f8243 Compare August 24, 2026 12:41
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.

1 participant