CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(merge): non-fast-forward safety + restore the five sweep merges main lost #5464

Merged⚡ AI-generatedXSccantynz wants to mergerestore/sweep-consolidationmainopened 24d ago
ccantynzcommented 24d ago

INCIDENT: the merge endpoint's bare update-ref base head only is a merge when base is an ancestor of head. Six parallel sweep branches shared an older base; each sequential "merge" replaced main with that branch's tip, silently discarding the previous ones. Five merged PRs (#5457–#5462) vanished from main while reading "merged". Caught by post-deploy browser verification; all commits survived on their branches.

This PR (a true descendant of current main — safe under old and new logic):

  1. The guard: both update-ref sites (shared executor pr-merge.ts + merge-queue.tsx) now run git merge-base --is-ancestor first; non-fast-forward heads route through mergeWithAutoResolve for a genuine merge commit (clean merges need no AI; conflicted-and-behind fails honestly).
  2. The restoration: merges of all six lost branches — billing-aware anthropic probe, issues surfaces, docs/admin theme, billing+banner, dashboard, notifications — zero conflicts.

tsc clean; all four new sweep test files green (48/48).

🤖 Generated with Claude Code

ccantynzAI Reviewcommented 24d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

gluecron[bot]🤖 botAI Reviewcommented 24d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts