Skip to content

fix(tools): audit imports of guest modules - #5171

Closed
likecrank-dotcom wants to merge 1 commit into
boykopovar:mainfrom
likecrank-dotcom:fix/import-audit-guest-modules
Closed

likecrank-dotcom wants to merge 1 commit into
boykopovar:mainfrom
likecrank-dotcom:fix/import-audit-guest-modules

Conversation

@likecrank-dotcom

Copy link
Copy Markdown

What

Fixes #4202.

When --modules points at title-owned ELF modules, the audit now discovers each module's <executable>.<module>.guest.prx.registry.json sidecar beside the executable registry and includes those imports in the same report. A missing sidecar fails with a diagnostic that names the module and tells the user to rerun relinker with --registry. Explicitly supplied sidecars remain supported and are deduplicated. Updated the usage example to show the single-registry command.

Tested

Windows native, Python from D:\anyps5_work\tools\python:

  • python -m unittest discover -s tools/tests -p "test_*.py" — 264 passed, 2 skipped.
  • python tools/check_conventions.py --base origin/main --head HEAD — passed.
  • git diff --check origin/main...HEAD — passed.

No title package was available; no title runtime was run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new pull request
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed in technical debt
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behavior, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes (OpenAI Codex). The human author is responsible for reviewing and submitting the change.

AI assistance: OpenAI Codex (AI) implemented and validated this change. The human author remains responsible for review and submission.
@github-actions github-actions Bot added the docs label Oct 13, 2026
@likecrank-dotcom

Copy link
Copy Markdown
Author

Closing this PR to avoid duplicating the broader --modules import audit already under review in #4559. That PR parses guest modules' dynamic imports, including sectionless PRX files, directly, so the registry-sidecar discovery added here is not needed to cover #4202. I missed #4559 during the initial open-PR search; sorry for adding parallel review work. The changes and Windows test results remain available on this branch if maintainers find the sidecar path useful later.

AI-assisted (OpenAI Codex); the human author is responsible for the submitted work.

@github-actions

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#4425 tools/import_audit.py L371-372
#4559 tools/import_audit.py L348
tools/tests/test_import_audit.py L114
#4606 tools/import_audit.py L362, L371
tools/tests/test_import_audit.py L154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools: import_audit.py --modules never checks a guest module's own imports, only whether it's used as a dependency

1 participant