fix(tools): stop asking perf(tools), perf(ci) and perf(build) pull requests for title captures #11064

Merged
MarcZX10 merged 4 commits from upstream-pr/11064 into main 2026-11-02 10:26:42 +00:00
MarcZX10 commented 2026-10-25 16:31:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T16:31:16Z.


What

tools/pr_labels.py labels every pull request titled perf(...) or perf: with perf numbers missing until its description holds two aps5-summary.jsonl lines from different commits, and posts a comment asking for two title captures and their traces. Those lines come from running a title with APS5_TRACE_FRAMES or APS5_TRACE_SUMMARY_EVERY, so a pull request that speeds up a repository tool, a workflow or the build can never satisfy the check. #9966 (perf(tools)) and #10995 (perf(tools)) both carry the label and the comment for that reason; their before and after timings are in their descriptions instead.

Pull requests whose scope is tools, ci or build (case and surrounding spaces ignored) are now labeled perf only. Every other perf title, including perf:, perf!: and runtime scopes such as perf(agc) and perf(libc), still needs the two summary lines, and a scope that merely starts with tools (for example perf(toolsy)) is not exempt. Since labels_for removes managed labels that are no longer wanted, the hourly run of pr-labels.yml drops perf numbers missing from existing tooling pull requests once this is merged. CONTRIBUTING.md and GAME_TESTING.md name the exempt scopes.

Tested

Linux x86-64, Python 3.11: tools/tests/test_pr_labels.py passes, including three new tests: perf(tools), perf(ci), perf(build), perf(Tools) and perf( tools ) labeled perf only; perf:, perf!:, perf(agc), perf(libc) and perf(toolsy) still labeled perf numbers missing; and a tooling pull request that already carries the label gets it removed. The new tests fail before the fix (6 failures) and pass after it. python3 tools/check_conventions.py --base upstream/main and git diff --check upstream/main pass, and tools/pr_overlap.py --branch reports no overlap with open pull requests. Windows and macOS were not run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (not applicable; no third-party code added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5006546660 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11064). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T16:31:16Z. --- ### What `tools/pr_labels.py` labels every pull request titled `perf(...)` or `perf:` with `perf numbers missing` until its description holds two `aps5-summary.jsonl` lines from different commits, and posts a comment asking for two title captures and their traces. Those lines come from running a title with `APS5_TRACE_FRAMES` or `APS5_TRACE_SUMMARY_EVERY`, so a pull request that speeds up a repository tool, a workflow or the build can never satisfy the check. #9966 (`perf(tools)`) and #10995 (`perf(tools)`) both carry the label and the comment for that reason; their before and after timings are in their descriptions instead. Pull requests whose scope is `tools`, `ci` or `build` (case and surrounding spaces ignored) are now labeled `perf` only. Every other `perf` title, including `perf:`, `perf!:` and runtime scopes such as `perf(agc)` and `perf(libc)`, still needs the two summary lines, and a scope that merely starts with `tools` (for example `perf(toolsy)`) is not exempt. Since `labels_for` removes managed labels that are no longer wanted, the hourly run of `pr-labels.yml` drops `perf numbers missing` from existing tooling pull requests once this is merged. CONTRIBUTING.md and GAME_TESTING.md name the exempt scopes. ### Tested Linux x86-64, Python 3.11: `tools/tests/test_pr_labels.py` passes, including three new tests: `perf(tools)`, `perf(ci)`, `perf(build)`, `perf(Tools)` and `perf( tools )` labeled `perf` only; `perf:`, `perf!:`, `perf(agc)`, `perf(libc)` and `perf(toolsy)` still labeled `perf numbers missing`; and a tooling pull request that already carries the label gets it removed. The new tests fail before the fix (6 failures) and pass after it. `python3 tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main` pass, and `tools/pr_overlap.py --branch` reports no overlap with open pull requests. Windows and macOS were not run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (not applicable; no third-party code added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
thepoppfish commented 2026-10-25 17:34:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T17:34:51Z.

Review: APPROVED


Reviewed exact head 8da632a873145a7a8dc6924cf0f7ed984762859d against main 2e1c72239b23cf9b9e8ceb2d04fab25296374d92. Approve; no actionable findings.

The exemption uses the complete normalized scope, so tools, ci and build are exempt while runtime, mixed and similarly prefixed scopes still require captures. The managed-label removal also feeds the existing process() comment predicate: a tooling PR carrying an old perf numbers missing label loses it without a new capture-comment lookup/post. The hourly --all path continues to avoid comments, and unrelated labels/title-unblocking behavior is preserved. The CONTRIBUTING/GAME_TESTING wording matches the code.

