You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(lint,showcase): flag never-firing record trigger tokens; add record-after-write showcase flow (#3427)
Follow-ups to the record-after-write feature (#3446).
Lint (item 3): new `flow-trigger-unknown-event` rule in validateFlowTriggerReadiness
flags a start node whose `triggerType` is record-lifecycle-shaped
(`record-before|after-<op>`) but names an op the record-change trigger cannot map
— a typo like `record-after-updated`. The engine still routes any `record-` token
to the record trigger, which then binds to NO hook and never fires (only a runtime
warn), so this surfaces the never-fire defect at authoring/`os validate` time.
Warning severity, consistent with the file's existing rules. Bare `record-<noun>`
shapes (e.g. `record-change`) are out of scope for this rule.
Showcase (item 2): add `UrgentTaskAlertFlow`, a single `record-after-write` flow
that fires when a task is created Urgent OR escalated to Urgent — using the
`previous == null` create/update discrimination the write trigger enables. Plus a
durable integration test booting a real kernel that verifies the create leg
(`previous == null` → fires on afterInsert), the non-urgent create (no fire), and
the escalation leg (fires on afterUpdate).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018939yJ413zG3irLzcTtqaa
* fix(service-automation): bind `previous` as null on the create leg; fix showcase notify recipient (#3427)
Dogfooding the record-after-write showcase flow in a live app surfaced two bugs:
1. The engine bound `previous` into the flow condition scope only when truthy, so
on a record insert `previous` was an unknown CEL variable — the documented
`previous == null` create-discrimination threw "Unknown variable: previous" and
failed the whole start condition, dropping the run. `previous` is now always
bound (null when there is no prior row), making the create/update discrimination
the record-after-write docs + Studio designer advertise actually work. Verified
end-to-end (integration test + a live showcase boot: the flow fires on
create-urgent and on escalation, and correctly skips a non-urgent create).
2. The showcase `UrgentTaskAlertFlow` notify node had no recipient, so every run
failed "at least one recipient is required". Now notifies the assignee, falling
back to the triggering user (`{$User.Id}`) so an unassigned urgent task still
pings someone. Live-verified: a `task.urgent` notification is delivered.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018939yJ413zG3irLzcTtqaa
* chore: add changeset for the flow-trigger-unknown-event lint rule
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018939yJ413zG3irLzcTtqaa
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments