Skip to content

fix: change WithStepContext to only fire for steps with state name, no fallback to bare name - #24

Merged
kristina-solovyova merged 1 commit into
mainfrom
09-10-fix_change_withstepcontext_to_only_fire_for_steps_with_state_name_no_fallback_to_bare_name
Sep 10, 2026
Merged

kristina-solovyova merged 1 commit into
mainfrom
09-10-fix_change_withstepcontext_to_only_fire_for_steps_with_state_name_no_fallback_to_bare_name

Conversation

@kristina-solovyova

@kristina-solovyova kristina-solovyova commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Changes when the optional WithStepContext hook runs; integrations that relied on display-name fallback for stateless steps may see different context propagation in nested flows.

Overview
WithStepContext is now called only when a step has a non-empty step-state name from GetStepStateName(). The engine no longer falls back to the step’s display Name when 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 in step_engine.go document this contract.

Adds TestWithStepContextOnlyForStatedSteps, which asserts WithStepContext runs 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.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kristina-solovyova
kristina-solovyova marked this pull request as ready for review September 10, 2026 18:57
@kristina-solovyova
kristina-solovyova merged commit 4b670a5 into main Sep 10, 2026
7 checks passed
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