Proposal: deterministic PR governance pipeline (lessons from AnyPS5's 24k+ PR workflow) #2488

Open
opened 2026-11-26 05:07:15 +00:00 by github-bot · 1 comment
Owner

@⁠rbolsoni on GitHub · 2026-11-25 14:46 UTC · original

Following up on #1026 (and complementary to #1633 and #1698): boykopovar/AnyPS5 hit the exact same wave of high-volume / AI-assisted PRs (~24,600+ PRs, ~2,600 open) and solved review/CI bottlenecks with a fully deterministic, zero-LLM GitHub Actions pipeline that maps cleanly to VIctory's Rust/xtask setup:

  1. Progressive open-PR quota (pr-intake.yml) — pull_request_target caps open PRs per author by merged history (e.g., 1 with 0 merged, 20 with ≥1, unlimited at 20+) and auto-closes overflow with a polite note to reopen later. Immediately curbs drive-by PR floods without blocking trusted contributors.
  2. Safe static gate on pull_request_target (no untrusted code execution) — instead of blocking every fork PR on manual CI approval, run fast checks (e.g. xtask policy, PR template, basic conventions) from main against fetched PR Git objects.
  3. Batched workflow_dispatch builds (up to N PRs at once) — allow maintainers to trigger ci.yml with a space-separated list of PR numbers; the job merges them with git merge --no-ff onto main and runs cargo clippy + cargo test once with shared rust-cache. Lets a single Windows runner validate 20–40 PRs in one pass before batch-merging.
  4. Automated overlap detection (git merge-tree --write-tree) — hourly/on-push scan over open PR heads in memory (no checkout) to comment on PRs touching the same lines/shader lowerings/HLE exports, catching collisions that bypass manual claiming in #1633.
  5. Hourly Top-30 review queue (GraphQL) — filters open PRs down to those with zero blockers (no draft, no conflict, green checks, and any CHANGES_REQUESTED explicitly answered with a re-request), sorts critical-path labels first then FIFO, and labels only the top 30 (plus an optional --explain <PR> CLI for contributors).

Reference implementations (GPL-2.0, concise Python/YAML):

  • boykopovar/AnyPS5: .github/workflows/pr-intake.yml, conventions.yml, build.yml (workflow_dispatch batching), pr-overlap.yml, pr-ready.yml and tools/pr_ready.py / tools/pr_overlap.py.

Happy to help adapt a minimal subset (starting with pr-intake + batched ci.yml + review queue) if maintainers want this direction.

**@⁠rbolsoni** on GitHub · 2026-11-25 14:46 UTC · [original](https://github.com/Marvisak/VIctory/issues/2488) Following up on #1026 (and complementary to #1633 and #1698): `boykopovar/AnyPS5` hit the exact same wave of high-volume / AI-assisted PRs (~24,600+ PRs, ~2,600 open) and solved review/CI bottlenecks with a **fully deterministic, zero-LLM GitHub Actions pipeline** that maps cleanly to VIctory's Rust/`xtask` setup: 1. **Progressive open-PR quota (`pr-intake.yml`)** — `pull_request_target` caps open PRs per author by merged history (e.g., 1 with 0 merged, 20 with ≥1, unlimited at 20+) and auto-closes overflow with a polite note to reopen later. Immediately curbs drive-by PR floods without blocking trusted contributors. 2. **Safe static gate on `pull_request_target` (no untrusted code execution)** — instead of blocking every fork PR on manual CI approval, run fast checks (e.g. `xtask policy`, PR template, basic conventions) from `main` against fetched PR Git objects. 3. **Batched `workflow_dispatch` builds (up to N PRs at once)** — allow maintainers to trigger `ci.yml` with a space-separated list of PR numbers; the job merges them with `git merge --no-ff` onto `main` and runs `cargo clippy` + `cargo test` once with shared `rust-cache`. Lets a single Windows runner validate 20–40 PRs in one pass before batch-merging. 4. **Automated overlap detection (`git merge-tree --write-tree`)** — hourly/on-push scan over open PR heads in memory (no checkout) to comment on PRs touching the same lines/shader lowerings/HLE exports, catching collisions that bypass manual claiming in #1633. 5. **Hourly Top-30 `review queue` (GraphQL)** — filters open PRs down to those with zero blockers (no draft, no conflict, green checks, and any `CHANGES_REQUESTED` explicitly answered with a re-request), sorts critical-path labels first then FIFO, and labels only the top 30 (plus an optional `--explain <PR>` CLI for contributors). Reference implementations (GPL-2.0, concise Python/YAML): - `boykopovar/AnyPS5`: `.github/workflows/pr-intake.yml`, `conventions.yml`, `build.yml` (`workflow_dispatch` batching), `pr-overlap.yml`, `pr-ready.yml` and `tools/pr_ready.py` / `tools/pr_overlap.py`. Happy to help adapt a minimal subset (starting with `pr-intake` + batched `ci.yml` + `review queue`) if maintainers want this direction.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:15 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:50 UTC · original

Automated triage for the maintainers.

This is a proposal about how the repository handles pull requests, not about VIctory's code. Whether to adopt PR quotas, batched CI, overlap detection or a review queue is the maintainer's decision, so it is labelled as a request and left for him. It belongs with the existing discussion in #1026, #1633 and #1698.

If any part is adopted, it would need to be written for this repository's workflows under this repository's licence. Copying workflow files from another project means checking whether its licence is compatible.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/2488#issuecomment-7171482619) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T14:46:06Z at=2026-11-25T19:04:00Z --> Automated triage for the maintainers. This is a proposal about how the repository handles pull requests, not about VIctory's code. Whether to adopt PR quotas, batched CI, overlap detection or a review queue is the maintainer's decision, so it is labelled as a request and left for him. It belongs with the existing discussion in #1026, #1633 and #1698. If any part is adopted, it would need to be written for this repository's workflows under this repository's licence. Copying workflow files from another project means checking whether its licence is compatible. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#2488
No description provided.