Server shutdown can exit mid-join, leaving a paused-and-resumed recording cut to its first segment
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/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ệ
- node.js, typescript
Hướng nghiên cứu
Start with src/utils/sessions.ts and trace how classifyOrphan and reapOrphans handle dead recordings with parts; read the related stop and join flow in src/utils/lifecycle.ts and src/utils/pause.ts. Add or adjust a test for a dead-pid recording with parts, then run npm test. Done means an interrupted segmented recording is joined on startup or reported with an error that lists its parts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
On client disconnect, shutdown calls stopAll with a 10 s cap and then process.exit. A stop can need longer: up to 8 s for the graceful quit, up to 10 s in whenFinalized, then the stream-copy join of every segment. When the cap wins, the process exits with the join unfinished and the registry still says "recording". On the next start, classifyOrphan turns that record into a plain "stopped" with no error. Only "paused" records get the "parts were not joined" error.
Where
src/index.ts:132, 144(shutdown cap, exit)src/utils/lifecycle.ts:251-272, 322, 349-354(stopAll,runStop)src/utils/pause.ts:288(finishSegmentsjoin)src/utils/sessions.ts:134-140(classifyOrphan)
Impact
A user who paused and resumed a long recording and then closed the client gets an outputPath holding only the first segment, with the rest left in <output>.parts/, and no error anywhere. The webcam alignment step is affected the same way.
Steps to reproduce
- Record a few minutes, pause, resume, and record several more minutes (large segments make the join slow).
- Close the client so the server shuts down.
- After a restart,
get_sessionshowsstoppedwith no error, the output is the first segment's length, and<output>.parts/part-001.mp4remains.
Suggested fix
In reapOrphans, flag a dead "recording" record that has segments.parts.length > 0 (or a webcam) the same way paused ones are flagged, or better, re-run joinSegments for it at boot. Optionally persist an interim {status: "stopping"} so the next boot knows the join did not finish.
Acceptance criteria
- A segmented recording whose join was interrupted is either joined at the next start or reported with an error that lists the parts.
- Test for
classifyOrphan/reapOrphanswith a dead-pid recording record that has parts.
Getting started
- Relevant files:
src/utils/sessions.ts,src/utils/lifecycle.ts,src/utils/pause.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: M. audit-key: reliability|src/utils/lifecycle.ts|stopAll
- 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 priority: medium testing
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 70/100
TMHSDigital/screencast-mcp#349 ·
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