Tool-layer tests fail when DirectShow device enumeration hangs
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
从 src/__tests__/integration/toolLayer.test.ts 中的用例表和跳过处理开始,尤其关注 list_audio_devices 和 list_video_devices 用例。将它们的预期与现有跳过的用例以及 winOnly 分支进行比较。将挂起的 DirectShow 枚举报告为跳过,或接受其文档说明的超时错误,然后运行工具层测试套件;当这些用例在枚举会挂起的机器上不再失败时,任务即告完成。
由索引模型根据 Issue 内容生成。
描述
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_deviceslist_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:
- In the case table, accept the enumeration-timeout error as a valid outcome for
list_audio_devicesandlist_video_devices: assertisError, a non-empty message, and nostructuredContent, as thewinOnlybranch already does. - Probe enumeration once in
beforeAllwith a short timeout and useit.skipIfon 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
mainat e65849b - Windows 11 Pro 10.0.26200
- Result: 1648 passed, 30 skipped, 2 failed. typecheck, lint, and
docs:checkall pass
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 4
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/screencast-mcp 的其他 Issue
-
dependencies effort: small good first issue priority: low
难度 1/5 1-3 小时 新手友好度 88/100
TMHSDigital/screencast-mcp#509 ·
维护者通常 1 天内回复
-
dependencies effort: small good first issue priority: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/screencast-mcp#490 ·
维护者通常 1 天内回复
-
ci effort: small priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/screencast-mcp#460 ·
维护者通常 1 天内回复
-
effort: medium help wanted priority: low testing
难度 4/5 3-5 天 新手友好度 38/100
TMHSDigital/screencast-mcp#503 ·
维护者通常 1 天内回复
-
effort: medium priority: low tech-debt
难度 4/5 3-5 天 新手友好度 56/100
TMHSDigital/screencast-mcp#502 ·
维护者通常 1 天内回复
查看 TMHSDigital/screencast-mcp 的全部 Issue
相似的 Issue
-
from-review tech-debt testing
难度 2/5 1-3 小时 新手友好度 82/100
blamechris/chroxy#9520 ·
维护者通常 1 天内回复
-
area:web complexity:S priority:P2 type:chore
难度 2/5 1-3 小时 新手友好度 84/100
nahuelcostac/agent-hub#104 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
snaglet-org/snaglet#78 ·
维护者通常 1 天内回复
-
agent/guide documentation help wanted stage/010-actionable
难度 1/5 1 小时以内 新手友好度 82/100
kubestellar/console-marketplace#1101 ·
维护者通常 1 天内回复
-
Java Edition Tests
难度 2/5 1-3 小时 新手友好度 72/100
JSPrismarine/JSPrismarine#4178 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复