fix(tools): let a debt fragment allow comments in check_conventions #21200

Merged
B-Howell merged 1 commit from upstream-pr/21200 into main 2026-11-19 01:01:00 +00:00
B-Howell commented 2026-11-15 23:35:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-11-15T23:35:12Z.


What

CONTRIBUTING now records debt only through a fragment in docs/dev/debt/changes/, but check_conventions.py still lifted the comment rule (and skipped shader and assembly comment checks) only when a pull request changed a debt file itself. A pull request that follows the new rule therefore fails on the comments a debt change allows, such as the // Derived from <path>@<commit> line ported WebKit code must carry (ruling). Seen on #19835 and #19828: each passes with its entry in libSceNKWebKit.md and fails with the same entry moved to a fragment.

The three checks now ask one helper, changes_debt(), which counts a changed fragment the same as a changed debt file.

Tested

Windows 11, Python 3.12.

  • New test_debt_fragment_allows_comments: a commit adding a // Derived from line and only a fragment. It fails on main ([comment] unexpectedly found) and passes with this change.
  • python3 -m unittest tools.tests.test_check_conventions_comments: 98 tests OK. test_check_conventions_debt_fragments, test_check_conventions_debt_labels, test_check_conventions_debt_length, test_debt_fold, test_debt_report and test_debt_split: all OK.
  • check_conventions.py --base origin/main passes on this branch.
  • @ycbuzi, full ctest on Debian 13 (Pentium Silver N6000, GCC 14.2.0, relinker-only build), three runs, 5960f17cb4 merged into main (report): no failures beyond those on main on the same machine.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
  • 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:5328426238 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21200). Originally posted by [B-Howell](https://github.com/B-Howell) on 2026-11-15T23:35:12Z. --- ### What CONTRIBUTING now records debt only through a fragment in `docs/dev/debt/changes/`, but `check_conventions.py` still lifted the `comment` rule (and skipped shader and assembly comment checks) only when a pull request changed a debt file itself. A pull request that follows the new rule therefore fails on the comments a debt change allows, such as the `// Derived from <path>@<commit>` line ported WebKit code must carry ([ruling](https://github.com/boykopovar/AnyPS5/pull/19819#issuecomment-6868889186)). Seen on #19835 and #19828: each passes with its entry in `libSceNKWebKit.md` and fails with the same entry moved to a fragment. The three checks now ask one helper, `changes_debt()`, which counts a changed fragment the same as a changed debt file. ### Tested Windows 11, Python 3.12. - New `test_debt_fragment_allows_comments`: a commit adding a `// Derived from` line and only a fragment. It fails on main (`[comment] unexpectedly found`) and passes with this change. - `python3 -m unittest tools.tests.test_check_conventions_comments`: 98 tests OK. `test_check_conventions_debt_fragments`, `test_check_conventions_debt_labels`, `test_check_conventions_debt_length`, `test_debt_fold`, `test_debt_report` and `test_debt_split`: all OK. - `check_conventions.py --base origin/main` passes on this branch. - @ycbuzi, full ctest on Debian 13 (Pentium Silver N6000, GCC 14.2.0, relinker-only build), three runs, 5960f17cb4 merged into main ([report](https://github.com/boykopovar/AnyPS5/pull/21200#issuecomment-6904636553)): no failures beyond those on main on the same machine. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 - [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
MarcZX10 commented 2026-11-16 04:16:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T04:16:56Z.

Review: APPROVED


Reviewed — looks good

The change makes debt fragments trigger the same comment and shader/assembly exemptions as debt files, and the inspected implementation and regression test support merging at head 5960f17cb43a15b13d974e05d2a9204d7f18718d.

What I ran

No commands were run. I read the prepared description, commit list, manifest, diff, and both changed files through repo_read.py; I also read the relevant debt-path predicates and fragment validation code. The PR description reports tests and platform checks, but I did not run them.

Results

Check Result Note
Diff and changed code review passed Both changed files read
Automated checks not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the reported test suite or convention checker. files.json was not available through the reader; the manifest lists two changed files, both marked included, and both were read. The prepared bundle’s files/ contents and any excluded files were not separately inspected.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5914979160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21200#pullrequestreview-5914979160). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T04:16:56Z. **Review:** APPROVED --- # Reviewed — looks good The change makes debt fragments trigger the same comment and shader/assembly exemptions as debt files, and the inspected implementation and regression test support merging at head `5960f17cb43a15b13d974e05d2a9204d7f18718d`. ## What I ran No commands were run. I read the prepared description, commit list, manifest, diff, and both changed files through `repo_read.py`; I also read the relevant debt-path predicates and fragment validation code. The PR description reports tests and platform checks, but I did not run them. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code review | passed | Both changed files read | | Automated checks | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run the reported test suite or convention checker. `files.json` was not available through the reader; the manifest lists two changed files, both marked included, and both were read. The prepared bundle’s `files/` contents and any excluded files were not separately inspected. ## To get this to a good state Nothing is required.
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!21200
No description provided.