mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
When an optional text parameter is omitted from a workflow invocation and connected to an expression tool, the callback_helper in visit_input_values could fail to replace unresolved inputs with the tool parameter default. Two issues contributed to this: 1. NoReplacement doesn't implement __eq__, so when the callback returns a different NoReplacement instance than the module-level NO_REPLACEMENT singleton, the equality comparison fails and the raw NoReplacement object gets stored as the input value. 2. The replace_optional_connections path needs to guard replacements with is_runtime_value(value) to avoid clobbering valid tool-state values for unconnected parameters (like select parameters with defaults). Fix both by switching all NoReplacement comparisons to isinstance() checks and restoring the is_runtime_value guard. Add a framework workflow test that connects an optional text parameter to an expression tool converting text→boolean, then uses the boolean as a when condition.