Repository navigation
fix(tools): reject ambiguous guest modules in import audit - #5273
Merged
adriadam10 merged 1 commit intoOct 14, 2026
Merged
Conversation
10 tasks done
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
Different guest modules with the same filename in repeated
--modulesdirectories silently replaced each other's imports and combined their exports. Depending on directory order, an audit could report success despite a missing import and needed library.Reject differing module contents with both paths in the error, using the same SHA-256 identity policy as built libraries. Identical copies are audited once. Input conflicts are rejected before creating or replacing the JSON report.
Checked all 548 open PRs before publication and inspected the five that change the audit files: #5269, #4951, #4916, #4825 and #4425. None changes
read_modulesor implements this validation.Tested
Windows, Python 3.14, synthetic ELF fixtures. CTest
import_audit: 48/48 tests passed. The new regressions cover both directory orders, absent and existing JSON output, identical copies, repeated directories, imports, dependencies and export providers. Before the fix, all four conflicting-input cases failed with exit codes 0 or 1 instead of 2.Local conventions check against
origin/mainandgit diff --checkpassed. Python-only change; no title or runtime-library behavior is claimed.CI Build passed the relinker build and CTest suite on Linux (155 tests), Windows (150 tests) and macOS (146 tests), with no failures.
import_auditpassed on all three platforms. Conventions and PR intake also passed. Full runtime-library jobs were skipped by the repository's automatic PR policy.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)