Tests for wait_for_change handler validation, the wgc path and text mode
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- testing
調査の方向性
Read src/tools/waitForChange.ts and the existing mocking pattern in startRecording.test.ts:45-54; run npm test to see the current test setup. Add handler tests for the validation, WGC, text mode, cleanup, keep, and cancellation cases listed in the issue, using mocked capture helpers. Done when those cases pass without relying on a live screen.
索引モデルが issue の本文から書いたものです。
説明
Summary
The loops behind wait_for_change are unit-tested, but the handler that wires them runs only in the capture smoke and the opt-in local test. toolLayer.test.ts skips it because it polls a live screen. Local coverage: 32.4% lines / 26.5% branches.
Where
src/tools/waitForChange.ts:108-110(mode/text mismatch),:118(wgc needs one window),:138-147(wgc size probe and temp-dir cleanup),:184-203(text mode,gone),:219-223(finallycleanup),:239-252(keep/returnImage/cancelled)src/__tests__/integration/toolLayer.test.ts:45
Impact
wait_for_change is the recommended replacement for sleeps in agent flows. A wrong elapsedSec, a leaked screencast-wait-* temp dir, or a broken text mode would not be caught on any CI leg except by the flaky Windows smoke.
Suggested fix
Handler tests with runFfmpegFrames, captureStill, readFrames and resolveCaptureTarget mocked (vi.mock, as in startRecording.test.ts:45-54):
- mode "text" without text, and text without mode: isError with the "Use text with mode" message.
- backend "wgc" with target "full": isError "watches one window".
- wgc first still probes to 0x0: isError, and no
screencast-wait-*dir left in tmpdir. - mode text, OCR finds the text: outcome "met" with matches; with
gone: true:gone: true. - grab throws mid-loop: isError, stream aborted, work dir removed.
- keep:true:
screenshotPathexists; keep:false: the temp shot is removed; cancelled: no image.
Getting started
- Relevant files:
src/tools/waitForChange.ts,src/utils/waitLoop.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: M. audit-key: testing|src/tools/waitForChange.ts|register
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 4
- 平均マージ
- 14時間 8分
- マージ済み PR(30日)
- 48
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/screencast-mcp のほかの issue
-
effort: small good first issue priority: medium testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TMHSDigital/screencast-mcp#351 ·
メンテナーはふだん 1 日以内に返信
-
bug effort: small priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/screencast-mcp#344 ·
メンテナーはふだん 1 日以内に返信
-
bug effort: small good first issue priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/screencast-mcp#343 ·
メンテナーはふだん 1 日以内に返信
-
effort: medium priority: medium testing
難易度 4/5 1〜2日 初心者へのやさしさ 70/100
TMHSDigital/screencast-mcp#349 ·
メンテナーはふだん 1 日以内に返信
-
effort: medium help wanted priority: medium testing
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
TMHSDigital/screencast-mcp#348 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/screencast-mcp の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#200365 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Archiving an agent that is not loaded keeps its old updatedAt対応中かも @luoph が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
content triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信