feat(mcp): structured test results and accurate failure types after #1725
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with ToolRun.resultForException in lib/src/mcp/tool_run.dart, then trace how the test command builds partialResults and serializes MCP payloads. The issue names --show-uncovered as the source for uncovered-line data; inspect its existing calculation. Done means deterministic failures get accurate types and advice, test and coverage results include the requested structured fields, and payloads remain valid JSON.
索引モデルが issue の本文から書いたものです。
説明
Description
Follow-up to #1615, #1722 and #1725, based on 310 field calls to the MCP server from Claude Code between 2026-10-04 and 2026-10-16.
#1725 fixes the worst problem on main: failing tests and unmet coverage now exit 70 and map to business instead of transient. That fix is not in a release yet. 1.5.0 (2026-09-08) is still the latest, so every user still gets transient plus "Check network and remote service availability" on a failing test. In the field data that was 97 of 99 test failures (82 failing tests, 12 of them compile errors; 15 coverage gates).
What remains after #1725:
- The exception path still labels everything
transient.ToolRun.resultForException(lib/src/mcp/tool_run.dart) maps any non-UsageExceptiontotransient. In the field, that covered 17createfailures, all deterministic: 9 invalid-YAML descriptions, 6 missing workspace roots, 2 stale-snapshotInvalid SDK hasherrors. None succeed on retry. businessis too coarse to act on. An agent needs to tell "tests failed" from "coverage below threshold" from "tool crashed" from "timed out" without parsing prose. Suggested types:test_failure,coverage_below_threshold,usage_error,timeout,tool_crash, keepingtransientfor genuinely transient causes.- Results are prose only. Agents scrape
partialResultstext. Structured fields would make results cheap to act on and robust to output-format changes:failingTests[]with file and test name, including[ERROR] loading …compile failurespassed,failed,skippedcountscoverage.actual,coverage.required,uncoveredLines[](the data--show-uncoveredalready computes)durationMs
alternativeApproachesshould follow the failure type. For a test failure the useful advice is "read the failing tests inpartialResults", not "retry".- Some payloads are not valid JSON. 10 large payloads contained raw control characters (ANSI or other C0 bytes from test output) and failed to parse. Strip or escape them before serializing.
- Detect a crashed Flutter tool. The one genuinely transient failure in 310 calls was
Oops; flutter has exited unexpectedly: "Bad state: No element"followed byPathNotFoundException … ./coverage/lcov.info(session493ade61). A retry 19 s later passed. A missinglcov.infoafter a run that requested coverage is a reliabletool_crashsignal.
Steps To Reproduce
On 1.5.0:
- Call
teston a package with one failing test. ObservefailureType: "transient"and network advice. - Call
createwith a description containing": "(see the companion YAML issue). Observethrew an exception … _WrappedYamlExceptionwithfailureType: "transient".
On main (8c772f3), step 1 returns business; step 2 still returns transient.
Expected Behavior
- A release that ships #1725.
- Deterministic exceptions are never labelled
transient. - Test results carry the structured fields above alongside the existing prose, and advice depends on the failure type.
- Every payload is strict JSON.
Additional Context
-
In practice Claude read the output and fixed the code rather than retrying blindly: Of 29 identical-argument retries that passed, only 2 passed without an intervening code edit. The mislabel still costs tokens on every failure and will mislead less disciplined agents.
-
Field environment: very_good_cli 1.5.0, Dart 3.13.5, Flutter 3.47.6, macOS 26.5 arm64, Claude Code 2.1.302, vgv-ai-flutter-plugin 0.0.5.
-
Session ids (excerpts on request):
8ec2883d,eed4e6dc,2007f494,493ade61. -
Tracking issue: VeryGoodOpenSource/vgv-ai-flutter-plugin#180
- 主要言語
- Dart
- スター
- 2.4k
- フォーク
- 244
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 21
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
VeryGoodOpenSource/very_good_cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
VeryGoodOpenSource/very_good_cli#1783 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
VeryGoodOpenSource/very_good_cli#1781 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
VeryGoodOpenSource/very_good_cli#1780 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
VeryGoodOpenSource/very_good_cli#1779 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
VeryGoodOpenSource/very_good_cli#1762 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
VeryGoodOpenSource/very_good_cli の issue をすべて見る
似ている issue
-
bug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
AOSSIE-Org/Ell-ena#356 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
espresso3389/pdfrx#776 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
MostroP2P/app#881 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[기능 제안]オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
atsign-foundation/at_server#2896 ·
メンテナーはふだん 1 日以内に返信