Repository navigation
fix(tools): ignore non-module sidecars in import audit - #5519
Merged
adriadam10 merged 1 commit intoOct 14, 2026
Merged
Conversation
Zinebyte
force-pushed
the
fix/import-audit-module-sidecars
branch
from
October 13, 2026 22:26
c3dbb4f to
3b2601d
Compare
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
The documented import-audit workflow fails when a title's module directory contains a README or other metadata. The relinker accepts that directory, but
import_audit.py --modulesattempts to parse every file as ELF and exits 2 before reporting the imports.Select ELF module candidates by their header, regardless of filename. Ignore ordinary non-module sidecars; retain errors for malformed named module files, unsupported ELF, PE and SELF containers. Metadata cannot become a module provider or satisfy a missing dependency. The usage documentation states this selection policy.
Reproduced with the repository's existing
main_fixture()andmodule_with_symbol(True)fixtures: conversion with--registrysucceeds withsce_module/provider.prxand a 22-byteREADME.txt; auditing those generated registries fails on README's ELF header. Removing only README makes the baseline audit succeed. With this patch the same audit succeeds with README present. No title files were used.Tested
Zorin OS 18.1 x86-64, Python 3.12.3, GCC 13.3.0, CMake 3.28.3; final branch based on
bf8dc610e665a7547d027418e31ddcbb3261b3e0. Original regression baseline:c7601b797119da8e81191dd7d31bdfffd77d9f3b; the two audit files are unchanged between those upstream revisions..DS_Storeand empty metadata; real imports, exports and dependencies in an ELF with a nonstandard extension; missing imports named after metadata; malformed/PE/SELF refusal without creating or replacing the JSON report.27e5a6d75d96eab58175451938b43b14f42cc34aapplies cleanly with Git's three-way merge; all 52 combined audit tests pass. An additional control with different README contents beside identical modules audits the module once and still reports its real missing import.Hosted relinker CI passed on Linux, Windows and macOS at final head
3b2601daa348a7953bd90a1ed9ca71d99fad9070; eligibility and conventions also passed. The original submission passed intake. The implementation and tests are unchanged by the documentation clarification and rebase.Related work
#5273 adds duplicate-module identity checks inside
read_modules; it does not select module candidates. This patch changes the iterator through a separate helper, so duplicate checks run only for actual modules in the tested composition. Neither patch requires the other. The repository's overlap checker reports no conflict at currentmainwith both dependency lists empty.Checklist
main; no equivalent module-selection fix found