Repository navigation
MAINT: Add runtime shutdown phase context - #3333
Merged
Roman Lutz (romanlutz) merged 1 commit intoOct 19, 2026
Merged
Roman Lutz (romanlutz) merged 1 commit into
Roman Lutz (romanlutz) merged 1 commit into
Conversation
7 of 25 tasks
Roman Lutz (romanlutz)
approved these changes
Oct 19, 2026
Roman Lutz (romanlutz)
enabled auto-merge
October 19, 2026 13:31
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 19, 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
Implements the remaining focused P311-08 runtime-shutdown investigation from #3166.
RuntimeLifecycle._shutdown_runtime_asyncnow adds static phase-name notes when either scenario-service shutdown or memory disposal fails. The change preserves the original exception objects, types, tracebacks, existing notes, cleanup order, cancellation behavior, and the established single-error /BaseExceptionGroupshape. It deliberately does not duplicate the service-close context added in #3281.The notes contain only static lifecycle phase names; they do not include prompts, seeds, credentials, or other runtime content.
Tests and Documentation
uv run --frozen --no-sync pytest -q --basetemp=D:\oss_contrib\pyrit-p311-08\.pytest-tmp-runtime-lifecycle tests/unit/backend/test_runtime_lifecycle.py— 67 passed.uv run --frozen --no-sync pre-commit run --files pyrit/backend/services/runtime_lifecycle.py tests/unit/backend/test_runtime_lifecycle.py— passed, including Ruff and ty.git diff --check— passed.Slai Agent Runtime assisted with investigation, implementation, and tests. The account owner reviewed and authorized this contribution.