fix(conventions): restrict silent stub exemptions to their section #3326
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3326"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T07:47:48Z.
What
Carries item 7 of @cookie42073-cmd's #3321 (the author is under the intake threshold). The commit is theirs, unchanged (
cf5e04c9, cherry-picked onto currentmain). One docs commit of mine follows.check_conventions.pyexempted a silent-stub export when any line ofdocs/dev/TechnicalDebt.mdlinked its file or named it with a path in its library, not just lines in the Silent stubs section the rule message points to. A file link under "Unknown function info" (for a different NID in the same file) could therefore exempt every silent stub later added to that file.silent_stub_debtnow keeps only the lines inside theSilent stubsheading, up to the next heading of the same or a higher level.SilentStubSectionTestscovers:One existing case. Over the last 200 commits of
main, the stricter rule finds exactly one export that passed only through such a link:sceAudioInInit(#3006), whosereturn 0;was exempted by the "Unknown function info" link forX+4jdIS75P0in the samelibSceAudioIn/Export.cpp. The second commit lists it by name under Silent stubs, with #3006's reason (no library-wide setup, assceAudioOutInit; eachsceAudioInOpenopens its own SDL capture device). That keeps the history clean under the new rule without re-exempting the whole file.Item 7 of #3321.
Tested
Windows 11 (10.0.26200), Python 3.12.6, on
main2bb78d2c:tools/tests/test_*.pypasses.check_conventions.pyreverted tomain, 6 of the new subtests fail (the out-of-section and after-section cases); with the change they pass.check_conventions.py --base upstream/main~200 --head HEAD:main's checker passes;[silent-stub] ... sceAudioInInit;pr_overlap.pyreports only #2150, which edits a neighbouring line ofTechnicalDebt.md(L45) for a different function; at most a one-line rebase.No workflow runs the tools tests, and nothing here is platform-specific.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T07:50:30Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL45Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:58:44Z.
Checked on Linux: all
tools/testspass; the newSilentStubSectionTestsfail withmain'scheck_conventions.py(6 subtests) and pass with the change;check_conventions.py --base main~200passes on the merged result, including thesceAudioInInitline. Merging.