Skip to content

refactor(pathfinder): remove header tables that the package never reads - #3611

Open
rparolin wants to merge 1 commit into
pathfinder-readability/9-remove-unread-lib-tablesfrom
pathfinder-readability/10-remove-unread-header-tables
Open

rparolin wants to merge 1 commit into
pathfinder-readability/9-remove-unread-lib-tablesfrom
pathfinder-readability/10-remove-unread-header-tables

Conversation

@rparolin

@rparolin rparolin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

— codex on behalf of Ralf —

Description

Part 11 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.

supported_nvidia_headers.py defined 19 module-level names: 17 tables and two helper tuples. The package reads one, SUPPORTED_HEADERS_CTK. This removes the 12 names it does not depend on, 11 tables and one helper tuple (82 -> 39 lines). The kept statements are unchanged and SUPPORTED_HEADERS_CTK has the same value and order.

Tests used five of the removed tables as test data. They now derive the same data from HEADER_DESCRIPTORS, and run the same number of tests.

Risk: these are private names (cuda.pathfinder._headers). No project on public GitHub imports them, but code outside public GitHub could.

Testing

  • Full cuda_pathfinder test suite at this commit: 1399 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

@rparolin
rparolin added this pull request to stack #3612 November 25, 2026 21:14
@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.

@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:13
@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 174d0e3 and 79d80f6.

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

  • Tests
    • Header support checks now validate platform-available descriptors, system-install patterns, and site-package support.
  • Chores
    • The supported NVIDIA header listings have been reduced. CTK header tables and platform-specific CTK selection remain available. Non-CTK and additional CTK listing constants are no longer provided.

The supported-header module retains CTK tables and removes legacy non-CTK and directory mappings. Tests now derive header and install-directory expectations from descriptors.

Changes: Header Projection

Layer / File(s) Summary
CTK projection and descriptor-based tests
cuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py, cuda_pathfinder/tests/test_find_nvidia_headers.py
The module retains platform-specific CTK tables and removes legacy non-CTK tables and directory mappings. Tests derive supported header and site-package expectations from descriptors and obtain system install patterns from descriptor data.

Suggested reviewers: cpcloud

Change: Refactor

Merge Risk: Minimal · previous review 6b6bf

This refactor removes private, unused header tables and points the tests at the descriptor catalog. It should not change runtime behavior, and no actionable merge-blocking risk was found.

Security architecture risk: Minimal · up to 6b6bf

CUDA Pathfinder keeps the same CTK header table for production use. Code that directly imports the removed private tables may need to change, but the PR does not change the supported header lookup interface.

- [ ] 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 b1fcdd5 and 6b6bfe9.

Files selected for processing: 2

  • cuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py
  • cuda_pathfinder/tests/test_find_nvidia_headers.py
Files with no reviewable changes: 1

  • cuda_pathfinder/cuda/pathfinder/_headers/supported_nvidia_headers.py

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

@github-actions

Copy link
Copy Markdown
Contributor

@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.

@juenglin juenglin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rparolin

rparolin commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 6b6bfe9

@rparolin
rparolin force-pushed the pathfinder-readability/10-remove-unread-header-tables branch from 6b6bfe9 to 174d0e3 Compare December 4, 2026 17:54
`supported_nvidia_headers.py` derived 15 tables from the header catalog.
The package reads one, `SUPPORTED_HEADERS_CTK`. This removes the 12
tables it does not depend on (82 -> 39 lines). The kept statements are
unchanged and `SUPPORTED_HEADERS_CTK` has the same value and order.

Tests used four of the removed tables as test data. They now derive the
same data from `HEADER_DESCRIPTORS`, and run the same number of tests.

Risk: these are private names (`cuda.pathfinder._headers`). No project
on public GitHub imports them, but code outside public GitHub could.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
@rparolin
rparolin force-pushed the pathfinder-readability/10-remove-unread-header-tables branch from 174d0e3 to 79d80f6 Compare December 4, 2026 20:44

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