Skip to content

fix(merge-orchestration): never choose rebase; a stale :rebase decision squashes - #884

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/strategist-no-rebase
Sep 30, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/strategist-no-rebase

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

What

Hypatia's merge orchestration no longer chooses or emits a rebase merge.

  • Strategist.decide_method: removed the commits_atomic_green -> :rebase clause. An atomic-green series is squashed; a :proof PR still gets :merge_commit.
  • BatonEmitter: removed gh_flag(:rebase). A manifest written before this change now falls through to --squash rather than emitting a flag the repo refuses.

Why

Rebase-merge replays commits unsigned. Of 286 unsigned commits on estate default branches, 119 were rebase replays, proven by patch-id twins against their signed feature-branch originals. Those replays break required_signatures.

Owner ruling (2026-09-30): allow merge commits but not rebase. Rebase is being disabled repo-side (allow_rebase_merge=false, already applied to hypatia, standards and launch-scaffolder). This PR stops the orchestrator from asking for a method the repos now refuse.

Verification

  • mix test test/merge_orchestration: 82 tests, 0 failures.
  • MIX_ENV=test mix compile --warnings-as-errors: rc=0. mix format --check-formatted on the changed files: rc=0.
  • Mutants: restoring the strategist's rebase clause turns the new strategist test red, and restoring gh_flag(:rebase) turns the emitter test red. The first draft of the strategist test used the helper's default :chore class; it was squashed by the first clause and passed vacuously. The surviving mutant caught this.

Inherited red (not required, not introduced here)

🤖 Generated with Claude Code

https://claude.ai/code/session_0136eszqrQ53Kj7aBH1D4rXK

…on squashes

Rebase-merge replays commits UNSIGNED: 119 of 286 unsigned estate
default-branch commits were such replays (patch-id twins), so it breaks
required_signatures. The owner ruled on 2026-09-30 to disable rebase
repo-side while keeping merge commits for proof PRs.

- Strategist.decide_method: drop the commits_atomic_green -> :rebase
  clause. An atomic-green series squashes, and a proof still gets
  :merge_commit.
- BatonEmitter: drop gh_flag(:rebase). A manifest written before this
  change falls through to --squash instead of emitting a flag that the
  repo now refuses.
- Tests: a non-chore atomic-green context must squash, and a :rebase
  decision must emit --squash. Both were checked by mutants: restoring
  either removed line turns its test red. The first draft of the
  strategist test used the default :chore class and was vacuous.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136eszqrQ53Kj7aBH1D4rXK
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e472b2c6-fc16-4634-a117-f464fb7e72cb

📥 Commits

Reviewing files that changed from the base of the PR and between 300fd45 and f1e9757.

📒 Files selected for processing (4)
  • lib/merge_orchestration/baton_emitter.ex
  • lib/merge_orchestration/strategist.ex
  • test/merge_orchestration/baton_emitter_test.exs
  • test/merge_orchestration/strategist_test.exs
 ____________________________________________________________________________________________________________________________________
< Contrary to popular belief, Unix is user friendly. It just happens to be very selective about who it decides to make friends with. >
 ------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 7ce7d42 into main Sep 30, 2026
42 of 45 checks passed
@hyperpolymath
hyperpolymath deleted the fix/strategist-no-rebase branch September 30, 2026 14:28
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