Skip to content

feat(tools): fail import audits on strict provider mismatches - #5430

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Prophet069:codex/pr-strict-provider-audit-20261013
Oct 14, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Prophet069:codex/pr-strict-provider-audit-20261013

Conversation

@Prophet069

Copy link
Copy Markdown
Contributor

What

Add --strict-providers to 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

  • Based on current main; no other open PR implements the same functions
  • One branch per topic
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent success stub
  • No notes, investigation files, images or game dumps added
  • New third-party code: none
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (package validation only)
  • GPUs tested: n/a (Python audit policy)
  • AI-assisted: yes; prepared with Codex; the submitting author is responsible for every line

@adriadam10 adriadam10 self-assigned this Oct 14, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked --strict-providers against library_mismatch (it already excludes the shared libc provider), built and ran ctest on the PR merged onto main (31 tests green), and confirmed import_audit fails without the import_audit.py change. Default behaviour is unchanged; merging.

@adriadam10
adriadam10 merged commit 97eab6e into boykopovar:main Oct 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants