Skip to content

Commit 7ed6012

Browse files
os-samclaude
andcommitted
chore(changeset): flow trigger key guidance
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RbbUMnxkUnWhE4j94v8FE
1 parent e394749 commit 7ed6012

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
fix(spec): a top-level flow `trigger` / `triggerType` is now sent to the START node's `config`, not to a `type` rename
6+
7+
`FlowSchema`'s alias table pointed both keys at `type`, so a flow carrying a
8+
top-level trigger block was refused with the rename `trigger``type`.
9+
That rename cannot be taken: `type` is the flow KIND
10+
(`autolaunched` | `record_change` | `schedule` | `screen` | `api`), so an author
11+
who followed the advice landed on
12+
`Invalid option: expected one of "autolaunched"|…` one round later, with the
13+
trigger binding still nowhere — and a `.strict()` refusal carries exactly one
14+
actionable sentence.
15+
16+
The trigger does not move to `type`. It binds on the START node's `config`, as
17+
`{ objectName, triggerType, condition }` with a `record-*` token such as
18+
`record-after-create` — the shape the automation engine and the authoring-time
19+
`resolveFlowTriggerKind` both read. Both keys are `guidance` entries now, beside
20+
the `object` / `objectName` / `schedule` prescriptions that already name that
21+
config, so the rejection says where the binding really lives instead of
22+
prescribing a name:
23+
24+
```
25+
Unrecognized key(s) on this flow: `trigger`.
26+
• `trigger` is not a Flow field — a record-change flow binds its trigger on
27+
the START node's `config` (`{ objectName, triggerType, condition }`, where
28+
`triggerType` is a `record-*` token such as `record-after-create`), not at
29+
the flow top level; the flow-level `type` names the flow kind
30+
(`record_change`), not the binding.
31+
```
32+
33+
No accept/reject behaviour changes: a top-level `trigger` / `triggerType` was
34+
refused before and is refused now, and `FlowSchema`'s accepted keys and its
35+
`type` enum are untouched — only the prescription the refusal carries. One
36+
measured consequence of dropping the alias row: the guidance channel matches the
37+
exact authored spelling (case folding is the rename channel's job), so a
38+
non-canonical spelling such as `triggertype` now gets the bare rejection rather
39+
than the rename it cannot take.

0 commit comments

Comments
 (0)