Skip to content

refactor(pathfinder): unify dynamic-lib subprocess probing (production, test code)#1779

Draft
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pathfinder_subprocess_unification
Draft

refactor(pathfinder): unify dynamic-lib subprocess probing (production, test code)#1779
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pathfinder_subprocess_unification

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Mar 17, 2026

Closes #1771

Follow-on to PR #1777

  • Consolidate canary and test subprocess entrypoints behind a single module with a shared JSON payload protocol.
  • Update load/test helpers to use the unified subprocess command and payload parsing.
  • Remove the old canary/test-only subprocess modules and adjust lint config.

Special attention was paid to:

  • Canary remains system-search only (no change to discovery semantics).
  • JSON payload parsing stays strict and errors remain explicit.
  • Subprocess cwd stays neutral to avoid source-tree import assumptions.

Suggested review path that minimizes context switching:

Production flow first

  • cuda_pathfinder/cuda/pathfinder/_dynamic_libs/subprocess_protocol.py
    Focus: payload schema (status, abs_path), parsing errors, command builder.
  • cuda_pathfinder/cuda/pathfinder/_dynamic_libs/dynamic_lib_subprocess.py
    Focus: canary vs load mode behavior, JSON output, abs_path validation.
  • cuda_pathfinder/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py
    Focus: canary subprocess invocation, timeout/error handling, JSON parsing.

Test and helper flow

  • cuda_pathfinder/tests/child_load_nvidia_dynamic_lib_helper.py
    Focus: command invocation, neutral cwd, JSON parsing.
  • cuda_pathfinder/tests/test_load_nvidia_dynamic_lib_subprocess.py
    Focus: subprocess command args and payload expectations.
  • cuda_pathfinder/tests/test_ctk_root_discovery.py
    Focus: updated canary probe payload/command expectations.
  • cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py
    Focus: not-found handling and parsed abs_path.
  • cuda_pathfinder/tests/test_driver_lib_loading.py
    Focus: not-found handling and parsed abs_path.
  • ruff.toml
    Focus: lint allowlist path updated.

Made with Cursor

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Mar 17, 2026

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.

@rwgk rwgk changed the title [WIP] follow-on for #1777: pathfinder subprocess unification [WIP] follow-on to #1777: pathfinder subprocess unification Mar 17, 2026
@rwgk rwgk force-pushed the pathfinder_subprocess_unification branch from f8dc41c to 0e1b49e Compare March 17, 2026 22:05
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Mar 17, 2026

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.

@rwgk rwgk changed the title [WIP] follow-on to #1777: pathfinder subprocess unification refactor(pathfinder): unify dynamic-lib subprocess probing (production, test code) Mar 17, 2026
Consolidate canary and test subprocess entrypoints behind a shared module and JSON payload, update call sites/tests accordingly, and remove the old test-only subprocess helpers.

Made-with: Cursor
@rwgk rwgk force-pushed the pathfinder_subprocess_unification branch from 0e1b49e to 776e53c Compare March 17, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(pathfinder): evaluate replacing spawned_process_runner with dedicated subprocess entrypoints

1 participant