Repository navigation
MAINT propagate one deadline across Docker sandbox invocation - #3610
Merged
Roman Lutz (romanlutz) merged 1 commit intoOct 29, 2026
Merged
Roman Lutz (romanlutz) merged 1 commit into
Roman Lutz (romanlutz) merged 1 commit into
Conversation
Roman Lutz (romanlutz)
self-requested a review
October 28, 2026 11:20
7 of 25 tasks
Roman Lutz (romanlutz)
approved these changes
Oct 28, 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.
Summary
Part of #3166 (P311-10).
Use one monotonic absolute deadline for the Docker sandbox invocation lifecycle. Docker client startup now runs under
asyncio.timeout_at(deadline), sharing the deadline already passed to output capture and container/client completion handling. This prevents startup from consuming the full timeout and then allowing capture to receive a fresh full budget.The existing timeout-specific errors, output handling, cleanup ownership, and control-command bounds are preserved. A focused regression test verifies that startup and the subsequent invocation handling receive the same absolute deadline.
Validation
uv run --frozen --group dev pytest --basetemp .pytest-tmp-p311-10d tests/unit/_code_execution/test_docker_client.py -q(50 passed)uv run --frozen --extra all --link-mode=copy -m ty check pyrit/_code_execution/docker_client.py tests/unit/_code_execution/test_docker_client.pyuv run --frozen --group dev ruff check pyrit/_code_execution/docker_client.py tests/unit/_code_execution/test_docker_client.pyuv run --frozen --group dev ruff format --check pyrit/_code_execution/docker_client.py tests/unit/_code_execution/test_docker_client.pygit diff --checkAI assistance disclosure
Slai Agent Runtime assisted with the investigation, implementation, and testing of this contribution. The account owner reviewed and authorized the submitted changes and is responsible for the submission.