Skip to content

test: make the retained Ergatis patch tests pass pre-commit (ruff, pyright) - #3

Merged
YugmaF merged 1 commit into
ergatis-v1.54.0from
fix/v1.54.0-precommit
Oct 17, 2026
Merged

YugmaF merged 1 commit into
ergatis-v1.54.0from
fix/v1.54.0-precommit

Conversation

@thilinawishvekeerthi

@thilinawishvekeerthi thilinawishvekeerthi commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

HUMAN:
We run OpenHands agents with several MCP servers per conversation. One server that
stopped answering during startup cost us every server's tools, and startup time grew
with each server we added. This PR connects the servers concurrently with a per-server
deadline. We built it into our agent-server image and confirmed the timings in the
comment above, plus a real conversation that used an MCP tool. I reviewed the change
and the trade-off (24s per-server deadline) and I'm happy to adjust it if you prefer
a separate setting.


AGENT:

Why

pre-commit fails on #1 even though that PR only adds the parallel-MCP commit: the failures are in tests from the retained Ergatis patches already on ergatis-v1.54.0 (1 ruff-format, 4 pyright errors).

Summary

  • test_blocking_no_change_timeout.py: ruff-format inline comment spacing.
  • test_astep_releases_state_lock_during_tools.py: narrow to MessageEvent instead of getattr on Event; pass [*script] to TestLLM.from_messages (list is invariant).
  • test_mid_run_reply.py: build the ActionEvent.tool_call as a MessageToolCall, not a dict.

Test-only, no behaviour change.

Issue Number

N/A — issues are disabled on this fork.

How to Test

Run the full pre-commit suite and the three touched test files from the repo root:

uv run pre-commit run --all-files   # exit 0, 8 hooks passed
uv run pytest -q tests/sdk/agent/test_astep_releases_state_lock_during_tools.py tests/sdk/agent/test_mid_run_reply.py tests/tools/terminal/test_blocking_no_change_timeout.py   # 29 passed

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

Merge before #1, then re-run #1's pre-commit check.

…right)

- test_blocking_no_change_timeout: ruff-format inline comment spacing.
- test_astep_releases_state_lock_during_tools: narrow to MessageEvent instead of
  getattr on Event; pass a fresh list to TestLLM.from_messages (list is invariant).
- test_mid_run_reply: build the ActionEvent tool_call as a MessageToolCall, not a dict.

Test-only; no behaviour change. Clears the pre-commit failure on #1.
@viper-review

viper-review Bot commented Oct 17, 2026

Copy link
Copy Markdown

Viper is reviewing this pull request — findings and a summary will be posted shortly.

@viper-review viper-review 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.

Auto decision by Viper: aggregated open high=0 (threshold 1), open medium=0 (threshold 3) => APPROVE.

@viper-review

viper-review Bot commented Oct 17, 2026

Copy link
Copy Markdown

Summary

No code quality issues were identified in this test-only change set.

Description

Adjusts three retained Ergatis patch test files so they pass pre-commit (ruff-format and pyright) on ergatis-v1.54.0. Narrows an event type to MessageEvent instead of using getattr on Event, passes a materialized [*script] list to TestLLM.from_messages to satisfy list invariance, constructs ActionEvent.tool_call as a MessageToolCall rather than a dict, and fixes inline comment spacing. No production code or runtime behaviour is modified.

@YugmaF
YugmaF merged commit 01b0de0 into ergatis-v1.54.0 Oct 17, 2026
8 of 21 checks passed
YugmaF added a commit that referenced this pull request Oct 17, 2026
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