You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR removes two invalid self.input reads in the complex DAG spin test flow. self.input is only valid inside a step that is the direct body of a foreach dispatch; step_e and step_l are regular/branch steps, so reading self.input there would raise an error or produce undefined behavior in the test harness.
step_e is reached from the join step step_d (not a foreach body), so self.input is dropped from its print statement.
step_l is reached via a static parallel branch from step_j (not a foreach body), so the same invalid read is removed.
Confidence Score: 5/5
Safe to merge — the change removes two clearly incorrect attribute reads from a test fixture with no impact on production code.
Both removed self.input accesses were in steps that are never foreach-body steps (step_e follows a join, step_l is a static branch), so the fix is correct and the remaining self.input usages in step_a, step_b, step_c, and step_f are all in proper foreach-body positions.
No files require special attention.
Important Files Changed
Filename
Overview
test/unit/spin/flows/complex_dag_flow.py
Removes invalid self.input accesses from step_e and step_l, which are not foreach-body steps
self.input should be the actual input value only in direct foreach-body steps, e.g. step_a, step_b, step_c, and step_f.
step_e is not a foreach-body step; it creates split_e and then starts a foreach.
step_l is also not a foreach-body step; it is a normal branch after step_j.
So for step_e/step_l, the test flow should not read self.input at all. It should not expect an actual value, and it should not rely on old None fallback behavior.
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
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.
Summary
self.inputreads from non-foreach-body steps in the complex DAG spin test flowself.inputusage only in steps where the step is directly executing a foreach itemValidation
python -m pytest 'test/unit/spin/test_spin.py::test_simple_flows[complex_dag]' --confcutdir=test/unit/spin --use-latest -qpre-commit run --files test/unit/spin/flows/complex_dag_flow.py