Repository navigation
Merge run tracer bullet: thirdshift merge <Issue URL> merges a clean PR - #96
Merged
Merged
Conversation
`thirdshift merge <Issue URL>` (alias `--merge`) runs everything a Run does, then the Self-merge: `gh pr merge --merge --match-head-commit` on the head commit whose CI the Repair loop watched. A merge that fails is an ordinary Failed run for now. Anything after the Issue URL is now an argument error. The fake gh gains `pr merge`: a real merge commit on the test origin, closing linked issues only when the base is the default branch, and a refusal when the head doesn't match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name the Run's mode after its goal (ready for review or merged), keeping the outcome text beside it; mention merged PRs in the help's first line; and deduplicate the fake gh's git calls and the merge assertions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
Merged
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.
Summary
thirdshift merge <Issue URL>(alias--merge) starts a Merge run. It does everything a Run does, then the Self-merge, on exactly the head commit whose CI the Repair loop watched (ADR-0004).The fake
ghgainspr merge: a real--no-ffmerge commit of the head into the base on the test origin, the PR marked MERGED, issues named by closing keywords closed only when the base is origin's default branch, and a refusal when--match-head-commitdoesn't match. Any otherpr mergeflag, such as--autoor--delete-branch, exits 2.The README documents the
mergeform, the Self-merge step, the new last stderr line, and the exit-2 rule for trailing arguments.Evidence
New
tests/merge_run.rsand extendedtests/command_surface.rs, driven through the binary:thirdshift merge <url>→ exit 2not a GitHub issue URL: merge.thirdshift <url> --mergesilently started a normal Run.cargo test: every suite passes (merge_run 7/7, command_surface 8/8).cargo clippy --all-targetsis clean.Merge Danger
Door: two-way
The normal Run path is unchanged except for one thing: an argument after the Issue URL is now rejected with exit 2, where before it was ignored.
Blast Radius: small
Scripts that pass extra arguments after the URL now fail fast. A Merge run merges into the Base branch, which can't be undone, but only when someone asks for it with
merge.Unaddressed findings
Standards
github::mergeshould be named for the Self-merge. Skipped: it's a thinghwrapper named after theghcommand, like its siblingsmark_readyandconvert_to_draft. The Self-merge step lives inrun.rs.String. Skipped: this matches the existingworktree.head()andci::watch(sha). A commit type would be a wider refactor.implementtakes 7 params becausegoalis threaded through. Skipped: the reviewer agreed the shape is defensible, since doing the merge inmainwould bypass the Failed run path.Spec
ghrefuses a merge that conflicts, and no test covers that. Kept: a real GitHub merge would fail the same way, and the later conflict-at-merge-time ticket will use it.mergeis now a boolean flag for every fakeghsubcommand. Skipped: no other supported subcommand takes a--mergevalue.--match-head-commitpins the head, as ADR-0004 requires. Merge-time repairs are for later tickets under Merge run: a Run that ends with its PR merged #26.Closes #91
🤖 Generated with Claude Code