Repository navigation
merge-must-land-on-the-default-branch/2: Recognise a unit that landed later; retry the retarget and hold after three failures - #991
Merged
bwmatson merged 7 commits intoNov 17, 2026
Conversation
The tests come first and fail until the implementation. A unit's pull request can be merged into a branch that is not the default one: its parent's branch, left in place after the parent merged. Unit: merge-must-land-on-the-default-branch/2
With this in, the tests of the previous commit pass. A unit's pull request can be merged into a branch that is not the default one: its parent's branch, left in place after the parent merged. Unit: merge-must-land-on-the-default-branch/2
The tests come first and fail until the implementation. A unit's pull request can be merged into a branch that is not the default one: its parent's branch, left in place after the parent merged. Unit: merge-must-land-on-the-default-branch/2
With this in, the tests of the previous commit pass. A unit's pull request can be merged into a branch that is not the default one: its parent's branch, left in place after the parent merged. Unit: merge-must-land-on-the-default-branch/2
…after three failures (checks, round 1) Unit: merge-must-land-on-the-default-branch/2
…after three failures (review round 1) Unit: merge-must-land-on-the-default-branch/2
…after three failures (review round 2) Unit: merge-must-land-on-the-default-branch/2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start here
Already verified by the pipeline
Review tier:
full— the reviewer classified it fullWhy
This pull request builds part of change merge-must-land-on-the-default-branch; this is the change's reason.
A unit's pull request can be merged into a branch that is not the default one: its parent's branch, left in place after the parent merged. The kit keeps a merged parent's remote branch while a child is owed a move, so GitHub never retargets the child itself; the kit's own retarget (
update_pr) never raises and only logs, so one failure leaves the child on the old base with nothing recorded; and a person merging the child on the forge sees nothing wrong. The pipeline then records the unit as `merge… The full reason is in
openspec/changes/merge-must-land-on-the-default-branch/proposal.md.What this pull request does
A merged unit counts as landed only once its merge commit is on the default branch. A unit merged into another unit's branch waits for that branch to land, and retargeting the stack is retried and held after repeated failures.
settling_behindmarker. A merge into the default branch clears that marker.The chain beneath this is linear: this branch sits on the one below it. It merges after everything beneath it in the stack has merged.
Unit
merge-must-land-on-the-default-branch/2of change merge-must-land-on-the-default-branch, task group(s) 2, 3.Spec:
openspec/changes/merge-must-land-on-the-default-branch/in the planning repo.Assumptions
merge-must-land-on-the-default-branch/1(agent-build-kit, merge-must-land-on-the-default-branch/1: Record a merge only when it is on the default branch #987), which has not merged yet. If that PR changes in review, this one is restacked and re-verified.Verification
This is a unit-test unit: everything it needs is fakes, fixtures or throwaway containers, so GitHub Actions runs the whole of it. No e2e-test run was required.
Left for later
Approved, with these recorded rather than blocking:
plannedfor a late fix keeps itssettling_behindmarker until it merges again. That is safe now, because_record_mergealways rewrites the marker and only units in SETTLING are rechecked. Clearing the marker when the unit leaves SETTLING, besideclear_first_branch, would mean no stale field ever sits in the store.How this was built
Tests were committed first and seen to fail before any implementation existed; the commit order is checked mechanically; lint, formatting and types pass at the tip.
Opened by the spec-driven pipeline. The build agent never merges. The pipeline merges only
a unit review classified
autoand policy allowed; a person merges any other, after checkingthe stack order the host shows.