Skip to content

fix(workflow): use $sourceDescriptions for workflow references#2867

Open
harshit078 wants to merge 12 commits into
Redocly:mainfrom
harshit078:fix-respect-workflow-reference
Open

fix(workflow): use $sourceDescriptions for workflow references#2867
harshit078 wants to merge 12 commits into
Redocly:mainfrom
harshit078:fix-respect-workflow-reference

Conversation

@harshit078

@harshit078 harshit078 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What/Why/How?

  • Added support for the Arazzo workflow reference form $sourceDescriptions.<name>.<workflowId>.
  • The previous $sourceDescriptions.<name>.workflows.<workflowId> form is still maintained.

Reference

#2826

Testing

Screenshots (optional)

Check yourself

  • This PR follows the contributing guide
  • All new/updated code is covered by tests
  • Core code changed? - Tested with other Redocly products (internal contributions only)
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update has been considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

Note

Medium Risk
Workflow resolution behavior changed in a core context-parser path used when steps invoke external Arazzo workflows; legacy references are preserved but the new spec-form field fallback could surprise callers if a segment collides with a non-workflow property name.

Overview
Respect now resolves external workflow references using the Arazzo-compliant path $sourceDescriptions.<name>.<workflowId>, without the intermediate .workflows. segment.

get-value-from-context was broadened to handle both the new spec form (3 path segments) and the legacy form $sourceDescriptions.<name>.workflows.<workflowId>. For the spec form, it looks up a matching workflow by workflowId first; if none matches, it falls back to a property on the source description (e.g. $sourceDescriptions.test.url). The legacy form still only resolves workflows and does not use that field fallback.

Tests and integration examples were updated to the spec-style references, with explicit coverage that the legacy syntax still works.

Reviewed by Cursor Bugbot for commit 2658393. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2658393

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/respect-core Patch
@redocly/cli Patch
@redocly/openapi-core Patch

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

@harshit078 harshit078 changed the title respect workflow references must use $sourceDescriptions fix(workflow): use $sourceDescriptions for workflow references Jun 15, 2026
@harshit078 harshit078 marked this pull request as ready for review June 15, 2026 10:07
@harshit078 harshit078 requested review from a team as code owners June 15, 2026 10:07
@harshit078

Copy link
Copy Markdown
Contributor Author

Hi @DmitryAnansky , Can you review the PR and check it ? Thanks !

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Performance Benchmark (Lower is Faster)

CLI Version Bundle Lint Check Config
cli-latest ▓ 1.00x (Fastest) ▓ 1.00x (Fastest) ▓ 1.00x (Fastest)
cli-next ▓ 1.02x ± 0.01 ▓ 1.00x ± 0.01 ▓ 1.00x ± 0.01

if (workflow) {
return workflow;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we need to handle case with

    if (isLegacyForm) {
      return undefined;
    }

Comment thread packages/respect-core/src/modules/context-parser/get-value-from-context.ts Outdated
@DmitryAnansky

Copy link
Copy Markdown
Contributor

Could you please update existing tests to use correct and not legacy format?

@harshit078 harshit078 requested a review from DmitryAnansky June 23, 2026 08:03

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2658393. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants