mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
graphon's Condition.value is str | Sequence[str] | bool | None. The node builder wrote "value": 60 for the ESQ1-303 draft; Graph.init builds every node up front, so that one number stopped the whole workflow. pydantic also coerces int 1 / 0 to True / False, so bool must be checked before int. core/workflow/graph_normalizers.py is the one place both the shared generator's postprocess and the Builder's write chokepoint will call, so the two paths cannot disagree. This commit adds the module with the condition-value normalizer only (if-else cases, sub-variable conditions, loop break conditions, list-operator filters); nothing calls it yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>