fix(flow-designer): the default path is the edge marker, not the branch (framework#4414) - #3148
Merged
Merged
Conversation
…ch (framework#4414) Two help strings on the Decision inspector that described mechanisms the engine does not have. The Branches editor said a branch whose expression is "true" IS the default/else path. It is how you ASK for one: FlowEdgeInspector.applyBranch() turns such a branch into `isDefault: true` on the out-edge it wires, and the marker on that edge is what routes. Conflating the two is the reading that let framework#4414 ship a decision whose guard did not guard — worth being exact about now that `isDefault` is actually enforced (the key had zero readers until then, so this designer was writing a marker nothing honoured). Also states that branches are tried in order and that the expression is bare CEL, since a braced predicate is now a build failure (framework#4439). The legacy single `Condition` field said "Prefer Branches above", which reads as "this works, but the other is better". It does not work at all: the decision executor never reads `config.condition`. The engine only honours that key on a Start node, as the trigger gate; framework#4414 added `flow-inert-node-condition` to `os validate` for exactly this. The field stays render-only (`__legacy__` never matches) so a stored value is not invisible, but the help now says it is inert and where to move the predicate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q8as8yR67v41xEdomiTba9
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Decision 检查器上两处 help 文案描述了引擎并不具备的机制。纯文案,本侧无行为变更。
配套框架侧:objectstack-ai/objectstack#4414 / #4440(
isDefault落地)、#4439 / #4474(表达式账本)。① Branches 编辑器:把「分支」和「边上的标记」混为一谈
原文写「
expression为"true"的分支就是 default/else 路径」。实际它是申请一条:FlowEdgeInspector.applyBranch()会把这种分支接成出边上的isDefault: true,真正路由的是那条边上的标记。这个混淆正是 framework#4414 里「守卫不守」得以出厂的读法,而且现在特别值得说准 ——
isDefault在引擎里此前是零读者。也就是说这个 designer 一直在写一个没人认领的标记,每一条 Studio 画出来的「default/else」边实际上都是无条件执行的,和真正命中的分支并行跑。框架侧 enforcement 落地后它们才开始只走一条。顺带补上两点原本没说的:分支是按顺序试、第一个命中的赢;
expression是裸 CEL —— 带花括号的谓词自 framework#4439 起是构建失败,不再是「另一种方言」。② Legacy 单数
Condition:不是「次一等」,是根本不生效原文写「Prefer Branches above」,读起来像「这个能用,只是那个更好」。它完全不工作:decision 执行器从不读
config.condition。引擎只在 Start 节点上认这个键(作为触发门),framework#4414 为此新增了flow-inert-node-condition,os validate现在会报。字段本身保持 render-only(
__legacy__控制器永不匹配,所以不对新建开放)—— 存量节点的值不该在界面上凭空消失 —— 但 help 现在如实说它是惰性的,以及谓词该搬去哪里。验证
pnpm exec vitest run --project unit flow-node-config→ 40 passed / 5 skipped;flow-node-config.spec-reconciliation.test.ts一并通过(它对账的是 key 集合,文案不影响);ESLint 干净。🤖 Generated with Claude Code
https://claude.ai/code/session_01Q8as8yR67v41xEdomiTba9