Skip to content

fix: DH-22975: v2 add script exec timeout - #206

Merged
jnumainville merged 2 commits into
mainfrom
jnumainville_22975_v2_script_timeout
Nov 4, 2026
Merged

jnumainville merged 2 commits into
mainfrom
jnumainville_22975_v2_script_timeout

Conversation

@jnumainville

Copy link
Copy Markdown
Collaborator

Add optional timeout to script exec
This will not interrupt the exec, but will stop the session from getting stuck on a long running script that can just execute in the background or be killed instead

@jnumainville
jnumainville requested a balanced review from Copilot October 19, 2026 21:08
@semanticdiff-com

semanticdiff-com Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  src/deephaven_mcp/cli/_commands/_wrapping.py  65% smaller
  src/deephaven_mcp/client/_session.py  37% smaller
  tests/mcp_systems_server/_tools/test_script.py  18% smaller
  src/deephaven_mcp/cli/_commands/session.py  1% smaller
  docs/CLI.md Unsupported file format
  pyproject.toml Unsupported file format
  src/deephaven_mcp/mcp_systems_server/_tools/script.py Unsupported file format
  tests/cli/_commands/test__wrapping.py  0% smaller
  tests/cli/_commands/test_session.py  0% smaller
  tests/client/test__session.py  0% smaller

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Non-finite timeout inputs produce internal errors, and CLI documentation incorrectly promises an indefinite default wait.

2 open issues
What changed in this PR

Adds optional script-execution timeouts across the client, MCP tool, and CLI. Timeouts stop waiting without cancelling the running script.

Changes:

  • Adds timeout propagation and a dedicated timeout response.
  • Introduces --script-timeout and extends the CLI request deadline.
  • Updates documentation and timeout-focused tests.
File Description
tests/​mcp_systems_server/​_tools/​test_script.py Tests timeout forwarding and responses.
tests/​client/​test__session.py Tests bounded execution and exception handling.
tests/​cli/​_commands/​test_session.py Tests the timeout option and deadline extension.
tests/​cli/​_commands/​test__wrapping.py Tests request-timeout overrides.
src/​deephaven_mcp/​mcp_systems_server/​_tools/​script.py Exposes script timeouts and reports expiry.
src/​deephaven_mcp/​client/​_session.py Adds bounded waits using private threads.
src/​deephaven_mcp/​cli/​_commands/​session.py Adds --script-timeout.
src/​deephaven_mcp/​cli/​_commands/​_wrapping.py Propagates per-call request deadlines.
docs/​CLI.md Documents timeout behavior and usage.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no unresolved blocking issues; tests were not executed.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@jnumainville
jnumainville marked this pull request as ready for review November 3, 2026 15:23

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@bmingles bmingles left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me

@jnumainville
jnumainville merged commit 4271323 into main Nov 4, 2026
24 checks passed
@jnumainville
jnumainville deleted the jnumainville_22975_v2_script_timeout branch November 4, 2026 18:51
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants