MAINT Separate server launch, readiness, and cleanup state (#2415) - #2445
Merged
Roman Lutz (romanlutz) merged 5 commits intoAug 25, 2026
Conversation
Zhenyu Wang (zhenyu-02)
force-pushed
the
codex/pyrit-2415
branch
from
August 21, 2026 02:48
ae2213a to
7494dbc
Compare
Contributor
Author
|
@microsoft-github-policy-service agree |
Contributor
|
Is this meant to be a draft PR or ready for review? Zhenyu Wang (@zhenyu-02) |
Zhenyu Wang (zhenyu-02)
force-pushed
the
codex/pyrit-2415
branch
from
August 24, 2026 07:31
7494dbc to
96d91dd
Compare
Zhenyu Wang (zhenyu-02)
marked this pull request as ready for review
August 24, 2026 07:33
Contributor
Author
|
Roman Lutz (@romanlutz) I rebased this PR onto current Automated checks on the updated head (
The PR is now marked ready for review. Please take another look when convenient. |
Roman Lutz (romanlutz)
approved these changes
Aug 25, 2026
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.
Description
Closes #2415.
This refactors
ServerLauncher.start_asyncinto three internal seams while preserving it as the public orchestrator:stop().The process-group, detached-launch, PID-record, log, and public return/exception behavior remain unchanged. Focused tests cover platform-specific planning, invalid timeouts, cancellation during spawn/PID persistence/health polling/cleanup, repeated cancellation, readiness success, crash diagnostics, timeout cleanup, cleanup failure retention, and startup reporting failures when the ready message cannot be printed.
The branch is based on current
main(f9bcd1dd) and retains the merged #2457 dataset-preload timeout diagnostics: the timeout path reads the log tail once, reuses that tail for stderr output and the preload hint, and preserves the existing cleanup behavior.No public API or documentation behavior changed.
Automated validation
uv run pytest tests/unit/cli/test_server_launcher.py -q— 70 passed, 1 skippeduv run pytest tests/unit/cli -q— 454 passed, 1 skippeduv run ruff check pyrit/cli/_server_launcher.py tests/unit/cli/test_server_launcher.py— passeduv run ruff format --check pyrit/cli/_server_launcher.py tests/unit/cli/test_server_launcher.py— 2 files already formatteduv run ty check pyrit/cli/_server_launcher.py tests/unit/cli/test_server_launcher.py— passeduv run python -m compileall -q pyrit/cli/_server_launcher.py tests/unit/cli/test_server_launcher.py— passedgit diff --check— passedThese checks are local and CPU-only; no GPU or external service is required.