Repository navigation
Conversation
|
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. |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 27 minutes. View limit details
No actionable comments were generated in the recent review. Summary
Change: Refactor Merge Risk:
|
Five functions repeated the same loop: take results in order, return the first hit, otherwise add up the misses. `first_hit()` in `search_steps.py` now holds it, and the five pass it their results: - `_find_under_root` - `find_in_install_root_env_vars` - `find_in_program_files_roots` - `run_find_steps` - `_try_ctk_root_canary` in `load_nvidia_dynamic_lib.py` Results are produced lazily, so nothing after the first hit runs. That matters for the canary step, which starts a subprocess per anchor: it still stops at the first root that has the library. No behavior change. The existing `run_find_steps` tests cover the helper (first hit wins, later steps are not called, misses combine in order), and three planted bugs in it each fail the suite. 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>
73d5042 to
a0fac69
Compare
|
— codex on behalf of Ralf —
Description
Part 23 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.Five functions repeated the same loop: take results in order, return the first hit, otherwise add up the misses.
first_hit()insearch_steps.pynow holds it, and the five pass it their results:_find_under_rootfind_in_install_root_env_varsfind_in_program_files_rootsrun_find_steps_try_ctk_root_canaryinload_nvidia_dynamic_lib.pyResults are produced lazily, so nothing after the first hit runs. That matters for the canary step, which starts a subprocess per anchor: it still stops at the first root that has the library.
No behavior change. The existing
run_find_stepstests cover the helper (first hit wins, later steps are not called, misses combine in order). Three planted bugs in the helper each fail the suite.Testing
cuda_pathfindertest suite at this commit: 1298 passed, 6 skipped (Linux, Python 3.14).mypy-pathfinder. mypy also passes with--platform win32.mainare still byte-identical (Linux, simulated Windows x64 and arm64), and all 526 public-API scenarios give the same result as fix(pathfinder): check for an already-loaded library before searching the disk #3623.PLC Local Security Evidence (Advisory)
Local advisory checks only, run over the whole stack. Not release-gate results.
subprocess.runcall in the canary probe, now incanary_probe.pyChecklist
🤖 Generated with Claude Code