Tests for the start_recording startWhen/stopWhen arm path and its consent carry-over
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Read src/tools/startRecording.ts around the listed arm and watcher paths, then inspect src/__tests__/startRecording.test.ts, src/__tests__/consentLogging.test.ts, and src/utils/triggers.ts. Extend the fake spawn tests with an elicitation capable client and mocked window and text checks, then run npm test. Done means the listed startWhen, consent carry-over, failed arm, and stopWhen cases pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
armRecording asks for consent once at arm time, adds the args object to approvedAtArm, and later calls tool.handler(startArgs, ...). prepareStart skips the consent prompt when approvedAtArm.has(args). This relies on the handler receiving the very same object. watchStopWhen stops a session when OCR text appears. No test covers startWhen, stopWhen or approvedAtArm: triggers.test.ts covers only the utils. startRecording.ts is the highest-churn file and is at 47% lines / 34% branches locally.
Where
src/tools/startRecording.ts:237, 450-461, 466-511, 538, 654src/__tests__/triggers.test.ts:41-54
Impact
If a refactor or the SDK clones args before the handler, armed recordings either re-prompt (and fail when no one is there) or, worse, a change to the WeakSet logic lets an unarmed call skip consent.
Suggested fix
Extend src/__tests__/startRecording.test.ts (fake spawn) with an elicitation-capable client (the pattern in src/__tests__/consentLogging.test.ts:76-77) and mocked window/text checks:
- startWhen
{}: isError "startWhen needs window and/or text." - startWhen
{window}: status "armed" with anarm-id, and consent asked exactly once. - When the condition is met, a session starts through the same handler and the elicitation handler is not called a second time.
- A plain start_recording after an arm still prompts (approval does not leak).
- Consent declined at arm: isError, and no arm is registered.
- fire() returning isError: arm status "failed" with that error text.
- stopWhen text met: the session stops with the stopWhen reason; a session that ends first aborts the watcher.
Getting started
- Relevant files:
src/tools/startRecording.ts,src/utils/triggers.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: M. audit-key: testing|src/tools/startRecording.ts|armRecording
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 4
- Merge trung bình
- 14 giờ 8 phút
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/screencast-mcp
-
effort: small good first issue priority: medium testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TMHSDigital/screencast-mcp#351 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort: small priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/screencast-mcp#344 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort: small good first issue priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/screencast-mcp#343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
effort: medium help wanted priority: medium testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
TMHSDigital/screencast-mcp#350 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
effort: medium help wanted priority: medium testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
TMHSDigital/screencast-mcp#348 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TMHSDigital/screencast-mcp
Issue tương tự
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openclaw/openclaw#200365 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-templates triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/aspire#22356 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Archiving an agent that is not loaded keeps its old updatedAtCó thể đã có người làm @luoph đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
content triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày