Repository navigation
The Spec PR's Repair loop and Self-merge - #171
Merged
Merged
Conversation
After the Spec review, the Spec PR goes through the same Repair loop as a Run's PR, with the Spec as the issue, and a Spec run asked to merge ends with thirdshift Self-merging the Spec PR into the Base branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a Spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
After the Spec review, the Spec PR now goes through the same Repair loop as a Run's pull request. The Spec is the issue and the Spec branch is the Issue branch. A Spec run asked to merge ends with a Self-merge. To make that possible, the part of
implementafter the PR is ready moved intorun::deliver, which both paths now call:merge/--merge, ormerge.alwayswithoutno-merge, now applies to the Spec PR. Tickets still always merge into the Spec branch.mergeapplies to a Spec run.Evidence
Before: these new tests failed in
tests/spec_run.rs: the conflict Repair, the CI-fix Repair,mergeon a Spec,merge.alwayson a Spec, and help naming the Spec PR. The old testa_merge_ask_from_the_user_config_leaves_the_spec_pr_ready_for_reviewasserted that the Spec PR was left unmerged.After:
cargo testpasses in full.spec_runpasses 36/36, including:a_base_branch_that_moved_into_a_conflict_gets_a_conflict_repair_and_the_spec_pr_ends_readyred_ci_on_the_spec_prs_head_gets_a_ci_fix_repairmerge_on_a_spec_self_merges_the_spec_pr_into_the_base_branch: a merge commit on main,issue-20gone from origin, the Spec closeda_merge_ask_from_the_user_config_self_merges_the_spec_prandno_merge_on_a_spec_leaves_the_spec_pr_ready_while_its_tickets_still_mergea_policy_refusal_on_the_spec_pr_leaves_it_ready_and_exits_1repairs_exhausted_on_the_spec_pr_send_it_back_to_draft_and_exit_1Under heavy machine load, one full run hit a single failure in
merge_run::ctrl_c_after_the_merge_finishes_the_post_merge_steps_and_exits_as_merged, a test that depends on signal timing. It then passed three times on its own, and a full--no-fail-fastrerun passed completely.Merge Danger
Door: two-way
Blast Radius: Spec runs
With
merge.always = true, a Spec run now merges the Spec PR into the Base branch. Before this change, that setting left the Spec PR for review. Runs on single issues behave the same; thedeliverextraction doesn't change their logic.Unaddressed findings
Standards
base_moves_on,checks_on_head,commits_fix,GREEN/REDcopied intotests/spec_run.rs): other test files already copy these the same way. Moving them intotests/supporttouches unrelated test files, so it belongs in its own cleanup.deliverandreview_and_deliver: bundlingissue/worktree/base/goalinto a type would reshapeRepairLoopas well, which is a larger refactor than this ticket.deliveris not a CONTEXT.md term: its doc comment defines it in glossary terms (Repair loop, Self-merge), and the codebase has no single existing word for both together.run.rsexposesdeliverandmark_pr_readytospec_run.rs: with two callers, a separate module is premature.Spec
run::deliverpath is already covered bytests/ci.rsandtests/merge_run.rs.after_mergeand updating existing Merge run tests and the README.Closes #146
🤖 Generated with Claude Code