Conversation
…n=2/链引擎切面与 4 刀排期 三切面代码实证: - 画布:域语义集中于 flowModel.ts(263 行 4 纯函数)+ FlowDesigner 约 200 行类型分支, 唯一 import 无 API 调用——泛化=节点类型注册表协议,两步落地(纯重构+回归 → 接入编排类型), 推翻 R5「一次性引入」预设 - 数据模型:spec_json 内嵌 schemaVersion=2(steps/branches/坐标),快照/缓存/回滚免费继承, v1 单步运行时适配零迁移;否决独立 conn_step 表 - 执行引擎:ConnectorRuntime.execute 为步骤原语,ChainExecutor 顺序链 + TemplateRenderer 嵌套点路径取值;分支复用 workflow ExpressionEvaluator(下沉 common);失败 fail-fast 落 既有 DLQ(重放=整链重跑,幂等责任文档标注) - 刀排:4 刀 ≈10.5 人日(链引擎/画布泛化/编排画布页/分支收尾);风险 RC1~RC3 与开放问题 Q3/Q4 入册
- ChainSpecs:spec_json schemaVersion=2 解析/校验/canonical(steps≤10、key 唯一、
每步复用 v1 单步 spec 校验、branches 端点校验——首刀建模未启用求值)
- CHAIN conn_type:v2 链须配 CHAIN、CHAIN 须 v2(互斥校验);v1 单步零迁移
- ChainExecutor:顺序执行(ConnectorRuntime.executeCore 为步骤原语,白名单/凭据/
超时全继承);入参=调用入参覆盖静态 params 再渲染上下文;steps/params 键注入执行
参数供步骤 spec 内 {{steps.x.y}} 点路径下钻;fail-fast(continueOnError 豁免);
任一步失败整体 FAILED;一次链执行一条主日志(exec_log.steps_json 摘要,V4 迁移)
- ExecutionGateway 统一分派:invoke API/设计态试运行/EVENT·CRON 触发三入口收敛
(触发自刀1 起作用于整链)
- TemplateRenderer 占位符正则扩展点路径(Map 下钻 + body JSON 解析后下钻);
设计态 checkPlaceholders 豁免 steps./params. 前缀
- 实施实纱平台缺陷:EgressGuard 哑元 fallback 正则未含点路径(v1.15.0 修复仅
覆盖扁平键)——与 TemplateRenderer 同形修复
- 测试:ChainSpecsTest 4 + TemplateRendererTest 6 + ConnectorChainIntegrationTest 3
(两步链上下文传递/fail-fast/continueOnError/EVENT 触发整链/一链一日志);全仓
mvn verify 全绿(connector 63 + mono 回归)
- flow/nodeTypes.ts(新):NodeBehavior 注册表(label/color/small/idPrefix/singleton/ 连线规则 canBeConnectTarget·hasOutgoingEdge·connectViaRuleModal/defaults/serialize/ validate/summary/onNodeRemoved/expandsRules/layoutUsesRules);工作流注册 START/APPROVAL/CONDITION/END(WORKFLOW_NODE_TYPES) - flow/propertyPanels.tsx(新):属性面板插槽注册表——APPROVAL/CONDITION 面板从 FlowDesigner 原样迁出(审批人/驳回回退/分支规则表单逐一保留) - flowModel.ts:nodeSize/assigneeSummary/visualEdges/autoLayout/newNodeId/ toDefinitionJson/validateFlow 的类型分支全部改查注册表(NODE_TYPE_META 导出形状 保留派生自注册表;START/END 唯一性校验保留为工作流域语义) - FlowDesigner.tsx:工具栏(nodeTypes props 可传自有类型集,默认不变)/连线规则/ 删除清理/节点渲染/Drawer 面板全部改注册表分派 - 回归验证:tsc + vite build 绿;浏览器实测工具栏/加节点/面板插槽/自动布局/校验条; vite 模块级断言 toDefinitionJson(死边剥离/assignee/规则规范化/坐标)· parseDefinition 回环·validateFlow·autoLayout 分层·newNodeId 全部行为等价
- 编排画布 Modal:CHAIN 连接器「编排」入口 → FlowDesigner(ORCHESTRATION_NODE_TYPES) 画布编辑(START→步骤链→END,连线即顺序)+ 整链试运行子 Modal(参数覆盖 + 结果展示) - STEP 属性面板(propertyPanels 注册):步骤类型切换 + ConnectorConfigPanel 复用 (连接参数/凭据引用/超时重试)+「应用到步骤」回收 + 入参默认值 JSON + 失败策略开关 - 链转换 orchestration.ts:spec v2 ↔ FlowDef 双向(steps→STEP 节点 id=key,flowToChain 沿唯一路径导出 steps 序,分支多出边首刀明确报错) - 新建对话框支持「编排链(多步骤)」类型:创建最小合法骨架后直接进入画布 - 执行日志 Modal:行展开显示 steps_json 步骤摘要(key/type/status/duration) - 巡检实纱修复两处画布健壮性缺陷(均致 React 树崩): ①setPointerCapture 对合成/失效 pointer 抛异常未捕获;②面板插槽直接函数调用 违反 hooks 规则(STEP 面板含 hooks)——改 JSX 元素渲染 - 浏览器级巡检通过(约定 #9):创建骨架→画布编辑→面板应用→保存→发布 v1→ 整链试运行 SUCCESS→日志步骤摘要展开
- ExpressionEvaluator 下沉 common(com.openforge.common.spel):StandardEvaluationContext 显式沙箱——只读 MapAccessor 支持 #steps.fetch.body.amount 的 Map 键点语法下钻, 禁类型引用(T())/构造器(new)/方法调用(空 resolvers);workflow 引擎改引 common 版(零行为变化,本地 workflow 测试回归通过) - ChainExecutor 分支求值:沿主线遍历,from 完成后按规则序 SpEL 求值选路(上下文 #steps.x.y),expr 空 = 默认分支(每 from 至多一个);选路语义 = 命中候选 to、 未命中兄弟支路标记跳过(不执行,主线顺延);防环 = 访问计数超 steps×2 终止 FAILED - 画布首版不做分支可视化编辑:既有 branches 保存时原样保留(orchestration.ts flowToChain 透传),求值在后端;可视化编排列后续增强 - 测试:ConnectorChainBranchIntegrationTest 3(真/假支路选路 steps_json 断言/环路 防护不挂死/沙箱越权拒绝);ChainSpecsTest 默认分支重复拒绝;全仓 mvn verify 全绿 (connector 68 含分支 3 + workflow 回归 + mono MonoSmoke)
Shzyhao
added a commit
that referenced
this pull request
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
发版内容(集成编排器 P3 旗舰,设计文档 §14 四刀全部落地)
刀1 后端链引擎(1497394 后续,run 34355905136)
CHAIN类型):steps≤10、每步复用 v1 单步 spec 校验;v1 单步零迁移共存{{steps.x.body.字段}}点路径下钻,body JSON 解析)、fail-fast + continueOnError、一链一日志(exec_log.steps_json 步骤摘要,V4 迁移)刀2 画布泛化(run 34358283529)
刀3 编排画布页(run 34361349383)
刀4 分支求值(run 34367069059)
ExpressionEvaluator下沉 common(StandardEvaluationContext 显式沙箱:只读 MapAccessor 支持#steps.x.yMap 点语法下钻;禁 T()/new/方法调用);workflow 改引 common 零行为变化巡检与测试
🤖 Generated with ZCode