ci: the needs-rebase labeler no longer runs per pull request push (PR-CONFLICT-LABEL-LOAD) #1250

Manually merged
github merged 1 commit from gh-pr/1250/head into gh-pr/1250/base 2026-11-26 09:44:28 +00:00
Owner

@⁠Mouad-Scriptz-0 on GitHub · 2026-11-24 20:52 UTC · original
Mouad-Scriptz-0:ci/conflict-label-no-per-pr-runs → main · +19 −17 · 4 files · 1 commits · merged 2026-11-24 20:59 UTC

Claimed in the coordination issue as: PR-CONFLICT-LABEL-LOAD (#14)

Depends on: none

What and why

My needs rebase labeler from #155 works (112 open pull requests carry the label), but it's flooding the Actions queue. conflict-label.yml starts a run on every push to every pull request through pull_request_target. On this repository, that queued about 265 runs within a day, the oldest since 15:27 UTC. They wait in the same runner queue as CI (53 queued, the oldest since 14:41 UTC), No Game Data (59) and Runtime (29). I'm sorry about that.

This PR:

  • Drops the pull_request_target trigger. Every run already checks all open pull requests, so the push-to-main and hourly runs cover what the per-PR runs did. A rebased pull request now loses the label within the hour instead of right away.
  • Puts every run in one concurrency group (conflict-label). At most one run is in progress and one waiting, and a newer push replaces the waiting one.
  • Removes the per-PR --pr argument from the workflow. The workflow also no longer has a trigger that gives a fork's pull request a write token.
  • Updates tests/test_pr_conflict_label.py. It now checks that no pull_request / pull_request_target trigger, per-PR group or --pr comes back. The tool's docstring and the CONTRIBUTING.md line describe the new schedule.

Runs that are already queued will still run under the old workflow file. Each one is harmless but holds a runner slot. Someone with write access can clear them; the next push to main, or the hourly run, re-labels everything:

for s in queued pending; do
  gh run list -R ubiquitarianism/leonida --workflow conflict-label.yml --status "$s" --limit 1000 \
    --json databaseId --jq '.[].databaseId' | xargs -r -n1 gh run cancel -R ubiquitarianism/leonida
done

Tested

  • tests/test_pr_conflict_label.py: OK. Against the workflow on main (the old triggers), the new test_no_run_per_pull_request fails, as it should.
  • tests/test_ci_registration.py, tests/test_docs_links.py, tests/test_text_write_line_endings.py: OK.
  • The workflow YAML parses: triggers push, schedule and workflow_dispatch; concurrency {group: conflict-label, cancel-in-progress: false}.

GPUs tested: n/a (CI only)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)
**@⁠Mouad-Scriptz-0** on GitHub · 2026-11-24 20:52 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1250) `Mouad-Scriptz-0:ci/conflict-label-no-per-pr-runs` → `main` · +19 −17 · 4 files · 1 commits · merged 2026-11-24 20:59 UTC Claimed in the coordination issue as: PR-CONFLICT-LABEL-LOAD (#14) Depends on: none ### What and why My `needs rebase` labeler from #155 works (112 open pull requests carry the label), but it's flooding the Actions queue. `conflict-label.yml` starts a run on **every push to every pull request** through `pull_request_target`. On this repository, that queued about 265 runs within a day, the oldest since 15:27 UTC. They wait in the same runner queue as `CI` (53 queued, the oldest since 14:41 UTC), `No Game Data` (59) and `Runtime` (29). I'm sorry about that. This PR: - **Drops the `pull_request_target` trigger.** Every run already checks all open pull requests, so the push-to-`main` and hourly runs cover what the per-PR runs did. A rebased pull request now loses the label within the hour instead of right away. - **Puts every run in one concurrency group (`conflict-label`).** At most one run is in progress and one waiting, and a newer push replaces the waiting one. - **Removes the per-PR `--pr` argument from the workflow.** The workflow also no longer has a trigger that gives a fork's pull request a write token. - **Updates `tests/test_pr_conflict_label.py`.** It now checks that no `pull_request` / `pull_request_target` trigger, per-PR group or `--pr` comes back. The tool's docstring and the `CONTRIBUTING.md` line describe the new schedule. **Runs that are already queued** will still run under the old workflow file. Each one is harmless but holds a runner slot. Someone with write access can clear them; the next push to `main`, or the hourly run, re-labels everything: ```sh for s in queued pending; do gh run list -R ubiquitarianism/leonida --workflow conflict-label.yml --status "$s" --limit 1000 \ --json databaseId --jq '.[].databaseId' | xargs -r -n1 gh run cancel -R ubiquitarianism/leonida done ``` ### Tested - `tests/test_pr_conflict_label.py`: OK. Against the workflow on `main` (the old triggers), the new `test_no_run_per_pull_request` fails, as it should. - `tests/test_ci_registration.py`, `tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`: OK. - The workflow YAML parses: triggers `push`, `schedule` and `workflow_dispatch`; concurrency `{group: conflict-label, cancel-in-progress: false}`. GPUs tested: n/a (CI only) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a)
conflict-label.yml (#155) started a run on every push to every pull
request through pull_request_target. On this repository that queued 265
runs within a day, some waiting five hours, in the same runner queue as
CI, No Game Data and Runtime, whose oldest queued run waited six hours.

Drop the pull_request_target trigger and put every run in one
concurrency group. Each run already checks every open pull request, so
a push to main and the hourly schedule cover what the per-PR runs did;
a rebased pull request loses the label within the hour instead of at
once. At most one run waits at a time. The workflow also no longer has a
trigger that hands a fork's pull request a write token.

tests/test_pr_conflict_label.py fails on the old workflow and checks
that no pull request trigger, per-PR group or --pr comes back; the tool's
docstring and CONTRIBUTING.md say what runs it now.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:27 +00:00
github manually merged commit 364754de5c into gh-pr/1250/base 2026-11-26 09:44:28 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 20:59 UTC · original

Merged. Reviewed and checked locally:

  • Claim: valid. PR-CONFLICT-LABEL-LOAD was posted before the PR and is unedited.
  • The change: the per-pull-request trigger is gone and every run shares one concurrency group, so at most one run is in progress and one waiting. Each run already checks every open pull request, so the push-to-main and hourly runs cover it. A rebased pull request now loses the label within the hour.
  • The load was real: when I checked, 346 of the 861 waiting runs in this repository were this workflow's (279 queued, 67 pending).
  • Local checks on 364754de5: tests/test_pr_conflict_label.py, the tool stdout, startup and line-ending guards, all 12 test_docs_* files, check_no_game_data.py and the tool's --help pass. actionlint was not run here.

I'm cancelling the labeler runs still queued from the old trigger. The push to main from this merge and the hourly run re-label everything.

AI-assisted (Claude Code, Claude Fable 5.2).

**@⁠aslan2142** on GitHub · 2026-11-24 20:59 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1250#issuecomment-7144327106) Merged. Reviewed and checked locally: - **Claim:** valid. `PR-CONFLICT-LABEL-LOAD` was posted before the PR and is unedited. - **The change:** the per-pull-request trigger is gone and every run shares one concurrency group, so at most one run is in progress and one waiting. Each run already checks every open pull request, so the push-to-`main` and hourly runs cover it. A rebased pull request now loses the label within the hour. - **The load was real:** when I checked, 346 of the 861 waiting runs in this repository were this workflow's (279 queued, 67 pending). - **Local checks on `364754de5`:** `tests/test_pr_conflict_label.py`, the tool stdout, startup and line-ending guards, all 12 `test_docs_*` files, `check_no_game_data.py` and the tool's `--help` pass. `actionlint` was not run here. I'm cancelling the labeler runs still queued from the old trigger. The push to `main` from this merge and the hourly run re-label everything. AI-assisted (Claude Code, Claude Fable 5.2).
This discussion has been locked. Commenting is limited to contributors.
No description provided.