Repository navigation
docs(usage): list --strict-stubs and --strict-providers in the import audit options - #14368
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The two option descriptions match the exact-head implementation and --help; the documentation-only diff passes conventions and merges cleanly against the current main snapshot.
What I ran
Reviewed #14368 at head 7e896cac7b8eb5fd2fe111cdb2db2785531d9d9b, whose PR base was e6f57307fa7f47165d7fc1bee945abdb2f6816e7. The current main tip used for the merge preview was e67cc818696fd6e6c58ac80adc6550c54aed68e8; the preview was clean. Environment: Linux x86_64, Python 3.11.2; no compiler was invoked.
git diff --check e6f57307fa7f47165d7fc1bee945abdb2f6816e7...refs/review/session-20261101-14368
python3 tools/check_conventions.py --base e6f57307fa7f47165d7fc1bee945abdb2f6816e7 --head refs/review/session-20261101-14368
python3 tools/import_audit.py --help
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14368
python3 tools/pr_overlap.py --base main --branch refs/review/session-20261101-14368 --repo boykopovar/AnyPS5 --jobs 8The PR changes only docs/user/USAGE.md by two lines. I checked the option descriptions against classify, audit, summarize, and the exit expression in tools/import_audit.py at the reviewed head. The strict-stub count includes weak references and imports read from --modules; partial imports are a separate class. The provider mismatch exception for module imports and libc.prx matches the implementation. The PR's declared overlap note about #12877 is consistent with its current changed-file list, which contains no documentation file.
Results
| Check | Result |
|---|---|
| Diff check | Passed. |
| Repository conventions and PR template | Passed locally and in hosted CI. |
| CLI option comparison | Passed: --help lists both documented options and matching effects. |
| Current-main merge preview | Passed against e67cc818696fd6e6c58ac80adc6550c54aed68e8. |
| Hosted intake, eligibility, labels | Passed. |
| Build-dependent jobs | Skipped by CI; this documentation-only diff does not change build inputs. |
| Precheck test-quality heuristic | The precheck could not execute its optional helper because tools/pr_test_quality.py is absent from its isolated PR snapshot; no test files changed. |
| Broad overlap helper | Could not complete: its open-PR metadata parser rejected an invalid JSON escape. The PR's own overlap report is author-provided; I did not independently reproduce the full scan. |
| Runtime tests | Not applicable to a documentation-only change. |
Unedited selected command output
python3 tools/check_conventions.py ...:
All conventions checks passed.
python3 tools/import_audit.py --help (relevant lines):
--strict-stubs also fail when a referenced import resolves to a
throwing stub
--strict-providers fail when a named import is provided only by another
library; retains the existing libc and title-module
rules
Precheck's optional heuristic stderr:
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-14368-7e896cac7b8e/head-7e896cac7b8e-b17cb51d/tools/pr_test_quality.py': [Errno 2] No such file or directory
Overlap-helper output:
pr_overlap: Invalid \uXXXX escape: line 1 column 1292785 (char 1292784)
Findings
Blocking: None.
Non-blocking: The broad overlap helper did not complete, so I relied on the PR's overlap report and checked the directly referenced #12877 file list. No code or test behavior changed in this PR.
Sources
- Option parsing and exit behavior at the reviewed head
- Provider mismatch classification at the reviewed head
- Weak-import and module-import record handling at the reviewed head
- Summary counting at the reviewed head
- Strict-option exit condition at the reviewed head
- Command-line help definitions at the reviewed head
Not verified
No build or tests were run because only user documentation changed. I did not independently repeat the PR's all-open-PR overlap analysis; the local overlap helper failed while parsing unrelated PR metadata.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
On 26fa121 (line numbers below refer to it) the option table of the import audit in
docs/user/USAGE.md:635-641lists--libs,--modules,--source,--namesand--json, buttools/import_audit.pyalso accepts--strict-stubsand--strict-providers(import_audit.py:1003-1005), andimport_audit.py --helpprints both. A reader of the table does not learn what either option does; in USAGE.md they appear only in the exit-code sentence atUSAGE.md:645. This adds one row for each, written from the code rather than from the help strings: the exit expression atimport_audit.py:1051fails with--strict-stubsonly onunique_by_class["stub"], sopartialimports do not count, andsummarizeatimport_audit.py:903-915counts every record, weak imports and the imports of--modulesfiles included; with--strict-providersit fails onlibrary_mismatch, whichimport_audit.py:825sets only for an import that names a library and is exported, but not by the library it names, unless it is amoduleimport orlibc.prxexports it.import_audit.py --help.--strict-stubsexits with code1when an import has classstub, weak imports and the imports of--modulesfiles included, and not forpartialimports.--strict-providersexits with code1when an import that names a library is exported only by another library, exceptmoduleimports and imports thatlibc.prxexports. The rows sit after--source <dir>, which defines what counts as a throwing stub. If feat(tools): optionally reject partially implemented imports #12877 (--strict-partial) is merged, whichever of it and this pull request merges second adds the--strict-partialrow next to these.--help.pr_overlap.py --branchfinds no shared lines with the open pull requests it can compare and cannot compare feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, perf(agc): build the pipelines of a submission ahead on a compile pool #5925, perf(recompiler): keep runtime-specialized shader modules in the shader disk cache #6924, feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642, feat(libSceUserService): take the user name from ANYPS5_USER_NAME #9345, feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508, fix(relinker): analyze referenced code beyond SCE scan boundaries #10861, feat(relinker): add opt-in PEXT and PDEP lowering for Rosetta #12678, feat(agc): drop the top mip levels of large BC textures with APS5_TEXTURE_DOWNSCALE #12746, feat(libSceVideoOut): opt-in host pause with a key or on focus loss #12863 and feat(progress): count stubs no measured use needs as unobserved #13801, which also changedocs/user/USAGE.mdbut do not merge withmain. Checked by hand: a trial merge of this branch with each of them conflicts only in the files thatmainwith it already conflicts in; for perf(agc): build the pipelines of a submission ahead on a compile pool #5925 and feat(libSceUserService): take the user name from ANYPS5_USER_NAME #9345 these includedocs/user/USAGE.md, and with every other onedocs/user/USAGE.mdmerges cleanly (feat(progress): count stubs no measured use needs as unobserved #13801 rewrites only the--jsonrow and conflicts intools/progress_history.pyand its test, as onmain).Tested
Windows 11, Python 3.13.9 (no build: documentation only), on 26fa121:
python tools/import_audit.py --helplists--strict-stubs("also fail when a referenced import resolves to a throwing stub") and--strict-providers; on 26fa121grep -n '^| `--' docs/user/USAGE.mdshows the import audit table rows 637-641 for--libs,--modules,--source,--namesand--jsononly, and on this branch rows 640 and 641 for--strict-stubsand--strict-providersbetween--sourceand--names.import_audit.py:762-769(classify),825(library_mismatch),800-808and903-915(weak imports are recorded and counted) and1051(exit code).python tools/check_conventions.py --base 26fa1212b8 --head HEADwith this title and description passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)