fix(respect): workflow references format - #2969
Conversation
🦋 Changeset detectedLatest commit: 7983562 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 |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Performance Benchmark (Lower is Faster)
|
|
📦 A new experimental 🧪 version v0.0.0-snapshot.1785167039 of Redocly CLI has been published for testing. Install with NPM: npm install @redocly/cli@0.0.0-snapshot.1785167039 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 4284624. Configure here.
| step.checks.push(failedCall); | ||
| // register the step so the failed check is displayed and counted in the totals | ||
| ctx.executedSteps.push(step); | ||
| printUnknownStep(step, ctx.options.logger); |
There was a problem hiding this comment.
Unresolved call does not end workflow
Medium Severity
When a step workflowId cannot be resolved, the failed check is recorded but the function returns without shouldEnd, so later steps in the same workflow keep running. The parallel goto-action path for the same kind of broken reference returns shouldEnd: true, and a found-but-failed child workflow with no failure actions also ends the workflow.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4284624. Configure here.
| } | ||
|
|
||
| // Extra segments after the workflowId are tolerated for backward compatibility. | ||
| if (parts.length >= 4 && parts[2] === 'workflows' && parts[1] && parts[3]) { |
There was a problem hiding this comment.
Correct me if I'm wrong but parts.length >= 4 && parts[2] === 'workflows' means $sourceDescriptions.a.workflows.b.c.d would resolve to workflow b and will drop the tail right ? The trailing "c" and "d" are ignored.
| endTime: performance.now(), | ||
| totalTimeMs: performance.now() - startTime, | ||
| executedSteps: [failedStep], |
There was a problem hiding this comment.
Also, arent we calling the clock twice as we are doing endTime: performance.now() and totalTimeMs: performance.now() - startTime , so totalTimeMs !== endTime - startTime. So shouldnt we Take endTime once and then use it ?


What/Why/How?
Added support for the Arazzo spec-compliant workflow reference form
$sourceDescriptions.<name>.<workflowId>independsOn, stepworkflowId, and success/failure actionworkflowId. Unresolvable workflow references now fail the affected workflow with a clear error message instead of aborting the whole run or being silently ignored.Reference
Closes: #2826
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
Touches core Respect workflow resolution and run orchestration (
dependsOn, call steps, goto actions), so regressions could affect multi-workflow Arazzo runs; legacy reference form is preserved and coverage is extensive.Overview
Respect now accepts the Arazzo spec workflow reference shape
$sourceDescriptions.<name>.<workflowId>(without a.workflows.segment) fordependsOn, stepworkflowId, and success/failure actionworkflowId, while keeping the legacy$sourceDescriptions.<name>.workflows.<workflowId>form.Workflow lookup is centralized in
resolveWorkflowReference, and runtime expression resolution for$sourceDescriptions.*paths throws clearer errors (with available names/workflows) instead of returningundefinedsilently. For the spec form, non-workflow segments can still resolve to source-description fields (e.g.url,type) when appropriate.Unresolvable workflow references no longer abort the entire Respect run: a bad
dependsOnentry fails only that workflow via a syntheticdependsOnstep, and bad step/actionworkflowIdvalues add failed checks and register the step in results. JSON log export tolerates those synthetic steps when no declared workflow step exists.Reviewed by Cursor Bugbot for commit 7983562. Bugbot is set up for automated code reviews on this repo. Configure here.