Skip to content

fix: harden real Python tool execution and path/timeout handling - #12

Merged
howlcipher merged 1 commit into
mainfrom
feat/harden-real-python-tool-execution
Aug 19, 2026
Merged

howlcipher merged 1 commit into
mainfrom
feat/harden-real-python-tool-execution

Conversation

@howlcipher

Copy link
Copy Markdown
Owner

Problem

RealPythonTool lacked deterministic subprocess timeout handling and did not normalize single/multiple path inputs during lint operations.

Implementation

  • Added timeout parameter with default 60.0s to _run and RealPythonTool.execute.
  • Normalized paths parameter in run_lint to support both string and list formats.
  • Handled subprocess.TimeoutExpired gracefully returning a structured failure ToolResult.
  • Added test coverage in tests/tools/test_real_python_tool.py.

Verification

  • 147 tests passed in pytest -m 'not azure_integration'.
  • flake8 and mypy passed cleanly across all 133 source files.
  • terraform fmt -check -recursive passed.

- Add deterministic timeout support to RealPythonTool subprocess execution
- Handle single path strings and multiple paths cleanly in run_lint operation
- Return structured ToolResult on TimeoutExpired
- Add comprehensive unit tests in tests/tools/test_real_python_tool.py
@howlcipher
howlcipher merged commit 2deca3f into main Aug 19, 2026
3 checks passed
@howlcipher
howlcipher deleted the feat/harden-real-python-tool-execution branch August 19, 2026 14:43
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.

1 participant