Repository navigation
Conversation
The workflow engine stringifies a list constant to its Python repr
("['id1', 'id2']") before it reaches tool validation, and the
comma-split normalization turned it into ["['id1'", "'id2']"], so the
tool received corrupted ids (and static selects failed the options
check). Parse a bracketed string back to a list with ast.literal_eval
first and fall back to comma-splitting otherwise.
Fixes langgenius#45672
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #45676 +/- ##
=======================================
Coverage 89.97% 89.97%
=======================================
Files 6256 6256
Lines 391627 391642 +15
Branches 78460 78464 +4
=======================================
+ Hits 352356 352378 +22
+ Misses 33181 33174 -7
Partials 6090 6090
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The patch coverage check flagged the two fallback paths in _parse_multiple_select_string: an unparsable bracketed string and a bracketed string that parses to something other than a list of strings. Both fall back to comma splitting; add regression tests pinning that behavior so the fallback stays covered.
This was referenced Nov 20, 2026
This branch has not been deployed
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.
Fixes #45672
A tool node constant like ["id1", "id2"] gets stringified to "['id1', 'id2']" by the workflow engine before it reaches tool validation. The comma-split in init_frontend_parameter then turned it into ["['id1'", "'id2']"], so the tool received corrupted ids, and static selects failed the options check instead.
This parses a bracketed string back to a list first, and falls back to the existing comma-split for anything else. A list constant now reaches the tool unchanged.
The same stringification also happens upstream in graphon; this fixes it where dify validates the value, so existing workflows work without waiting on a graphon release and pin bump.
Verified: new regression tests in test_tool_entities.py fail before the fix and pass after. Ran the tool entities, agent plugin entities, and datasource entities suites (97 passed), plus the neighboring tool suites. Ruff check and format clean, pyrefly clean on the changed file.