refactor(workflow-controller): align six-node asset generation graph - #107
refactor(workflow-controller): align six-node asset generation graph#107xyh202131 wants to merge 8 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| } | ||
|
|
||
| const taskIds = requireStep(run, 'first-frame').candidateTaskIds | ||
| const terminals = await Promise.all( |
There was a problem hiding this comment.
High: waitForTerminal subscribes only after it has already observed a non-terminal snapshot. If the generation completes in the gap between get() and subscribe(), that terminal event is missed and the promise can hang forever, which leaves start*/resume* calls stuck.
| nextType: WorkflowStepType, | ||
| updatedAt: string, | ||
| ): WorkflowRun { | ||
| return editCurrentRevision(run, updatedAt, (revision) => { |
There was a problem hiding this comment.
High: this helper advances the current revision without checking whether the run was interrupted meanwhile. interruptRun() only flips the run status, so an in-flight generation that finishes later can still move an interrupted workflow forward behind the user's back.
| if (current.status !== expectedRevisionStatus) return false | ||
| if (revisions.slice(0, -1).some((revision) => revision.status === 'active')) return false | ||
|
|
||
| // 运行中/已中断保留唯一当前步骤;终态不得继续挂着 active 步骤。 |
There was a problem hiding this comment.
Medium: the terminal-state check only looks for active steps. A completed run can still contain failed steps and pass validation, so corrupted or partially failed history can be hydrated/saved as if it were valid.
98daef0 to
2f73825
Compare
|
@fennoai 复审 |
Re-review ResultFound 1 issue on the updated PR.
Verification:
|
| * 调用、后者等待用户逐步点击。Controller 不识别入口,也不保存第二份流程模型。 | ||
| */ | ||
| export interface WorkflowController { | ||
| create(input: CreateWorkflowRunInput): Promise<WorkflowRun> |
There was a problem hiding this comment.
有基于这套接口试着写一下 UI(如 Quick Start)那边的代码吗,会长成什么样?
问这个主要是发现这个 controller 不仅提供了 getWorkflow 用于读取 WorkflowRun 数据,还会让每一个修改方法也都返回 WorkflowRun 数据;我不确定哪个是使用方主要的获取 workflow-run 数据的渠道
There was a problem hiding this comment.
另外上面 AI review comment 记得处理 & resolve 下
82ad6e4 to
f603a04
Compare
f603a04 to
3666fdb
Compare
本次更新
dependsOnNodeIds明确保存,不再使用 Step、假 root 或数组位置推断边。video-cropping或3d-to-2d,再进入完整动画生成。deletedAt,角色母版及其他 Action 不受影响。与 WorkflowRun 的关系
deletedAt时按未删除处理;空删除标记会被响应校验拒绝。验证