fix(mcp): test timeout_seconds does not kill a hung test run, which blocks every later tool call
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Dart
- Stelle
- 2.4k
- Fork
- 244
- Merge medio
- 1g 4h
- PR unite (30g)
- 25
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di VeryGoodOpenSource/very_good_cli
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 85/100
VeryGoodOpenSource/very_good_cli#1763 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
VeryGoodOpenSource/very_good_cli#1762 · 1 commento · 4 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
feat: merge lcov reports from sharded test runsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertafeature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
VeryGoodOpenSource/very_good_cli#1754 ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
VeryGoodOpenSource/very_good_cli#1695 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feat(mcp): stream progress notifications for long-running toolsForse di nuovo libera @vgvbot l’ha presa 64 giorni fa e non c’è nessuna pull request aperta. Apertafeature
VeryGoodOpenSource/very_good_cli#1616 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di VeryGoodOpenSource/very_good_cli
Issue simili
-
coverage 1.16.0: format_coverage fails on the `{}` that `dart test --coverage` writes for fully skipped suitesForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
fyi-ecosystem platform-ios team-ios
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
flutter/flutter#194348 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
djazairdev/wilayas#22 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
rajput-hemant/calculator#199 · 3 commenti · 1 reazione ·