Repository navigation
feat(tools): fail import audits on strict provider mismatches - #5430
Merged
adriadam10 merged 1 commit intoOct 14, 2026
Merged
adriadam10 merged 1 commit into
adriadam10 merged 1 commit into
Conversation
11 tasks done
Collaborator
|
Checked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 functions