Skip to content

Fix invalid self.input access in spin complex DAG test#3180

Merged
talsperre merged 1 commit intomasterfrom
fix/spin-complex-dag-input
May 6, 2026
Merged

Fix invalid self.input access in spin complex DAG test#3180
talsperre merged 1 commit intomasterfrom
fix/spin-complex-dag-input

Conversation

@talsperre
Copy link
Copy Markdown
Collaborator

Summary

  • remove invalid self.input reads from non-foreach-body steps in the complex DAG spin test flow
  • keep self.input usage only in steps where the step is directly executing a foreach item

Validation

  • python -m pytest 'test/unit/spin/test_spin.py::test_simple_flows[complex_dag]' --confcutdir=test/unit/spin --use-latest -q
  • pre-commit run --files test/unit/spin/flows/complex_dag_flow.py

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Greptile Summary

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

Reviews (2): Last reviewed commit: "Fix invalid self.input access in spin co..." | Re-trigger Greptile

@talsperre talsperre force-pushed the fix/spin-complex-dag-input branch from 1f987f3 to f098db1 Compare May 6, 2026 22:46
@talsperre
Copy link
Copy Markdown
Collaborator Author

Correct behavior:

  • 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.

@talsperre talsperre merged commit dfee0f1 into master May 6, 2026
42 checks passed
@talsperre talsperre deleted the fix/spin-complex-dag-input branch May 6, 2026 23:48
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