Skip to content

Conversation

@hila-f-qodo
Copy link

@hila-f-qodo hila-f-qodo commented Jan 26, 2026

Benchmark PR from qodo-benchmark#423


Open with Devin

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 3 additional flags in Devin Review.

Open in Devin Review

Comment on lines +42 to +43
assigned_selector = self.node_data.assigned_variable_selector
return assigned_selector in variable_selectors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Type mismatch in blocks_variable_output causes comparison to always return False

The blocks_variable_output method in v1 VariableAssignerNode compares a Sequence[str] (list) directly with a set[tuple[str, ...]], which will always return False because a list is never equal to a tuple.

Click to expand

Bug Mechanism

The assigned_variable_selector is of type Sequence[str] (typically a list[str] from Pydantic parsing at node_data.py:14). The variable_selectors parameter is a set[tuple[str, ...]] (as defined in the base class at node.py:435 and populated in coordinator.py:172-175).

When checking assigned_selector in variable_selectors at line 43, Python compares a list with tuples in the set. Since ['conversation', 'conv_var'] != ('conversation', 'conv_var'), the comparison always returns False.

Comparison with v2 Implementation

The v2 implementation correctly handles this at v2/node.py:79:

item_selector_tuple = tuple(item.variable_selector)
if item_selector_tuple in variable_selectors:
    return True

Impact

The streaming response coordinator uses blocks_variable_output to determine if a node must complete before streaming can proceed. Because this method always returns False, the v1 Variable Assigner node will never block streaming output, potentially causing the Answer node to stream the old/default value of a conversation variable before the Variable Assigner has updated it.

Recommendation: Convert the assigned_selector to a tuple before comparison:

assigned_selector = tuple(self.node_data.assigned_variable_selector)
return assigned_selector in variable_selectors
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

4 participants