chainedVideo.js misreports mid-stitch cancellation as a stitch failure and skips chunk hiding on thrown cancel paths
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
- 領域
- backend
調査の方向性
server/services/videoGen/chainedVideo.js の466〜499行目付近から始めてください。482行目付近のstitchエラーの捕捉、483行目付近の'Stitch failed'メッセージ、そして495行目付近にある、setHistoryItemsHiddenを迂回する.catch()ハンドラーを確認します。まず既存のfinishFailとchainState.stoppedのロジックを読んでください。完了の条件は、stitch途中のキャンセルが'Canceled mid-chain'として確定すること、例外を投げるキャンセル経路がfinishFailの前にチャンクを非表示にすること、そしてserver/services/videoGen/chainedVideo.test.jsの新しいケースが両方を網羅することです。
索引モデルが issue の本文から書いたものです。
説明
Problem
In server/services/videoGen/chainedVideo.js:466-487, aborting stitchVideos via chainState.abortController causes line 482 to capture { error: 'Stitch canceled' }, and line 483-487 reports 'Stitch failed: Stitch canceled' without checking chainState.stopped. Separately, inter-chunk cancellation checks at lines 379, 440, 460, and 465 throw into the .catch() at lines 495-499, bypassing await setHistoryItemsHidden(chunkIds, true) that runs on all other terminal paths.
Impact
Canceling a chained render during its final stitch surfaces a misleading 'Stitch failed: Stitch canceled' error instead of a clean cancellation, and thrown mid-chain cancel exits skip the history-hiding pass performed by every other exit branch.
Decided Fix
In server/services/videoGen/chainedVideo.js:483, check if (chainState.stopped) before formatting 'Stitch failed: ...' so mid-stitch cancellation calls finishFail('Canceled mid-chain'), and run await setHistoryItemsHidden(chunkIds, true) in the .catch() handler at line 495 before finishFail so thrown cancel/error paths match the explicit terminal branches.
Affected Files
server/services/videoGen/chainedVideo.js
Acceptance Criteria
- Canceling a chained video while stitchVideos is running settles the chain with 'Canceled mid-chain' rather than 'Stitch failed: Stitch canceled'.
- Canceling a chained video between chunks (during probeFrameCount, trimVideoFromFrame, extractLastFrame, or before stitchVideos) runs setHistoryItemsHidden(chunkIds, true) before finishFail, matching every other terminal branch.
- Unit tests in server/services/videoGen/chainedVideo.test.js verify mid-stitch and inter-chunk cancellation outcomes.
Origin: PortOS reliability-error-handling baseline audit (2026-11-24) · Severity: 5/10
- 主要言語
- JavaScript
- スター
- 38
- フォーク
- 32
- 平均マージ
- 20分
- マージ済み PR(30日)
- 996
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
atomantic/PortOS のほかの issue
-
area:create bug effort:low feature-completeness in-progress model:light plan planner:gemini-4-neon-high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Pin Hugging Face commit revisions for AuK weight downloads and eliminate post-download SHA TOCTOUオープンarea:voice better-dependency-freedom dependencies effort:low in-progress model:medium plan planner:gemini-4-neon-high priority:2 security
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
api-contract area:cos-agents effort:low in-progress model:light plan planner:gemini-4-neon-high
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Include standard error/code/timestamp fields on 409 responses from /api/docker-containment routesオープンapi-contract area:devtools effort:low in-progress model:light plan planner:gemini-4-neon-high
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:calendar area:ui design-usability effort:low in-progress model:light plan planner:gemini-4-neon-high priority:2 ux
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
atomantic/PortOS の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
saayam-for-all/webapp#2036 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
keyxmakerx/Chronicle#2791 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
content
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
StudentSuite/awesome-study-resources#545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信