Independent Windows 11 build26200 / Python3.14.7 checks:

  • python tools/tests/test_pr_labels.py -v: 20/20 pass, zero skips, 0.008s. Conventions against origin/main and whitespace pass; checkout is clean.
  • Additional 22 main-flow fixture scenarios per version, repeated for idempotency: 88 actual main() calls across head and unchanged main, with the GitHub gh boundary mocked. The head matches all expectations; main mismatches11 tooling-exemption cases. Cases cover fresh tooling PRs, removal of stale labels, mixed-case/space/breaking scopes, runtime/mixed-scope controls, valid runtime captures, an existing bot comment, preserved other/unblocks title labels, closed PRs, dry-run and hourly paginated backfill. Repeated processing produces no additional writes. Tooling cases avoid the capture-comment lookup/post; runtime cases retain it, and the hourly run makes no comment calls.

I reviewed the workflow's individual-PR and hourly invocation paths. Relevant pr_labels.py, performance_compare.py, test and workflow inputs are unchanged between the PR base and the main commit above. The fixture runs exercised production argument parsing, JSON ingestion and processing with an emulated GitHub boundary; they were not external CLI/API integration tests and made no real label/comment changes. No hosted workflow or product/game test is claimed.

AI-assisted review and fixture checks; the stated local runs were actually executed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5644368908 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11064#pullrequestreview-5644368908). Originally posted by [thepoppfish](https://github.com/thepoppfish) on 2026-10-25T17:34:51Z. **Review:** APPROVED --- Reviewed exact head `8da632a873145a7a8dc6924cf0f7ed984762859d` against main `2e1c72239b23cf9b9e8ceb2d04fab25296374d92`. Approve; no actionable findings. The exemption uses the complete normalized scope, so `tools`, `ci` and `build` are exempt while runtime, mixed and similarly prefixed scopes still require captures. The managed-label removal also feeds the existing `process()` comment predicate: a tooling PR carrying an old `perf numbers missing` label loses it without a new capture-comment lookup/post. The hourly `--all` path continues to avoid comments, and unrelated labels/title-unblocking behavior is preserved. The CONTRIBUTING/GAME_TESTING wording matches the code. Independent Windows 11 build26200 / Python3.14.7 checks: - `python tools/tests/test_pr_labels.py -v`: **20/20 pass**, zero skips, 0.008s. Conventions against `origin/main` and whitespace pass; checkout is clean. - Additional **22 main-flow fixture scenarios per version**, repeated for idempotency: **88 actual `main()` calls** across head and unchanged main, with the GitHub `gh` boundary mocked. The head matches all expectations; main mismatches11 tooling-exemption cases. Cases cover fresh tooling PRs, removal of stale labels, mixed-case/space/breaking scopes, runtime/mixed-scope controls, valid runtime captures, an existing bot comment, preserved `other`/`unblocks title` labels, closed PRs, dry-run and hourly paginated backfill. Repeated processing produces no additional writes. Tooling cases avoid the capture-comment lookup/post; runtime cases retain it, and the hourly run makes no comment calls. I reviewed the workflow's individual-PR and hourly invocation paths. Relevant `pr_labels.py`, `performance_compare.py`, test and workflow inputs are unchanged between the PR base and the main commit above. The fixture runs exercised production argument parsing, JSON ingestion and processing with an emulated GitHub boundary; they were not external CLI/API integration tests and made no real label/comment changes. No hosted workflow or product/game test is claimed. AI-assisted review and fixture checks; the stated local runs were actually executed.
THEMANnt commented 2026-10-26 18:44:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-26T18:44:52Z.

Review: APPROVED


Reviewed 8da632a873145a7a8dc6924cf0f7ed984762859d. Approve; no actionable finding in this focused review.

The label decision exempts the explicit tools, ci and build performance scopes from title captures while preserving the perf label and the normal capture requirement for runtime scopes. The contributing and testing guidance matches that distinction.

Validation: Windows, Python 3.11: 20 passed; base 17 passed. The old-production control fails six assertions for tooling performance titles. Exact-head hosted Build and Conventions are checked again before submission; skipped product jobs are not counted as native execution.

Scope: The label and comment API calls in the suite are mocked; no label mutations or title benchmark were performed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5657272186 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11064#pullrequestreview-5657272186). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-26T18:44:52Z. **Review:** APPROVED --- Reviewed `8da632a873145a7a8dc6924cf0f7ed984762859d`. Approve; no actionable finding in this focused review. The label decision exempts the explicit tools, ci and build performance scopes from title captures while preserving the perf label and the normal capture requirement for runtime scopes. The contributing and testing guidance matches that distinction. **Validation:** Windows, Python 3.11: 20 passed; base 17 passed. The old-production control fails six assertions for tooling performance titles. Exact-head hosted Build and Conventions are checked again before submission; skipped product jobs are not counted as native execution. **Scope:** The label and comment API calls in the suite are mocked; no label mutations or title benchmark were performed.
Sign in to join this conversation.
No reviewers
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!11064
No description provided.