Skip to content

refactor(pathfinder): remove data that only tests read - #3613

Open
rparolin wants to merge 4 commits into
pathfinder-readability/10-remove-unread-header-tablesfrom
pathfinder-readability/11-move-test-only-data
Open

rparolin wants to merge 4 commits into
pathfinder-readability/10-remove-unread-header-tablesfrom
pathfinder-readability/11-move-test-only-data

Conversation

@rparolin

@rparolin rparolin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

— codex on behalf of Ralf —

Description

Part 12 of 23 of a readability stack for cuda.pathfinder (stack: #3623 → #3602 → #3603 → #3604 → #3605 → #3606 → #3607 → #3608 → #3609 → #3610 → #3611 → #3613 → #3618 → #3619 → #3620 → #3621 → #3622 → #3627 → #3628 → #3629 → #3630 → #3631 → #3632). No behavior change.

A trace of every module-level name in the package found data that no shipped behavior reads:

  • SUPPORTED_BINARIES_ALL, an alias of SUPPORTED_BINARIES that one test used.
  • The eight SUPPORTED_LINUX_SONAMES* and SUPPORTED_WINDOWS_DLLS* tables, with the two descriptor groups and the reversing helper that built them. Their only readers were tests and the test-mode loader in dynamic_lib_subprocess.py.

The test-mode loader now asks the descriptor whether the library has file names on this platform. That is the question the table lookup answered.

Tests:

  • The real-load test builds its list of library names from the catalog, in the same order as before.
  • The "one file name belongs to one library" test reads the catalog.
  • Tests that only compared a removed table with the catalog are removed.

No behavior change. 1294 passed, 6 skipped. The test-mode loader gives the same result as main for all 50 libraries, in both of its outcomes, on Linux and on simulated Windows x64 and arm64. After this change the trace finds no data in the package that only tests read.

Risk: these are private names, as in the earlier table removals. The 1.2.0 release notes mention SUPPORTED_LINUX_SONAMES and SUPPORTED_WINDOWS_DLLS by name when describing search order; they make no promise to keep them.

The data is removed, not copied: tests derive what they need from the catalog.

Also in this PR: remove a binaries test that could not fail.

SUPPORTED_BINARIES is built from the keys of SITE_PACKAGES_BINDIRS, so asserting that those keys are a subset of it is always true.

Also in this PR: drop stale advice from AGENTS.md.

It told agents to keep derived exports in sync "through existing conversion logic and tests". No hand-kept derived tables are left, so it now says the name sets are computed from the catalog.

Testing

  • Full cuda_pathfinder test suite at this commit: 1294 passed, 6 skipped (Linux, Python 3.14).
  • pre-commit clean, including mypy-pathfinder.
  • Not run on Windows. Windows rules are exercised by tests that simulate Windows on Linux.

PLC Local Security Evidence (Advisory)

Local advisory checks only, run over the whole stack. Not release-gate results.

Check Status Tool Details
Secrets SKIP Pulse Secret Scanner scanner image not available locally (registry login); the repo trufflehog pre-commit hook passed
SAST WARN Semgrep 1 finding, not from this stack: the existing subprocess.run call in the canary probe in load_nvidia_dynamic_lib.py
Dependencies WARN pip-audit / osv-scanner no manifest or lockfile in scope, so the local scan could not run; this stack changes no dependencies
License N/A - no dependencies changed
Container N/A - no container changed

Checklist

  • I have read the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rparolin
rparolin added this pull request to stack #3612 November 25, 2026 22:06
@github-actions github-actions Bot added the cuda.pathfinder Everything related to the cuda.pathfinder module label Nov 25, 2026
@rparolin rparolin added the enhancement Any code-related improvements label Nov 25, 2026
@rparolin rparolin added this to the cuda.pathfinder next milestone Nov 25, 2026
@rparolin
rparolin removed this pull request from stack #3612 November 25, 2026 22:28
@rparolin
rparolin added this pull request to stack #3616 November 25, 2026 22:29
@rparolin rparolin self-assigned this Nov 25, 2026
@rparolin
rparolin requested review from juenglin and rwgk November 25, 2026 23:06
@rparolin
rparolin marked this pull request as ready for review November 26, 2026 16:12
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5687404 and 9c11ae5.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • API Changes
    • Removed the legacy platform-specific library filename mappings and aggregate binary-name constant. Integrations that reference these constants may need to be updated.
  • Documentation
    • Updated package architecture guidance to clarify how supported library names are determined and where to make related changes.

The change removes derived NVIDIA library filename mappings and the SUPPORTED_BINARIES_ALL alias. Runtime checks and tests now use platform-specific filenames from library descriptors.

Changes: Catalog-based metadata

Layer / File(s) Summary
Use descriptor filenames for platform checks
cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py, cuda_pathfinder/cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py, cuda_pathfinder/tests/test_lib_descriptor.py, cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py
The supported-library module no longer defines Linux SONAME or Windows DLL mappings. The no-cache check and load tests use platform-specific filenames from library descriptors. Descriptor tests no longer check consistency against the removed mappings.
Remove the binary-name alias
cuda_pathfinder/cuda/pathfinder/_binaries/supported_nvidia_binaries.py, cuda_pathfinder/tests/test_find_nvidia_binaries.py, cuda_pathfinder/AGENTS.md
The binary module no longer defines SUPPORTED_BINARIES_ALL, and its consistency test is removed. The architecture documentation describes library-name sets derived from the catalog.

Change: Refactor

Merge Risk: Minimal · previous review 56874

This refactor removes private lookup tables and points the test-mode loader and tests at the library catalog. No user-facing behavior change is expected, and no merge-blocking risk was found.

Security architecture risk: Minimal · up to 56874

The package removes test-only metadata without changing which binary names the public lookup accepts or how production library discovery works.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 386d4bd and 5687404.

Files selected for processing: 5

  • cuda_pathfinder/AGENTS.md
  • cuda_pathfinder/cuda/pathfinder/_binaries/supported_nvidia_binaries.py
  • cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py
  • cuda_pathfinder/tests/test_find_nvidia_binaries.py
  • cuda_pathfinder/tests/test_lib_descriptor.py
Files with no reviewable changes: 3

  • cuda_pathfinder/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py
  • cuda_pathfinder/tests/test_find_nvidia_binaries.py
  • cuda_pathfinder/tests/test_lib_descriptor.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 1 remain after this review.

@rparolin rparolin changed the title refactor(pathfinder): move data that only tests read out of the package refactor(pathfinder): remove data that only tests read Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

rparolin and others added 4 commits November 26, 2026 11:17
A trace of every module-level name in the package found data that no
shipped behavior reads:

- `SUPPORTED_BINARIES_ALL`, an alias of `SUPPORTED_BINARIES` that one
  test used.
- The eight `SUPPORTED_LINUX_SONAMES*` and `SUPPORTED_WINDOWS_DLLS*`
  tables, with the two descriptor groups and the reversing helper that
  built them. Their only readers were tests and the test-mode loader in
  `dynamic_lib_subprocess.py`.

The test-mode loader now asks the descriptor whether the library has
file names on this platform. That is the question the table lookup
answered.

Tests:
- The real-load test builds its list of library names from the catalog,
  in the same order as before.
- The "one file name belongs to one library" test reads the catalog.
- Tests that only compared a removed table with the catalog are removed.

No behavior change. 1290 passed, 6 skipped. The test-mode loader gives
the same result as `main` for all 50 libraries, in both of its outcomes,
on Linux and on simulated Windows x64 and arm64. After this change the
trace finds no data in the package that only tests read.

Risk: these are private names, as in the earlier table removals.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
`SUPPORTED_BINARIES` is built from the keys of `SITE_PACKAGES_BINDIRS`,
so asserting that those keys are a subset of it is always true.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
AGENTS.md told agents to keep derived exports in sync "through existing
conversion logic and tests". After the last three changes there are no
hand-kept derived tables left: `supported_nvidia_libs.py` computes its
name sets from the catalog.

The advice now says that.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@rwgk
rwgk removed this pull request from stack #3616 November 26, 2026 19:19
@rwgk
rwgk force-pushed the pathfinder-readability/11-move-test-only-data branch from 619b4d5 to 9c11ae5 Compare November 26, 2026 19:19
@copy-pr-bot

copy-pr-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

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

Labels

cuda.pathfinder Everything related to the cuda.pathfinder module enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants