Skip to content

MAINT propagate one deadline across Docker sandbox invocation - #3610

Merged
Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
huong8373tt-beep:feat/p311-10-docker-deadline
Oct 29, 2026
Merged

Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
huong8373tt-beep:feat/p311-10-docker-deadline

Conversation

@huong8373tt-beep

Copy link
Copy Markdown
Contributor

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.py
  • uv run --frozen --group dev ruff check pyrit/_code_execution/docker_client.py tests/unit/_code_execution/test_docker_client.py
  • uv run --frozen --group dev ruff format --check pyrit/_code_execution/docker_client.py tests/unit/_code_execution/test_docker_client.py
  • git diff --check

AI 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.

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 28, 2026
Merged via the queue into microsoft:main with commit 2c8ac50 Oct 29, 2026
90 of 100 checks passed
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.

2 participants