fix: require boolean weak flags in import registries #6431

Merged
MrMha merged 1 commit from upstream-pr/6431 into main 2026-10-17 13:13:37 +00:00
MrMha commented 2026-10-15 15:00:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MrMha on 2026-10-15T15:00:50Z.


What

Registry parsing coerces weak with bool(), so the string "false" is treated as a weak import and can suppress the first unresolved strong-import stop. Require a JSON boolean when weak is present; omission still defaults to false. The regression covers strings, numbers, null, containers, accepted booleans, CLI failure, and preservation of an existing report.

Tested

macOS 27.0.1 arm64, Python 3.12.14; tooling fixtures only, no title.

The new regression failed on main ff23657 before the fix. This branch was tested independently from that base.

python3 -m unittest tools.tests.test_import_audit
Ran 85 tests in 1.169s
OK (skipped=1)
python3 tools/check_conventions.py --base ff23657f3437427fc5421857a6f9545e41806f2c --head HEAD
All conventions checks passed.

The combined local validation checkout containing all ten independent tooling fixes also built with ANYPS5_RELINKER_ONLY=ON, BUILD_TESTING=ON and passed all 172 CTest tests. Full Windows/Linux runtime and GPU tests 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; silent stubs are listed in technical debt (not applicable to this tooling change)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4875331757 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6431). Originally posted by [MrMha](https://github.com/MrMha) on 2026-10-15T15:00:50Z. --- ### What Registry parsing coerces weak with bool(), so the string "false" is treated as a weak import and can suppress the first unresolved strong-import stop. Require a JSON boolean when weak is present; omission still defaults to false. The regression covers strings, numbers, null, containers, accepted booleans, CLI failure, and preservation of an existing report. ### Tested macOS 27.0.1 arm64, Python 3.12.14; tooling fixtures only, no title. The new regression failed on main `ff23657` before the fix. This branch was tested independently from that base. ```text python3 -m unittest tools.tests.test_import_audit Ran 85 tests in 1.169s OK (skipped=1) python3 tools/check_conventions.py --base ff23657f3437427fc5421857a6f9545e41806f2c --head HEAD All conventions checks passed. ``` The combined local validation checkout containing all ten independent tooling fixes also built with `ANYPS5_RELINKER_ONLY=ON`, `BUILD_TESTING=ON` and passed all 172 CTest tests. Full Windows/Linux runtime and GPU tests were not run. ### 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 - [x] Unimplemented paths throw; silent stubs are listed in technical debt (not applicable to this tooling change) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 15:08:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T15:08:13Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6239 tools/import_audit.py L412-414
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6195344939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6431#issuecomment-6195344939). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T15:08:13Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6239](https://www.github.com/boykopovar/AnyPS5/pull/6239) | `tools/import_audit.py` [L412-414](https://github.com/boykopovar/AnyPS5/blob/93e54cedd3dd49eabf1c589f020b54758e0b6461/tools/import_audit.py#L412-L414) | | |
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!6431
No description provided.