fix: pass workflow inputs to success and failure actions#2796
fix: pass workflow inputs to success and failure actions#2796harshit078 wants to merge 5 commits into
Conversation
🦋 Changeset detectedLatest commit: 6b7e963 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6b7e963. Configure here.
| location: ctx.location.child(['parameters']).key(), | ||
| }); | ||
| } | ||
| checkParameters(action.parameters, hasWorkflowId, ['parameters'], ctx); |
There was a problem hiding this comment.
Contradictory double error for action parameters without workflowId
Medium Severity
When a success/failure action lacks a workflowId and its parameters omit the in field, the rule produces two contradictory errors: first ACTION_PARAMETERS_REQUIRE_WORKFLOW_ID (parameters shouldn't exist at all), then IN_REQUIRED_MESSAGE from checkParameters (asking the user to add in). The checkParameters call on line 63/77 runs unconditionally after the !hasWorkflowId report, but it needs to be skipped when parameters are already flagged as invalid for lacking a workflowId.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6b7e963. Configure here.
| import type { Arazzo1Rule } from '../../visitors.js'; | ||
| import type { UserContext } from '../../walk.js'; | ||
|
|
||
| const IN_REQUIRED_MESSAGE = |
There was a problem hiding this comment.
You can use report messages directly
|
Thanks @harshit078 for contribution! Please, fix the issue reported by bugbot. I left comment as well. Additionally, please add docs for a new rule. |


What/Why/How?
spec-parameters-in-by-contextArazzo ruleparametersproperty in interface of workflow for success and failure action objects.Reference
#2735
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
Adds a new built-in Arazzo lint rule and extends the Arazzo schema/types, which can introduce new lint findings for existing specs and affect downstream consumers relying on the previous action object shape.
Overview
Introduces the new Arazzo rule
spec-parameters-in-by-contextto enforce context-sensitive parameter validation: requireparameter.inwhen a step/action does not reference aworkflowId, and forbidparameter.inwhen it does (treating parameters as workflow input mappings). It also errors if success/failure actions defineparameterswithout aworkflowId.Extends
onSuccess/onFailureaction objects to accept aparametersarray in the core type system and JSON schema, wires the rule into the built-in Arazzo ruleset, updates default config presets to include it, and adds targeted rule tests plus config snapshot updates.Reviewed by Cursor Bugbot for commit 6b7e963. Bugbot is set up for automated code reviews on this repo. Configure here.