feat(tools): fail import audits on strict provider mismatches #5430
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5430"
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 Prophet069 on 2026-10-13T19:34:23Z.
What
Add
--strict-providersto the existing import auditor. A named import whose NID is available only from another library currently appears in the mismatch report but does not make an otherwise complete audit fail. The opt-in flag makes that existing mismatch classification return exit code 1, while leaving the default Linux-friendly policy, shared libc provider exception, title-module handling, JSON report and missing-library failures unchanged.This replaces our separate local guest-registry preflight proposal rather than adding another auditor. It is a read-only package check, not an implementation of a guest export or proof that every dynamic lookup succeeds. Related #4916 audits dependencies with no imported functions; it does not implement strict provider checking. The two features are independent, with no prerequisite PR. No equivalent open PR was found in the targeted check.
Tested
Windows 10 Pro 22H2 x64 (build 19045), Python 3.14: all 50 existing and new import_audit tests passed in 6.747 seconds. Four new policy cases cover a NID supplied by the wrong existing provider (default succeeds, strict fails), the matching provider, the existing shared-libc exception, and a missing provider file. The tests exercise CLI status, classification and JSON output using tiny synthetic PE/ELF fixtures; they do not merely check that a runtime export exists. No emulator or DS2 startup was run. No speed improvement is claimed.
Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:42:17Z.
Checked
--strict-providersagainstlibrary_mismatch(it already excludes the shared libc provider), built and ran ctest on the PR merged onto main (31 tests green), and confirmedimport_auditfails without theimport_audit.pychange. Default behaviour is unchanged; merging.