feat(workflow-run): add versioned history store - #85
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
I found one issue in the workflow-run store validation.
Verification: npm run typecheck, npm run test, and npm run lint pass after npm ci (npm emitted a Node engine warning because this workspace is on Node v20.20.2 while react-router@8.3.0 declares Node >=22.22.0).
| typeof value.id === 'string' && | ||
| value.id.length > 0 && | ||
| typeof value.projectId === 'string' && | ||
| isNullableString(value.characterId) && |
There was a problem hiding this comment.
CreateWorkflowRunInput makes characterId and outfitId required for purpose: 'add_action', and the generation/export contracts rely on those IDs to target an existing character/outfit. This validator currently accepts nullable values for both fields regardless of purpose, so save() and hydration can persist an add_action run with null IDs; that run cannot safely generate first frames/animations or recover after refresh. Please make the run validation purpose-aware, with a save/hydration test covering the add_action case.
There was a problem hiding this comment.
已独立核对并修复。WorkflowRun 现在按 purpose 使用判别联合:add_action 在类型层必须携带非空 characterId 和 outfitId;Store 运行时校验也要求两者同时存在,create_character 则只允许二者同时为空或同时存在。新增测试覆盖合法保存、缺失引用时拒绝保存,以及非法持久化数据无法 hydration。
|
按拆分目录重新整理,本 PR 关闭且不合并;相同 WorkflowRun 核心将从新的独立分支重新提交审核。 |
目的
只提交 WorkflowRun Entity 核心,为 Quick Start、Workflow Editor 和 History 提供同一份可恢复状态。
包含
不包含
History 后续读取
WorkflowRun.revisions;Asset Library 后续读取确认后的 Character 资产树,二者保持独立。验证
npm test(10 tests)npm run lintnpm run typechecknpm run build本 PR 仅供审核,不执行合并。