fix(mcp): test timeout_seconds does not kill a hung test run, which blocks every later tool call
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in lib/src/commands/test/test.dart, where timeout_seconds is forwarded as --timeout to flutter test, and in lib/src/mcp/mcp_server.dart, where the run Lock is held. Decide whether the whole run needs a wall-clock timer that kills the process tree and releases the lock, and whether the per-test option should stay separate. Done when a hung test returns a timeout error naming the timeout and a queued test call then proceeds.
索引モデルが issue の本文から書いたものです。
説明
Description
The MCP test tool documents timeout_seconds as:
Maximum seconds to wait for the test run before killing the Flutter test process.
In practice the value is forwarded as --timeout, which very_good test passes to flutter test as --timeout=<n>s (lib/src/commands/test/test.dart). That is package:test's per-test timeout, not a wall-clock limit on the run, and nothing kills the process when the time is up.
The MCP server also serializes tool runs with a Lock (lib/src/mcp/mcp_server.dart, "keeps at most one run in flight"). The lock makes sense, but together with the above it turns one hung test into a stall for the whole server. Every later test call from any client or subagent waits behind it with no upper bound.
I hit this with several agents sharing one MCP server. A widget test deadlocked inside tester.runAsync (an image load started in the fake-async zone and awaited from the real zone). The flutter_tester process sat at 0% CPU for more than twice the given timeout_seconds and was never killed, so every other agent's test call was queued indefinitely.
Steps To Reproduce
- In a Flutter package, add a test that never completes and never yields, e.g.:
testWidgets('hangs', (tester) async { await tester.runAsync(() => Completer<void>().future); }); - Call the MCP
testtool withtimeout_seconds: 30. - While it runs, call
testagain (for another package or another client). - Observe that the first run is not killed after 30 s and the second call never starts.
Expected Behavior
timeout_secondsbounds the whole run: after that time theflutter testprocess tree is killed and the tool returns a timeout error that says it was a timeout.- The lock is released, so queued calls proceed.
- If a per-test timeout is wanted as well, expose it as a separate option, or reword the parameter description so it doesn't promise a kill.
Additional Context
- very_good_cli 1.5.0 (same code on
main), Flutter 3.47.5, macOS. - Related: #1722 (classification of test failures as transient).
- 主要言語
- Dart
- スター
- 2.4k
- フォーク
- 244
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
VeryGoodOpenSource/very_good_cli のほかの issue
-
難易度 2/5 1時間未満 初心者へのやさしさ 85/100
VeryGoodOpenSource/very_good_cli#1763 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
VeryGoodOpenSource/very_good_cli#1762 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
feat: merge lcov reports from sharded test runs再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンfeature
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
VeryGoodOpenSource/very_good_cli#1754 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
VeryGoodOpenSource/very_good_cli#1695 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
feat(mcp): stream progress notifications for long-running tools再び着手できるかも @vgvbot が 64 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature
VeryGoodOpenSource/very_good_cli#1616 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
VeryGoodOpenSource/very_good_cli の issue をすべて見る
似ている issue
-
coverage 1.16.0: format_coverage fails on the `{}` that `dart test --coverage` writes for fully skipped suites対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
fyi-ecosystem platform-ios team-ios
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
flutter/flutter#194348 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
djazairdev/wilayas#22 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
rajput-hemant/calculator#199 ·