docs(automation-skill): align objectstack-automation with the engine contract#1565
Merged
Conversation
…contract The objectstack-automation skill taught a flow/trigger contract that does not match the runtime, so flows authored from it never fire (root cause behind a class of "record_change flow doesn't run" reports). Corrected against the actual executors and binding code: - update_record / create_record: data goes in `fields` (not `values`); rows are selected with `filter` (not `recordId`). Source: builtin/crud-nodes.ts reads `cfg.fields` and `cfg.filter ?? cfg.filters` — `values`/`recordId` are ignored. - Record-change triggers bind via the flow's `start` node `config.triggerType` ∈ record-(before|after)-(create|update|delete) — there is NO standalone trigger object / top-level `trigger`/`event` key. Source: engine.ts resolveTriggerBinding (reads start-node config only) + plugin-trigger-record-change triggerTypeToHookEvent. - Added the `triggers` capability prerequisite (`requires: ['automation','triggers']`) — without it the trigger plugin never loads and flows register but never fire. - Nodes connect via `edges`, not a `next:` property (engine traverses flow.edges). - Flow `type` enum fixed: `record_change` (not `record_triggered`), `api` (dropped the non-existent `platform_event`). Source: spec FlowSchema enum ['autolaunched','record_change','schedule','screen','api']. Verified end-to-end against a running 7.7 stack: a flow using the corrected shape fires and applies its update_record; the old shapes silently no-op. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
The
objectstack-automationskill documents a flow/trigger contract that does not match the runtime, sorecord_changeflows authored by following it never fire (or silently no-op). This is the root cause behind a class of "my trigger flow doesn't run" issues — including the ObjectStack templates' inert automation.Verified by probing a running 7.7 stack: a flow using the corrected shape fires and applies its
update_record; the shapes the skill currently teaches silently do nothing.Corrections (each checked against source)
update_record/create_record→valuesfieldsservice-automation/src/builtin/crud-nodes.tsreadscfg.fieldsupdate_record→recordIdfilter(filter ?? filters)trigger: { object, event: 'after_update' }+type: 'record_triggered'startnodeconfig.triggerType: 'record-after-update'engine.tsresolveTriggerBinding(reads start-node config only);plugin-trigger-record-changetriggerTypeToHookEventtriggerscapability required inrequiresor the trigger plugin never loadsruntime/src/cloud/capability-loader.ts(triggers→RecordChangeTriggerPlugin)next:node propertyedgesengine.tstraversesflow.edgestyperecord_triggered/platform_eventrecord_change/apiFlowSchemaenum['autolaunched','record_change','schedule','screen','api']Scope
Documentation only —
skills/objectstack-automation/SKILL.md. No code changes. Three worked examples (scheduled, record-change/approval, trigger config) + the Flow Types & Trigger Events tables + Best Practices were brought in line with the executors.🤖 Generated with Claude Code