You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(pathfinder): move two test-only helpers out of the package - #3604
Reviewing files that changed from the base of the PR and between 1aeaa44 and 8d32998.
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
Updated test setup to detect whether the NVIDIA library can be resolved on the system.
Kept platform-specific shell quoting coverage within the test suite; this does not change app behavior.
Chores
Removed an unused library-loading check and removed the shell-quoting utility from the application code.
The change removes the canary loadability helper and updates the nvcudla test fixture to check the resolved system path. It also moves shell quoting from a package utility to test helpers and updates test imports.
Changes: Library detection
Layer / File(s)
Summary
Check the resolved nvcudla path cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py, cuda_pathfinder/tests/conftest.py
The canary loadability helper is removed. The fixture checks whether the subprocess path resolver returns a path for nvcudla.
Test shell quoting
Layer / File(s)
Summary
Move shell quoting into test helpers cuda_pathfinder/cuda/pathfinder/_utils/platform_aware.py, cuda_pathfinder/tests/local_helpers.py, cuda_pathfinder/tests/test_driver_lib_loading.py, cuda_pathfinder/tests/test_find_static_lib.py, cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py
The package utility no longer defines quote_for_shell. Test helpers define the platform-aware function, and the test modules import it from there.
Change: Refactor
Merge Risk: Minimal · previous review 1aeaa
This change moves two test-only helpers out of the shipped package and updates the tests that use them. Shipped behavior is unchanged, and no concrete merge-blocking risk was found.
Security architecture risk: Minimal · up to 1aeaa
The changes are confined to test support and do not establish a new security exposure or a change to the shipped package’s behavior.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 1 remain after this review.
- `quote_for_shell` is only used to print paths in test summaries. It
moves to `tests/local_helpers.py`.
- `_loadable_via_canary_subprocess` is only used by `tests/conftest.py`,
which now calls the function it wrapped.
No behavior change for the shipped package. 1645 passed, 6 skipped.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
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
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.
— codex on behalf of Ralf —
Description
Part 4 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.quote_for_shellis only used to print paths in test summaries. It moves totests/local_helpers.py._loadable_via_canary_subprocessis only used bytests/conftest.py, which now calls the function it wrapped.No behavior change for the shipped package. 1645 passed, 6 skipped.
Testing
cuda_pathfindertest suite at this commit: 1645 passed, 6 skipped (Linux, Python 3.14).mypy-pathfinder.PLC Local Security Evidence (Advisory)
Local advisory checks only, run over the whole stack. Not release-gate results.
subprocess.runcall in the canary probe inload_nvidia_dynamic_lib.pyChecklist
🤖 Generated with Claude Code