fix(tools): recognize guest module identities in import audit #6171
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6171"
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 johnohhh1 on 2026-10-15T00:15:56Z.
What
Correct a false failing import audit for Middle Ages Ping Pong, PPSA28319 01.000.000. Its
Il2CppUserAssemblies.prxdeclares the SCE identityIl2cppUserAssemblies. The relinker resolves that identity, but the audit reports four absent imports and a missing module.Read ELF SONAMEs and SCE module identities using the relinker's exact-name precedence and suffix rules. Preserve ambiguity checks, import counts and physical filename requirements for host dependencies. This corrects preflight diagnostics; the title already runs.
Merge order: #7454, then #6171, agreed with #7454's author. The prepared identity-side normalization will be applied with the rebase after #7454 lands; its implementation is not bundled here.
Tested
Head
35bf15c51, rebased cleanly onto synced main8727ddb29. The tool, tests and documentation are byte-for-byte identical to the earlier October 20 head98596149e; fresh Linux checks and the saved title audit pass again. The contribution combines declared identities with main's newModuleNamesfilename-suffix and Windows case matching. It preserves unscoped guest-import lookup, NID disambiguation normalization, PE support and the Windows host-importer set. Host lookup still receives physical module filenames rather than guest identity aliases.2626e5ee7registries/libraries and current source classification, main's tool exits 1 with four absent imports; the PR exits 0 with none. Both retain 2,355 references, 1,052 unique imports and eight stub classifications. No missing host dependencies. This reruns the audit, not the game or native build.98596149e, whose audit tool/test blobs exactly match this head; Windows was not rerun for this rebase. Fresh local Linux validation also passes all six subprocess CLI checks. The seven regression methods produce 83 failed subcases and zero errors against main's tool. No upstream native CI is claimed.11840ad87and our74c5e7029passed 122 Linux tests with one skip, plus four cross-feature methods. The author and another contributor report compatible combinations at their recorded pins. These are historical results; the combination will be revalidated after #7454 lands on current main.Pinned evidence, CI results and replay patch. Historical runtime evidence remains main
2626e5ee7: rendered match and exit 0 after SIGINT at 45.47 s, RTX 5070/NVIDIA 595.99.02, SDL dummy audio. No full-playability, performance, console result or second affected title is claimed. Earlier independent Windows validation applies to the original revision.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)Imported from boykopovar/AnyPS5. Originally posted by ideabsassistenza on 2026-10-15T07:05:29Z.
Independent Windows check of
657f16ea286035a8615e2d56614a354cd4559e31, against baselineab9a4768407d862d1879d7d0ee66bd9c3d9d67a8, using CPython 3.12.14 on Windows 11 x64/NTFS.Exact tool/test blobs were extracted from Git; the workspace checkout was unchanged. Python/synthetic files only: no title replay, native build, CMake/CTest, GPU or Linux/macOS run. Composition with #5571 or current main was not tested; the overlap still needs handling separately.
AI-assisted testing and reporting: OpenAI Codex.
Imported from boykopovar/AnyPS5. Originally posted by johnohhh1 on 2026-10-18T23:04:01Z.
@MarcZX10 @ggkouujere-debug I checked #6171 rebased to
a12828cf6on mainfc623324a, together with #7159 atabea0949aand #7454 at0df919176.read_modulesreturn. Adapting the companion PE test's unpacking gives 113 passing tests and one Windows-only skip on Linux.$ORIGIN/Declared.prxis not normalized before the SCE identity lookup, so six valid-resolution cases fail and two ambiguous identities are missed. Applyingstrip_originto the requested names before that lookup resolves all eight; the missing-host-file guard still passes.Pinned heads, candidate patches, replay commands and results.
Which merge order would you prefer? I can handle the rebase and the identity-side resolution here after either of yours lands. The PR currently declares no semantic dependency; I will update that once we agree on an order.
There is also fresh author-run Windows and Linux validation of the rebased tool/test files. The actual PPSA28319 audit still changes exit 1 to 0 and four absent imports to zero. This fixes a false preflight failure; the game already runs. If anyone has the same declared-name mismatch on another title, an audit report would help establish the broader impact. PPSA28319 remains our only confirmed affected title.
AI-assisted testing and reporting: OpenAI Codex.
Imported from boykopovar/AnyPS5. Originally posted by ggkouujere-debug on 2026-10-19T09:49:19Z.
Thank you for the thorough analysis! I've verified the combination locally: merged both PRs, applied
strip_originbefore the identity lookup as you suggested, and all 114 tests pass.I agree with your proposed merge order: #7454 first, then #6171 with your rebase. Please proceed with the identity-side resolution on your end.
Appreciate the collaboration!
Imported from boykopovar/AnyPS5. Originally posted by joedeangelis533-bot on 2026-10-19T14:32:48Z.
@johnohhh1 @ggkouujere-debug I'll queue our Windows host-library capitalization fix after both of these PRs, preserving the order recorded above: #7454 -> #6171 -> our follow-up. The follow-up will declare
Depends on: #7454, #6171; its eventual rebase will retainhost_modulesfor host-file lookup and add the PE importer set alongside it.Our branch changes only Windows host dependency lookup. Its seven regression tests cover capitalization, transitive gaps, ELF and converted PE module providers, mixed ELF/PE graphs, ambiguous variants/report preservation, and cycles. ELF name lookup stays case sensitive.
Validation on Windows/Python 3.12.14:
bcdee66d1: 112 passes, 3 platform skips (115 total); rebase preserves the previously tested tool/test blobs exactly.a12828cf6, #745411840ad87and our change on main3686960c5: 120 passes, 3 skips (123 total). The audit/tool test files on that main snapshot andbcdee66d1are identical.read_modulesreturn, and normalization withstrip_originbefore the requested-name identity lookup, as discussed here. Six valid SCE-identity/$ORIGIN cases and two ambiguity/report-preservation cases also pass.I'll open the standalone follow-up with these dependencies and take its rebase after both land. The combined resolution is compatibility evidence, not extra implementation in that follow-up. No game runtime, full native build, Linux/macOS, or performance claim.
AI-assisted implementation, testing and communication: OpenAI Codex.
Imported from boykopovar/AnyPS5. Originally posted by johnohhh1 on 2026-10-19T17:39:45Z.
Thanks @ggkouujere-debug — recorded the agreed order #7454 → #6171 in
Depends onand the description.Rebased this PR onto main
b6583dd86as74c5e7029, resolving the new conflict after #7159 merged. The resolution retains PE guest modules, main's Windows host-importer set and Unicode diagnostics, and passes physicalhost_modulesto the host checker. The existing PE reader regression now checks its three-value result.Fresh author-run CI: Windows/Python 3.12 and 3.14 each passes 120 tests with two POSIX-only skips; Linux passes 121 with one Windows-only skip. Six CLI cases pass on each runner. The baseline control still gives 83 failed subcases and zero errors. No new native build or title run.
The prepared combination with #7454
11840ad87retains the Windows lookup changes, passes 122 tests with one Windows-only skip on Linux, and passes all four cross-feature methods. The identity-sidestrip_originnormalization is ready for the rebase after #7454 lands; your implementation stays separate from this PR.AI-assisted implementation, testing and reporting: OpenAI Codex.
Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T08:11:43Z.
Review: CHANGES_REQUESTED
Reviewed exact head
35bf15c510cb50ee8152d911c686e5eccdb95c15. I found two additional interactions between declared aliases and the existing filename matcher; details are in the inline comments.Independent Windows 11 build 26200 / Python 3.14.7 / Git 2.55.0.windows.3 validation:
python -m unittest discover -s tools/tests -p test_import_audit.py -v: 127 tests run in 16.019 s; 124 pass and 3 skip (two POSIX permission tests and the symlink test, which lacks the Windows privilege on this host).2742004ed28f765c7147db0e0269ff5868e9eb6fandgit diff --check origin/main...HEADpass.Declared.prxresolves with the physicalDeclared.prxprovider and two unrelatedDeclaredidentities. Changing only the requested suffix to.sprx,.suprx, or.debug_prxchanges exit 0 to exit 2. The same four cases all exit 0 with current main's tool. Failed PR cases preserve the existing report.Declareddoes not resolvedeclared.prxby itself (exit 1). Adding the validDeclared.prxreference makes both resolve (exit 0). A SONAMEDeclared.prxalso resolves a case-mismatched request on this head. The relinker folds physical filenames infindGuest, whilematchesIdentitycompares declared identities exactly; this result should not depend on another registry entry.Replay from the exact PR checkout, using its existing synthetic-image helpers:
The relinker comparison was source inspection of
GuestModuleBuilder.cppat this head, not a native relinker execution. No C++ build, game, console or GPU test was run. The existing #7454-first order and its planned normalization remain separate from these findings.AI-assisted review and testing: yes (OpenAI Codex).
Pull request closed