Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6257ebe753
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| normalized = " ".join(command.split()) | ||
| for pattern, suggested_timeout in LONG_RUNNING_COMMAND_TIMEOUTS: | ||
| if pattern.search(normalized): | ||
| return min(max(timeout, suggested_timeout), max_timeout) |
There was a problem hiding this comment.
Respect caller-provided shorter timeout values
Do not unconditionally raise the timeout for matched commands: _effective_timeout currently returns max(timeout, suggested_timeout), so Shell(timeout=5) on commands like npm install will actually run for 180s. This changes the semantics of the timeout parameter from an explicit limit to a minimum and can cause callers that rely on fast-fail behavior to block for minutes unexpectedly; consider only applying adaptive extension when the caller kept the default timeout.
Useful? React with 👍 / 👎.
6257ebe to
bbadafd
Compare
|
Rebased this onto the latest Validation on head
Pytest still reports a local |
|
Gentle bump on this one. The long-command timeout adaptation still applies cleanly on current main, and it is a small self-contained change. Happy to rebase if it is useful to pick up. |
|
Third and final nudge. |
|
The repo README announces the wind-down into kimi-code and this has had three nudges with no review. Closing rather than pinging a fourth time. |
Summary
Fixes #2195.
To verify
python -m uv run pytest tests\tools\test_shell_powershell.py tests\tools\test_shell_timeout_policy.py -qpython -m uv run ruff check src\kimi_cli\tools\shell\__init__.py tests\tools\test_shell_timeout_policy.pypython -m uv run ruff format src\kimi_cli\tools\shell\__init__.py tests\tools\test_shell_timeout_policy.py --checkpython -m py_compile src\kimi_cli\tools\shell\__init__.py tests\tools\test_shell_timeout_policy.pygit diff --check