feat(tools): report each converted title's current stop in import_audit #4606

Merged
Nixitov merged 1 commit from upstream-pr/4606 into main 2026-10-13 15:27:00 +00:00
Nixitov commented 2026-10-12 16:40:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nixitov on 2026-10-12T16:40:05Z.


What

tools/import_audit.py now reports each converted title's current stop: the first unresolved import in the registry order, which is the import the loader fails on. This is exactly the "line where it stops on current main" that a function PR must quote, and it removes the manual relink-and-run step every contributor currently does to find it (the workflow in #1578).

  • The stop is looked up in the order the registry lists the imports and printed per registry, with none when every import resolves.
  • It is included in the --json result as a stops list (registry, nid, library, name).

Tested

  • python tools/tests/test_import_audit.py passes (39 tests), including two new ones: the stop is the first unresolved import (not the first import, and not a later one), and it is none when every import resolves.
  • On a converted title (SwitchWaker), the report now prints Current stop (first unresolved import, in registry order): EDyhWelj7UY [libkernel.prx], matching the loader line observed when the title is run.
  • python tools/check_conventions.py --base origin/main passes.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4832338118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606). Originally posted by [Nixitov](https://github.com/Nixitov) on 2026-10-12T16:40:05Z. --- ### What `tools/import_audit.py` now reports each converted title's **current stop**: the first unresolved import in the registry order, which is the import the loader fails on. This is exactly the "line where it stops on current main" that a function PR must quote, and it removes the manual relink-and-run step every contributor currently does to find it (the workflow in #1578). - The stop is looked up in the order the registry lists the imports and printed per registry, with `none` when every import resolves. - It is included in the `--json` result as a `stops` list (registry, nid, library, name). ### Tested - `python tools/tests/test_import_audit.py` passes (39 tests), including two new ones: the stop is the first unresolved import (not the first import, and not a later one), and it is `none` when every import resolves. - On a converted title (SwitchWaker), the report now prints `Current stop (first unresolved import, in registry order): EDyhWelj7UY [libkernel.prx]`, matching the loader line observed when the title is run. - `python tools/check_conventions.py --base origin/main` passes. ### Checklist - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
Nixitov commented 2026-10-12 18:53:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nixitov on 2026-10-12T18:53:52Z.


Thanks bot. This is a same-file overlap only, not duplicated logic:

  • #4415, #4425 and #4559 also edit tools/import_audit.py (its report and main), and #4415 also touches its test.
  • This change adds a distinct stops section (the first unresolved import, in registry order) plus its tests; it does not touch the code those PRs change.

Happy to rebase after any of them lands; nothing here depends on them.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130604805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606#issuecomment-6130604805). Originally posted by [Nixitov](https://github.com/Nixitov) on 2026-10-12T18:53:52Z. --- Thanks bot. This is a same-file overlap only, not duplicated logic: - **#4415**, **#4425** and **#4559** also edit `tools/import_audit.py` (its report and `main`), and #4415 also touches its test. - This change adds a distinct `stops` section (the first unresolved import, in registry order) plus its tests; it does not touch the code those PRs change. Happy to rebase after any of them lands; nothing here depends on them. AI-assisted: yes
xXPBSXx commented 2026-10-13 13:03:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T13:03:34Z.


Windows test: head 7eae85946 merged onto current main 94d995772, together with 8 other open pull requests in one build (the merges were conflict-free); a failure would have been bisected per PR. Windows 10, MinGW GCC (WinLibs), Ninja Release, -j2: full build 0 errors; ctest for the tests this change adds or touches: import_audit passed; python tools/check_conventions.py --base upstream/main passed for the combined tree. I did not run the new tests against main without the change.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6146178946 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606#issuecomment-6146178946). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-13T13:03:34Z. --- Windows test: head `7eae85946` merged onto current `main` `94d995772`, together with 8 other open pull requests in one build (the merges were conflict-free); a failure would have been bisected per PR. Windows 10, MinGW GCC (WinLibs), Ninja Release, `-j2`: full build 0 errors; ctest for the tests this change adds or touches: import_audit passed; `python tools/check_conventions.py --base upstream/main` passed for the combined tree. I did not run the new tests against `main` without the change. AI-assisted (Claude Code).
Nixitov commented 2026-10-13 14:09:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nixitov on 2026-10-13T14:09:28Z.


Thanks for the Windows run across the combined tree (head merged onto main 94d995772) — good to have the audit passing with this change in place. Agreed the new tests are only meaningful with the change applied.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6147464587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606#issuecomment-6147464587). Originally posted by [Nixitov](https://github.com/Nixitov) on 2026-10-13T14:09:28Z. --- Thanks for the Windows run across the combined tree (head merged onto `main` `94d995772`) — good to have the audit passing with this change in place. Agreed the new tests are only meaningful with the change applied.
adriadam10 commented 2026-10-13 14:43:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:43:45Z.


Checked the diff, ran import_audit tests locally (29/29 in scope) and confirmed the two new tests fail without the change; Windows run by @xXPBSXx also passed. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6148173329 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606#issuecomment-6148173329). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T14:43:45Z. --- Checked the diff, ran `import_audit` tests locally (29/29 in scope) and confirmed the two new tests fail without the change; Windows run by @xXPBSXx also passed. Merging.
adriadam10 commented 2026-10-13 14:53:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:53:08Z.


Rebased onto current main (conflict in tools/import_audit.py main(): kept main's summarize over module references and the stops line). test_import_audit.py 46 tests OK, scoped ctest 29/29; logic unchanged. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6148363187 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4606#issuecomment-6148363187). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T14:53:08Z. --- Rebased onto current `main` (conflict in `tools/import_audit.py` `main()`: kept main's `summarize` over module references and the `stops` line). `test_import_audit.py` 46 tests OK, scoped ctest 29/29; logic unchanged. Merging once CI is green.
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!4606
No description provided.