Tool-layer tests fail when DirectShow device enumeration hangs

Abierto Apto para principiantes
#508 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
backend, testing

Línea de trabajo

Empieza por la tabla de casos y el manejo de las pruebas omitidas en src/__tests__/integration/toolLayer.test.ts, especialmente los casos list_audio_devices y list_video_devices. Compara sus expectativas con los casos omitidos existentes y la rama winOnly. Marca como omitida una enumeración de DirectShow que se quede bloqueada o acepta su error de timeout documentado; después, ejecuta la suite de la capa de herramientas. El trabajo estará terminado cuando estos casos ya no fallen en máquinas donde la enumeración se bloquea.

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

Descripción

Problem

On a Windows machine where DirectShow device enumeration hangs, npm test fails two cases in src/__tests__/integration/toolLayer.test.ts (the #261 tool-layer suite):

  • list_audio_devices
  • list_video_devices

Both return isError: true with Could not enumerate audio devices (ffmpeg timed out after 12s.). The tools behave correctly: they time out and explain why (the fix from #40). The test is what fails, because it expects success from any case not marked expect: "error" or Windows-only.

Running ffmpeg -hide_banner -list_devices true -f dshow -i dummy directly on the same machine was still running after 90 s, so the hang is in the driver or ffmpeg, not in the server.

Expected

The suite already reports a case as skipped when the machine lacks its engine (Windows OCR, speech, a whisper model) rather than failing it. A device enumeration that times out is the same kind of environment gap, so these two cases should end as skipped (or pass by accepting the documented timeout error) instead of failing.

Suggested fix

One of:

  1. In the case table, accept the enumeration-timeout error as a valid outcome for list_audio_devices and list_video_devices: assert isError, a non-empty message, and no structuredContent, as the winOnly branch already does.
  2. Probe enumeration once in beforeAll with a short timeout and use it.skipIf on both cases when it hangs, so the result shows as skipped rather than passed.

Option 2 matches the suite's "reported as skipped, not passed" rule more closely.

Observed

  • Version 0.59.0, clean main at e65849b
  • Windows 11 Pro 10.0.26200
  • Result: 1648 passed, 30 skipped, 2 failed. typecheck, lint, and docs:check all pass
Lenguaje dominante
TypeScript
Estrellas
1
Forks
4
Merge medio
3 d 4 h
PR fusionados (30 d)
4

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 TMHSDigital/screencast-mcp

Todos los issues de TMHSDigital/screencast-mcp

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.