Skip to content

Commit 68d2cce

Browse files
committed
feat: log warning for invalid max_threads values
Logs to minimal log (level 0) when max_threads is non-numeric or < 1. https://claude.ai/code/session_01XGuw7AxoKRWHr9EZX1SDXi
1 parent 321d85e commit 68d2cce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/workflow/CommandExecutor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ def _get_max_threads(self) -> int:
4949
# Validate: coerce to int and clamp to minimum of 1
5050
try:
5151
value = int(value)
52+
if value < 1:
53+
self.logger.log(f"WARNING: Invalid max_threads value ({value}), using 1", 0)
54+
value = 1
5255
except (TypeError, ValueError):
56+
self.logger.log(f"WARNING: Invalid max_threads value ({value}), using 1", 0)
5357
value = 1
54-
return max(1, value)
58+
return value
5559

5660
def run_multiple_commands(
5761
self, commands: list[str]

0 commit comments

Comments
 (0)