Tests for the start_recording startWhen/stopWhen arm path and its consent carry-over
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 1-2 天
- 新手友好度
- 70/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- TypeScript
- 星號
- 1
- 分支
- 4
- 平均合併
- 14 小時 8 分鐘
- 30 天內合併 PR
- 48
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 help wanted priority: medium testing
難度 3/5 1-2 天 新手友好度 76/100
TMHSDigital/screencast-mcp#350 ·
維護者通常 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 個 reaction ·
維護者通常 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 天內回覆