Proposal: unblock the PR backlog (~2,390 open, 0 approved) without lowering review or test reliability #28700

Open
opened 2026-12-03 01:32:06 +00:00 by jagrat04 · 0 comments
jagrat04 commented 2026-12-03 01:32:06 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-12-03T01:32:06Z.


Follow-up to #5503 (625 open PRs in October) and #28168, with current repository numbers and an engineering plan to raise merge throughput outside the main agc/shader lane without relaxing review or test guarantees.


1. Live Snapshot (measured 2026-12-03)

Overall throughput on main is very high (1,017 PRs merged in the last 7 days, merged:>=2026-11-26), so the bottleneck is not inactivity — it is extreme lane asymmetry and queue saturation:

Metric Count Notes
Open PRs (total / non-draft) 2,393 / 2,264 Up ~3.8x from 625 in #5503 (Oct 2026)
Open PRs passing checks cleanly (pr-ready) 1,245 Latest run 47009531114: 1245 of 2396 ... have no blocker; 30 queued
Open PRs by review state review:none 2,306, changes_requested 85, approved 0 Effectively zero approved backlog waiting for merge
Open PRs labeled review queue 30 (30/30 carry unblocks title) Currently spans #9335 (2026-10-21) to #27893 (2026-11-27)
Open PRs labeled unblocks title 158 (143 review:none) >5x the 30-slot review queue capacity
Open PRs labeled needs rebase 409 Conflict churn across shared monoliths
Open prx / libSceNKWebKit PRs 1,050 prx / 241 libSceNKWebKit Oldest open libSceNKWebKit PR is #10409 (2026-10-23); 660 merged
Last 60 merged PRs (2026-11-30 to 2026-12-03) 59/60 merged by oneandonlydean 56/60 explicitly APPROVED, 0/60 merged without human review; MarcZX10 posted 159 review events across those 60 PRs (~2.65 rounds/PR)
Last 100 merged PR scopes agc (38), shader (7), libSceNKWebKit (7), libc (6), libkernel (5), relinker (4) Non-GPU/non-unblocks subsystems clear slowly

2. Root Causes of Slow Progress

  1. Single-merger chokepoint + unbounded intake above 20 merges

    • In .github/workflows/pr-intake.yml, authors with >= 20 merged PRs have no open-PR cap.
    • Every merged PR requires human review (0/60 recent merges lacked human review) and 59/60 recent merges went through one maintainer (oneandonlydean). Applying Little's Law, unconstrained PR generation against a 1-merger / few-reviewer capacity produces the 2,393 backlog and heavy hourly automation load (pr-overlap.yml, pr-ready.yml, conflict-label.yml).
  2. Strict queue starvation in tools/pr_ready.py

    • QUEUE_SIZE = 30 and ranked() sorts strictly by (UNBLOCKS_LABEL not in pr["labels"], pr["created"], pr["number"]).
    • Because 158 open PRs have unblocks title, non-unblocks title PRs (nearly all libSceNKWebKit, libSceIcu, utility libc/prx work) literally never enter review queue.
  3. Remaining unsplit monoliths in PRX libraries (409 needs rebase, review truncation)

    • The repo already solved major conflict hotspots via docs/dev/debt/changes/ and tests/cmake/*.cmake fragments in libSceAgcDriver, libc, and libkernel.
    • However, on origin/main, core/libs/prx/libSceNKWebKit/Export.cpp is still 20,773 lines and include/InventoryExports.hpp is 5,477 lines. Parallel WebKit PRs edit and delete stubs inside the same files, causing cross-PR conflicts, forced rebases, and automated review bundle truncation due to file size.
  4. Coarse header invalidation on PR CI vs. unused tools/select_tests.py

    • .github/workflows/build.yml saves test-graph.json on push to main and supports tools/select_tests.py (ninja -t query) only on workflow_dispatch (inputs.select).
    • Automatic pull_request Windows runs invoke tools/build_mingw_host_only_tests.py and tools/build_changed_guest_tests.py, both of which set broad_change = True for any .h, .hpp, .hh, .inl, .cmake, or CMakeLists.txt under core/libs/ — rebuilding libs and running all guest/host core/libs test targets even when changing a private header in one leaf PRX.
    • Because linux only runs on push to main or manual workflow_dispatch (which batches up to 40 PRs), integration and Linux verification rely on manual maintainer batch dispatches.
  5. Manual review load on speculative clean-room PRXs

    • In agc / libc, implementations are anchored to Vulkan validation (VUID-) or POSIX/C++ specs. In large C++ libraries like libSceNKWebKit, clean-room host reimplementations written from symbol names pass self-written unit tests while still requiring multiple human review rounds (MarcZX10, mihiii1337, PrivacyOnion) to catch missing edge cases, silent no-ops violating TechnicalDebt.md, or invented behavior.

3. Proposed Fixes (Preserving Full Reliability)

  1. Split and auto-generate stub/export boilerplate in large PRXs (like libSceNKWebKit)

    • Keep unimplemented NID stubs generated at configure/build time (extending the tools/stubgen.py model) from a declarative inventory manifest rather than checking a 20k-line hand-edited Export.cpp into git.
    • Let implemented exports live in small per-domain .cpp units (WKPageSessionState.cpp, etc.) that suppress the matching generated stub, with a build-time invariant ensuring every manifest NID maps 1:1 to either an implementation (public_headers + nid_* checked) or a NotImplemented_nid_no_patch stub.
    • Reliability gain: Eliminates duplicate-symbol/ODR drift and shrinks PR diffs to focused domain files so review tooling never truncates context.
  2. Fair-share multi-lane queue in tools/pr_ready.py + CODEOWNERS delegation

    • Replace the single strict-priority 30-slot list with weighted/quota lanes (e.g., reserve 50–60% for unblocks title and split remaining slots across agc/shader/relinker and prx/libc/libkernel/tools), or publish separate per-area queue sections so subsystem reviewers always see clean PRs in their domain.
    • Pair with CODEOWNERS / subsystem merge delegation for low-risk/non-GPU PRX libraries so oneandonlydean is not the sole merge path for 59/60 PRs.
  3. WIP-capped active queue + stacked draft support in pr-intake.yml

    • Replace unlimited non-draft open PRs (at >= 20 merged) with a cap on active non-draft / unreviewed PRs per author (e.g., 5–10 active PRs), while allowing unlimited draft stacked PRs (which skip CI/review-queue churn until earlier PRs land).
    • Reliability & speed gain: Cuts wasted CI runs, needs rebase cascades, and hourly pr-overlap scans without slowing down authors.
  4. Dependency-exact PR test selection + two-tier automated batching

    • Use transitive #include / test-graph.json (select_tests.py) reachability in build_changed_guest_tests.py and build_mingw_host_only_tests.py when .hpp/.h files change, keeping full broad_change only for root CMakeLists.txt / .cmake / workflow edits, while always keeping public_headers / nid_* / patched_libraries_tests strict for changed library interfaces.
    • Separate a fast non-GPU merge lane (hosted Linux compile via #28182 + hosted Windows dependency-scoped tests, automated speculative batching + bisect on failure) from the self-hosted GPU / relinker lane (core/shader/, core/libs/prx/libSceAgcDriver/, video_out, relinker/, VM/memory primitives). Related CI work already open: #28432, #28182, #28499.
  5. Automated pre-review contract checks for PRXs

    • Extend tools/check_conventions.py / tools/guest_pointer_audit.py with static AST checks before review queue eligibility: flag exported APS5_VABI functions that return constant success without calling NotImplemented_nid_no_patch, mutating real backend state, or having a Silent stubs debt entry; validate parameter counts/types against extracted firmware inventories where available.
    • Where clean-room reimplementation is avoidable for standard WebKit utility/DOM layers, prefer pinned 3rdparty/ upstream sources per AGENTS.md.

4. Phased Plan of Action

  • Phase 1 — Immediate Queue & Intake Relief (zero C++ risk, CI/scripts only)

    1. Update tools/pr_ready.py to allocate guaranteed quota slots per subsystem alongside unblocks title priority (--issue summary grouped by area).
    2. Adjust .github/workflows/pr-intake.yml to enforce active non-draft WIP limits instead of unlimited open PRs at >= 20 merges, encouraging stacked drafts.
    3. Land Linux PR compile checks (#28182) and single-pass Windows PR builds (#28432) + flake quarantine reporting (#28499).
  • Phase 2 — Graph-Exact PR Testing & Contract Automation (tools/)
    4. Replace the blanket core/libs/**/*.hpp broad_change trigger in tools/build_changed_guest_tests.py and tools/build_mingw_host_only_tests.py with #include / test-graph.json transitive dependency resolution (with a nightly/push full safety sweep remaining intact).
    5. Add automated silent-stub and export-signature inventory verification to PR checks so MarcZX10 / reviewers only inspect real semantics rather than catching dummy stubs manually.

  • Phase 3 — Structural Monolith Elimination & Delegated Merge Queue
    6. Migrate libSceNKWebKit (Export.cpp / InventoryExports.hpp) to generated NID stub fallback tables + per-domain implementation units (matching the tests/cmake/*.cmake and docs/dev/debt/changes/ conflict-free pattern).
    7. Introduce CODEOWNERS per subsystem and split automated speculative batch merging into a hosted non-GPU queue lane + the self-hosted GPU/relinker lane.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6758443010 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/28700). Originally posted by [jagrat04](https://github.com/jagrat04) on 2026-12-03T01:32:06Z. --- Follow-up to [#5503](https://github.com/boykopovar/AnyPS5/issues/5503) (`625` open PRs in October) and [#28168](https://github.com/boykopovar/AnyPS5/issues/28168), with current repository numbers and an engineering plan to raise merge throughput outside the main `agc`/`shader` lane without relaxing review or test guarantees. --- ### 1. Live Snapshot (measured 2026-12-03) Overall throughput on `main` is very high (**1,017 PRs merged in the last 7 days**, `merged:>=2026-11-26`), so the bottleneck is not inactivity — it is extreme lane asymmetry and queue saturation: | Metric | Count | Notes | |---|---:|---| | Open PRs (`total` / non-draft) | **2,393** / **2,264** | Up ~3.8x from 625 in `#5503` (Oct 2026) | | Open PRs passing checks cleanly (`pr-ready`) | **1,245** | Latest run `47009531114`: `1245 of 2396 ... have no blocker; 30 queued` | | Open PRs by review state | `review:none` **2,306**, `changes_requested` **85**, `approved` **0** | Effectively zero approved backlog waiting for merge | | Open PRs labeled `review queue` | **30** (`30/30` carry `unblocks title`) | Currently spans `#9335` (2026-10-21) to `#27893` (2026-11-27) | | Open PRs labeled `unblocks title` | **158** (`143` `review:none`) | >5x the 30-slot `review queue` capacity | | Open PRs labeled `needs rebase` | **409** | Conflict churn across shared monoliths | | Open `prx` / `libSceNKWebKit` PRs | **1,050** `prx` / **241** `libSceNKWebKit` | Oldest open `libSceNKWebKit` PR is `#10409` (2026-10-23); 660 merged | | Last 60 merged PRs (2026-11-30 to 2026-12-03) | `59/60` merged by `oneandonlydean` | `56/60` explicitly `APPROVED`, `0/60` merged without human review; `MarcZX10` posted 159 review events across those 60 PRs (~2.65 rounds/PR) | | Last 100 merged PR scopes | `agc` (38), `shader` (7), `libSceNKWebKit` (7), `libc` (6), `libkernel` (5), `relinker` (4) | Non-GPU/non-`unblocks` subsystems clear slowly | --- ### 2. Root Causes of Slow Progress 1. **Single-merger chokepoint + unbounded intake above 20 merges** - In `.github/workflows/pr-intake.yml`, authors with `>= 20` merged PRs have **no open-PR cap**. - Every merged PR requires human review (`0/60` recent merges lacked human review) and `59/60` recent merges went through one maintainer (`oneandonlydean`). Applying Little's Law, unconstrained PR generation against a 1-merger / few-reviewer capacity produces the `2,393` backlog and heavy hourly automation load (`pr-overlap.yml`, `pr-ready.yml`, `conflict-label.yml`). 2. **Strict queue starvation in `tools/pr_ready.py`** - `QUEUE_SIZE = 30` and `ranked()` sorts strictly by `(UNBLOCKS_LABEL not in pr["labels"], pr["created"], pr["number"])`. - Because `158` open PRs have `unblocks title`, non-`unblocks title` PRs (nearly all `libSceNKWebKit`, `libSceIcu`, utility `libc`/`prx` work) literally **never enter** `review queue`. 3. **Remaining unsplit monoliths in PRX libraries (`409` `needs rebase`, review truncation)** - The repo already solved major conflict hotspots via `docs/dev/debt/changes/` and `tests/cmake/*.cmake` fragments in `libSceAgcDriver`, `libc`, and `libkernel`. - However, on `origin/main`, `core/libs/prx/libSceNKWebKit/Export.cpp` is still **20,773 lines** and `include/InventoryExports.hpp` is **5,477 lines**. Parallel WebKit PRs edit and delete stubs inside the same files, causing cross-PR conflicts, forced rebases, and automated review bundle truncation due to file size. 4. **Coarse header invalidation on PR CI vs. unused `tools/select_tests.py`** - `.github/workflows/build.yml` saves `test-graph.json` on `push` to `main` and supports `tools/select_tests.py` (`ninja -t query`) **only on `workflow_dispatch` (`inputs.select`)**. - Automatic `pull_request` Windows runs invoke `tools/build_mingw_host_only_tests.py` and `tools/build_changed_guest_tests.py`, both of which set `broad_change = True` for **any** `.h`, `.hpp`, `.hh`, `.inl`, `.cmake`, or `CMakeLists.txt` under `core/libs/` — rebuilding `libs` and running all guest/host `core/libs` test targets even when changing a private header in one leaf PRX. - Because `linux` only runs on `push` to `main` or manual `workflow_dispatch` (which batches up to 40 PRs), integration and Linux verification rely on manual maintainer batch dispatches. 5. **Manual review load on speculative clean-room PRXs** - In `agc` / `libc`, implementations are anchored to Vulkan validation (`VUID-`) or POSIX/C++ specs. In large C++ libraries like `libSceNKWebKit`, clean-room host reimplementations written from symbol names pass self-written unit tests while still requiring multiple human review rounds (`MarcZX10`, `mihiii1337`, `PrivacyOnion`) to catch missing edge cases, silent no-ops violating `TechnicalDebt.md`, or invented behavior. --- ### 3. Proposed Fixes (Preserving Full Reliability) 1. **Split and auto-generate stub/export boilerplate in large PRXs (like `libSceNKWebKit`)** - Keep unimplemented NID stubs generated at configure/build time (extending the `tools/stubgen.py` model) from a declarative inventory manifest rather than checking a 20k-line hand-edited `Export.cpp` into git. - Let implemented exports live in small per-domain `.cpp` units (`WKPageSessionState.cpp`, etc.) that suppress the matching generated stub, with a build-time invariant ensuring every manifest NID maps 1:1 to either an implementation (`public_headers` + `nid_*` checked) or a `NotImplemented_nid_no_patch` stub. - **Reliability gain:** Eliminates duplicate-symbol/ODR drift and shrinks PR diffs to focused domain files so review tooling never truncates context. 2. **Fair-share multi-lane queue in `tools/pr_ready.py` + `CODEOWNERS` delegation** - Replace the single strict-priority 30-slot list with weighted/quota lanes (e.g., reserve 50–60% for `unblocks title` and split remaining slots across `agc`/`shader`/`relinker` and `prx`/`libc`/`libkernel`/`tools`), or publish separate per-area queue sections so subsystem reviewers always see clean PRs in their domain. - Pair with `CODEOWNERS` / subsystem merge delegation for low-risk/non-GPU PRX libraries so `oneandonlydean` is not the sole merge path for `59/60` PRs. 3. **WIP-capped active queue + stacked draft support in `pr-intake.yml`** - Replace unlimited non-draft open PRs (at `>= 20` merged) with a cap on **active non-draft / unreviewed PRs** per author (e.g., 5–10 active PRs), while allowing unlimited **draft** stacked PRs (which skip CI/review-queue churn until earlier PRs land). - **Reliability & speed gain:** Cuts wasted CI runs, `needs rebase` cascades, and hourly `pr-overlap` scans without slowing down authors. 4. **Dependency-exact PR test selection + two-tier automated batching** - Use transitive `#include` / `test-graph.json` (`select_tests.py`) reachability in `build_changed_guest_tests.py` and `build_mingw_host_only_tests.py` when `.hpp`/`.h` files change, keeping full `broad_change` only for root `CMakeLists.txt` / `.cmake` / workflow edits, while always keeping `public_headers` / `nid_*` / `patched_libraries_tests` strict for changed library interfaces. - Separate a fast **non-GPU merge lane** (hosted Linux compile via `#28182` + hosted Windows dependency-scoped tests, automated speculative batching + bisect on failure) from the **self-hosted GPU / relinker lane** (`core/shader/`, `core/libs/prx/libSceAgcDriver/`, `video_out`, `relinker/`, VM/memory primitives). Related CI work already open: `#28432`, `#28182`, `#28499`. 5. **Automated pre-review contract checks for PRXs** - Extend `tools/check_conventions.py` / `tools/guest_pointer_audit.py` with static AST checks before `review queue` eligibility: flag exported `APS5_VABI` functions that return constant success without calling `NotImplemented_nid_no_patch`, mutating real backend state, or having a `Silent stubs` debt entry; validate parameter counts/types against extracted firmware inventories where available. - Where clean-room reimplementation is avoidable for standard WebKit utility/DOM layers, prefer pinned `3rdparty/` upstream sources per `AGENTS.md`. --- ### 4. Phased Plan of Action - **Phase 1 — Immediate Queue & Intake Relief (zero C++ risk, CI/scripts only)** 1. Update `tools/pr_ready.py` to allocate guaranteed quota slots per subsystem alongside `unblocks title` priority (`--issue` summary grouped by area). 2. Adjust `.github/workflows/pr-intake.yml` to enforce active non-draft WIP limits instead of unlimited open PRs at `>= 20` merges, encouraging stacked drafts. 3. Land Linux PR compile checks (`#28182`) and single-pass Windows PR builds (`#28432`) + flake quarantine reporting (`#28499`). - **Phase 2 — Graph-Exact PR Testing & Contract Automation (`tools/`)** 4. Replace the blanket `core/libs/**/*.hpp` `broad_change` trigger in `tools/build_changed_guest_tests.py` and `tools/build_mingw_host_only_tests.py` with `#include` / `test-graph.json` transitive dependency resolution (with a nightly/push full safety sweep remaining intact). 5. Add automated silent-stub and export-signature inventory verification to PR checks so `MarcZX10` / reviewers only inspect real semantics rather than catching dummy stubs manually. - **Phase 3 — Structural Monolith Elimination & Delegated Merge Queue** 6. Migrate `libSceNKWebKit` (`Export.cpp` / `InventoryExports.hpp`) to generated NID stub fallback tables + per-domain implementation units (matching the `tests/cmake/*.cmake` and `docs/dev/debt/changes/` conflict-free pattern). 7. Introduce `CODEOWNERS` per subsystem and split automated speculative batch merging into a hosted non-GPU queue lane + the self-hosted GPU/relinker lane.
Sign in to join this conversation.
No labels
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.

Reference
boykopovar/AnyPS5#28700
No description provided.