fix: change WithStepContext to only fire for steps with state name, no fallback to bare name - #24
Merged
Conversation
…o fallback to bare name
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
kristina-solovyova
marked this pull request as ready for review
September 10, 2026 18:57
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.

Note
Medium Risk
Changes when the optional
WithStepContexthook runs; integrations that relied on display-name fallback for stateless steps may see different context propagation in nested flows.Overview
WithStepContextis now called only when a step has a non-empty step-state name fromGetStepStateName(). The engine no longer falls back to the step’s displayNamewhen building per-step context.Stateless steps (including nested children inside a grouped step with no
State) keep the context they already inherited—typically the parent stated step’s context—instead of being re-scoped under their bare display names. Comments instep_engine.godocument this contract.Adds
TestWithStepContextOnlyForStatedSteps, which assertsWithStepContextruns for stated leaf and group steps ("leaf","group") but not for stateless children (child1,child2).Reviewed by Cursor Bugbot for commit efcf24a. Bugbot is set up for automated code reviews on this repo. Configure here.