Skip to content

Fix auto-merge blocking itself; bring back the auto-merge line - #971

Merged
coffandro merged 1 commit into
mainfrom
fix/auto-merge-self-block
Dec 3, 2026
Merged

coffandro merged 1 commit into
mainfrom
fix/auto-merge-self-block

Conversation

@coffandro

@coffandro coffandro commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Why labelled PRs never auto-merged

  • Auto-merge blocked itself. A pull_request_target evaluation (a label or description change) runs in auto_merge.yaml's Evaluate job. That job's own check run on the PR head is still pending while E16 is judged, so every such evaluation recorded "not eligible" (E16 not green: Evaluate) and reset the eligibility clock. That happened to SUNLU: add silk trait to Silk PLA+ lines, Silk 2.0 and TPU Silk #943–L3D: add silk trait to PLA Silk #958 on Dec 1. E16 now ignores auto-merge's own Evaluate and Merge sweep jobs.
  • Stale labels couldn't be removed. Every sweep and evaluation logged couldn't remove the auto-merge label … (HTTP 403). GITHUB_TOKEN had issues: write, and changing a PR's labels also needs pull-requests: write, so both jobs now get it. An evaluation also no longer tries to remove a label the PR doesn't have.

Note: PRs last pushed before Contribution terms became a required check (Dec 2) still fail E16 until something re-runs that check on them (a push, a description edit, or a reopen).

Review comment

  • One short 🤖 Auto-merge: line is back, built from review_items: every condition except the ones only the check can judge (E16, E18–E20). It reads "can merge on its own at 22:00…", "needs a maintainer: …", or "off, a maintainer merges this.", and sits above the LGTM & merge link.
  • ✏️ Fix in the web editor only shows when the review found something to fix.

Tests

pytest tests/: everything passes except two failures in test_search_index_exporter.py, which fail on main too. Ruff is clean.

Contribution terms

  • I agree to the contribution terms: my contribution is MIT-licensed, SimplyPrint may also use it under other licence terms, and I'm allowed to submit it.

Contribution terms

  • I agree to the contribution terms: my contribution is MIT-licensed, SimplyPrint may also use it under other licence terms, and I'm allowed to submit it.

Labelled PRs never merged: a pull_request_target evaluation runs in
auto_merge.yaml's "Evaluate" job, whose own check run on the PR head is
pending while E16 is judged, so every such evaluation recorded "not
eligible" (E16 not green: Evaluate). E16 now ignores auto-merge's own
"Evaluate" and "Merge sweep" jobs.

The stale labels then stayed: removing a label from a PR answered 403
because GITHUB_TOKEN had issues: write but not pull-requests: write. Both
jobs now get it, and an evaluation no longer tries to remove a label the
PR doesn't carry.

Review comment:
- one short "Auto-merge:" line again, from review_items (every condition
  except the ones only the check can judge), above the LGTM & merge link;
- "Fix in the web editor" only when there is something to fix.
@coffandro
coffandro merged commit 4951550 into main Dec 3, 2026
16 of 19 checks passed
@coffandro
coffandro deleted the fix/auto-merge-self-block branch December 3, 2026 10:29
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