fix: review findings — chain NaN/Inf + id hygiene, percent-escape jobPath, shared singleVideoResult
- SubmitChain rejects NaN/±Inf segment seconds with ErrUnsupported (previously an obscure json.Marshal error; NaN fails every comparison and +Inf passed the >= 0 check). - ChainStatus skips segment entries with no usable id — JSON null (which no-op-unmarshals into a string, previously appending ""), empty strings, and id-less objects; the unfiltered list survives in Raw. ChainJob.SegmentIDs doc now also says ChainSegmentResult takes the segment index, not an id string. - jobPath rejects '%' in job ids — %2F/%2E%2E percent-escapes decode back into path structure server-side, bypassing the literal check on this upstream-echoed value. - singleVideoResult moves to video.go next to videoMIME, and the two remaining hand-rolled copies of the video-result validation (videoModel.Generate, Interpolate) now use it — one validation, one message shape. - videogen.LipSyncer renamed to videogen.Lipsyncer for consistency with the rest of the surface's Lipsync* naming (LipsyncProvider, LipsyncModel, LipsyncRequest); not yet consumed downstream, so the rename is free now and never again. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WWCQcYStWXBYUy5sZWnbLT
This commit is contained in:
+7
-3
@@ -42,9 +42,13 @@ type ChainJob struct {
|
||||
Segment int
|
||||
Total int
|
||||
|
||||
// SegmentIDs are the COMPLETED per-segment artifacts, fetchable via
|
||||
// ChainSegmentResult — a mid-chain failure still leaves these
|
||||
// retrievable, so multi-minute GPU output is never discarded.
|
||||
// SegmentIDs name the COMPLETED per-segment artifacts, in order. A
|
||||
// mid-chain failure still leaves those segments retrievable via
|
||||
// ChainSegmentResult — note it takes the segment's index in the chain,
|
||||
// not an id string; this list tells you WHICH segments completed. So
|
||||
// multi-minute GPU output is never discarded. Entries the backend
|
||||
// reports without a usable id are skipped (the unfiltered list survives
|
||||
// in Raw).
|
||||
SegmentIDs []string
|
||||
|
||||
// Raw is the provider-native job payload. May be nil.
|
||||
|
||||
Reference in New Issue
Block a user