Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat(mcp): structured test results and accurate failure types after #1725

Abierto
#1,782 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
dart, flutter
Área
cli, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature
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:

  1. The exception path still labels everything transient. ToolRun.resultForException (lib/src/mcp/tool_run.dart) maps any non-UsageException to transient. In the field, that covered 17 create failures, all deterministic: 9 invalid-YAML descriptions, 6 missing workspace roots, 2 stale-snapshot Invalid SDK hash errors. None succeed on retry.
  2. business is 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, keeping transient for genuinely transient causes.
  3. Results are prose only. Agents scrape partialResults text. 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 failures
    • passed, failed, skipped counts
    • coverage.actual, coverage.required, uncoveredLines[] (the data --show-uncovered already computes)
    • durationMs
  4. alternativeApproaches should follow the failure type. For a test failure the useful advice is "read the failing tests in partialResults", not "retry".
  5. 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.
  6. Detect a crashed Flutter tool. The one genuinely transient failure in 310 calls was Oops; flutter has exited unexpectedly: "Bad state: No element" followed by PathNotFoundException … ./coverage/lcov.info (session 493ade61). A retry 19 s later passed. A missing lcov.info after a run that requested coverage is a reliable tool_crash signal.
Steps To Reproduce

On 1.5.0:

  1. Call test on a package with one failing test. Observe failureType: "transient" and network advice.
  2. Call create with a description containing ": " (see the companion YAML issue). Observe threw an exception … _WrappedYamlException with failureType: "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

Lenguaje dominante
Dart
Estrellas
2.4k
Forks
244
Merge medio
1 d 18 h
PR fusionados (30 d)
27

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de VeryGoodOpenSource/very_good_cli

Todos los issues de VeryGoodOpenSource/very_good_cli

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.