Skip to content

PR merge-risk review treats clean behind-branch diff as deleting main-only changes #119

@stainlu

Description

@stainlu

Problem

On openclaw/openclaw#83367, ClawSweeper reviewed head 79a255ba3343414054f6ab7a3d6ce93946f021df against main a7ab09fa4e79fdbaa6359d2b05e8038db810cf47 and labeled the PR:

  • rating: 🧂 unranked krab
  • status: 📣 needs proof
  • merge-risk: 🚨 compatibility
  • merge-risk: 🚨 session-state

The durable review said the PR was "based behind current main and would drop current-main Codex code-mode and mobile pairing metadata fixes" and cited files added by later main commits.

Why This Is Misleading

At the same time, GitHub reported the PR merge state as clean/mergeable. The scary labels were caused by comparing current main..head and interpreting main-only commits as deletions from the PR head. That is useful as a "branch is behind current main" signal, but it is not the same as the merge result. A clean GitHub merge/squash merge applies the PR changes onto the current base; it does not replace main with the PR head and delete unrelated main-only changes.

In this case the maintainer-facing labels made the PR look much riskier than the actual branch state. Rebasing the PR cleared the condition, but the review wording and labels were still misleading while the branch was only behind current main.

Suggested Fix

For stale/behind PRs, ClawSweeper should distinguish:

  • real merge-result regressions, computed from a merge tree / GitHub merge ref / equivalent three-way merge result
  • normal behind-main drift, where main..head shows main-only files but the PR is still cleanly mergeable

If the only issue is behind-main drift, prefer a softer status such as "needs rebase / review stale" rather than patch is incorrect, needs proof, or compatibility wording that says the PR would remove main-only changes.

Evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions