Tests for wait_for_change handler validation, the wgc path and text mode
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 76/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- testing
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 4
- Merge médio
- 14h 8min
- PRs com merge (30d)
- 48
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TMHSDigital/screencast-mcp
-
effort: small good first issue priority: medium testing
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TMHSDigital/screencast-mcp#351 ·
Mantenedores costumam responder em até 1 dia
-
bug effort: small priority: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TMHSDigital/screencast-mcp#344 ·
Mantenedores costumam responder em até 1 dia
-
bug effort: small good first issue priority: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TMHSDigital/screencast-mcp#343 ·
Mantenedores costumam responder em até 1 dia
-
effort: medium priority: medium testing
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 70/100
TMHSDigital/screencast-mcp#349 ·
Mantenedores costumam responder em até 1 dia
-
effort: medium help wanted priority: medium testing
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
TMHSDigital/screencast-mcp#348 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TMHSDigital/screencast-mcp
Issues semelhantes
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
openclaw/openclaw#200365 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
area-templates triage:bot-seen triage:needs-human
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
microsoft/aspire#22356 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Archiving an agent that is not loaded keeps its old updatedAtTalvez já em andamento @luoph assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
content triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia