Skip to content

Fix workflow registration alias handling in the test environment - #2764

Open
dplyukhin wants to merge 2 commits into
mainfrom
fix/test-workflow-registration-aliasing
Open

dplyukhin wants to merge 2 commits into
mainfrom
fix/test-workflow-registration-aliasing

Conversation

@dplyukhin

Copy link
Copy Markdown
Contributor

What was changed

  • Removed redundant alias lookup from TestWorkflowEnvironment.OnWorkflow.
  • Added alias lookup to testWorkflowEnvironmentImpl.getWorkflowDefinition.

Why?

Redundant alias lookup in OnWorkflow could cause one workflow to resolve to another. If workflow function A is registered as "B" and workflow function B is registered as "C", then OnWorkflow(A, ...) resolved to "C" instead of "B", installing the mock under the wrong name.

Missing alias lookup in getWorkflowDefinition caused the test environment’s lookup behavior to differ from production’s registry.getWorkflowDefinition. Technically, production’s extra alias lookup is incorrect because it interprets registered names as aliases. Changing that behavior requires an SDK flag and is left for another PR.

Checklist

  1. Closes: N/A.
  2. How was this tested:
  3. Any docs updates needed?

@dplyukhin
dplyukhin requested a review from a team as a code owner October 9, 2026 21:53
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.

1 participant