Workflow single-node execution drops explicit falsy inputs
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 24.6k
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 610
Description
## Dify version
main (`40df83de`)
## Cloud or Self Hosted
Self Hosted (Source)
## Steps to reproduce
1. Run a workflow node through the debugger or single-node execution path.
2. Map an input such as `node.enabled` to a downstream selector.
3. Provide `False`, `0`, or an empty string as the explicit value for that input.
## Expected Behavior
The explicit value is placed in the variable pool unchanged.
## Actual Behavior
The input is treated as absent. The mapper falls through to the short-key alias and, when that alias is absent, does not add the value to the variable pool.
## Root cause
`WorkflowEntry.mapping_user_inputs_to_variable_pool` uses a truthiness check before falling back from the full input key to its short-key alias. Valid falsy values therefore follow the missing-value path.
Contributor guide
Research direction
Start at WorkflowEntry.mapping_user_inputs_to_variable_pool, the entry point named in the report, and reproduce the debugger or single-node execution path with False, 0, and an empty string. Done means each explicit value reaches the variable pool unchanged instead of falling through to the short-key alias.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100