refactor(pathfinder): replace spawned child runner with subprocess entrypoint#1777
Merged
cpcloud merged 3 commits intoNVIDIA:mainfrom Mar 17, 2026
Merged
Conversation
Contributor
rwgk
reviewed
Mar 17, 2026
| @@ -0,0 +1,75 @@ | |||
| #!/usr/bin/env python | |||
Collaborator
There was a problem hiding this comment.
Currently wondering: do we need this new subdirectory?
I'll play with this for a few minutes, hoping that we don't have to move the test-only code here.
Collaborator
There was a problem hiding this comment.
Gist of my exploration with Cursor:
We'll merge this PR now and plan a follow-on PR to unify the production and testing subprocess code paths.
Why unify later
- Reduce duplication between the canary probe subprocess and the test-only
load subprocess entrypoint. - Share a single JSON response protocol for success, not-found, and errors.
- Centralize subprocess invocation, timeout handling, and stderr formatting.
- Keep production and tests aligned as future behavior evolves.
- Make it easier to reason about, test, and maintain subprocess behavior.
Collaborator
There was a problem hiding this comment.
Here is the result of continuing the exploration with Cursor: #1779
rwgk
approved these changes
Mar 17, 2026
| @@ -0,0 +1,75 @@ | |||
| #!/usr/bin/env python | |||
Collaborator
There was a problem hiding this comment.
Gist of my exploration with Cursor:
We'll merge this PR now and plan a follow-on PR to unify the production and testing subprocess code paths.
Why unify later
- Reduce duplication between the canary probe subprocess and the test-only
load subprocess entrypoint. - Share a single JSON response protocol for success, not-found, and errors.
- Centralize subprocess invocation, timeout handling, and stderr formatting.
- Keep production and tests aligned as future behavior evolves.
- Make it easier to reason about, test, and maintain subprocess behavior.
…trypoint Move the remaining load-isolation tests onto the same dedicated subprocess pattern as the canary probe so `cuda_pathfinder` only has one subprocess model to maintain. This removes the generic multiprocessing helper while preserving the existing real-loading coverage and failure reporting. Made-with: Cursor
Validate and extract `LoadedDL.abs_path` through a typed helper so mypy can see the subprocess test helper's non-optional path contract after the runner refactor. Made-with: Cursor
27c73e2 to
0fc8d3f
Compare
|
Launch the subprocess helper from a neutral working directory so wheel-based CI imports the installed cuda-pathfinder package instead of the source tree and avoids missing generated _version.py failures. Made-with: Cursor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
multiprocessing-based spawned child runner incuda_pathfinderwith a dedicatedpython -msubprocess entrypointTest plan
cd cuda_pathfinder && pixi run pytest tests/pixi run ruff check cuda_pathfinder/cuda cuda_pathfinder/testsMade with Cursor