Skip to content

Commit 560fdf1

Browse files
committed
fix(spec): fallbackNodeId 墓碑指向真正路由 fault 的键 (#6094)
`flow.errorHandling.fallbackNodeId` 的退役迁移文案把 fault 边写成 「an edge with condition 'fault'」。但 `condition` 是返回 boolean 的 CEL 谓词(ExpressionInputSchema),fault 路由在 `type` (z.enum(['default','fault','conditional','back']))。 照原文案写 `{ source, target, condition: 'fault' }` 能 parse 通过 —— `condition` 接受任意表达式字符串 —— 但得到的是一条普通边,不是 fault 边。 于是墓碑用一个静默失效的键换掉了另一个:作者删掉一个本就不存在的 fallback, 再画一条并非 fault 的「fault 边」。 仓库别处已写对(flows.mdx:869「type: 'fault' is what routes — a label is not」),全树其余提法均为 `type: 'fault'`,此处是唯一一处走样。末句 「draw a fault edge from the failing node to the handler node instead」 本就正确,保持不变。 仅文案,无 schema / 校验 / 运行时行为变化。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
1 parent 6131d90 commit 560fdf1

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
fix(spec): the `fallbackNodeId` tombstone names the key that actually routes faults (#6094)
6+
7+
`flow.errorHandling.fallbackNodeId` was retired in 17.0.0 (#3896), and its
8+
migration message tells the author what to draw instead. It named the wrong key:
9+
10+
- FROM: "the engine routes unrecoverable node errors via per-node fault edges
11+
(an edge with **condition `'fault'`**)"
12+
- TO: "… (an edge with **`type: 'fault'`**)"
13+
14+
`condition` on `FlowEdgeSchema` is a **CEL predicate** returning boolean
15+
(`flow.zod.ts``ExpressionInputSchema`), while the fault/default/conditional/back
16+
routing lives on `type` (`z.enum([...])`). An author following the old wording
17+
verbatim would write `{ source, target, condition: 'fault' }`, which **parses
18+
clean**`condition` accepts any expression string — and produces an ordinary
19+
edge that is not a fault path. So the tombstone handed them a second silently
20+
inert key in exchange for the one it took away: they delete a fallback that never
21+
existed, then draw a fault edge that isn't one.
22+
23+
The repo already states the correct rule elsewhere (`flows.mdx`: "`type: 'fault'`
24+
is what routes — a label is not"), and every other mention in the tree spells it
25+
`type: 'fault'`; this was the only site out of step. The closing sentence
26+
("draw a fault edge from the failing node to the handler node instead") was
27+
already correct and is unchanged.
28+
29+
Message text only — no schema, validation, or runtime behaviour changes.

packages/spec/src/automation/flow.zod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ export const FlowSchema = lazySchema(() => z.object({
712712
fallbackNodeId: retiredKey(
713713
'`flow.errorHandling.fallbackNodeId` was removed in @objectstack/spec 17.0.0 (#3896 ' +
714714
'audit close-out) — the engine routes unrecoverable node errors via per-node fault ' +
715-
"edges (an edge with condition 'fault'), and never read this key: a fallback " +
715+
"edges (an edge with type: 'fault'), and never read this key: a fallback " +
716716
'configured here silently did not exist. Delete the key and draw a fault edge from ' +
717717
'the failing node to the handler node instead.',
718718
),

0 commit comments

Comments
 (0)