Files
galaxy/test/functional/tools/parameters/gx_conditional_boolean_implicit.xml
mvdbeek 673a986e23 Model implicit empty boolean conditional branches
The anndata_ops 1.9.3+galaxy1 tool defines copy_u with only a true branch.
Its XML has this structure (labels and branch inputs omitted):

    <conditional name="copy_u">
        <param name="default" type="boolean" checked="false" />
        <when value="true">
            <!-- inputs for copying uns -->
        </when>
    </conditional>

When copy_u.default is false, Galaxy's runtime loader supplies the missing
empty false branch and the tool executes successfully. The typed parameter
factory only modelled the declared true branch, so traversal of the same
state during workflow request capture raised:

    Invalid conditional test value (False) for parameter (default)

This happened at step 11 of the IWC multiplex-tma.ga test. The capture
fallback logged the error and returned no ToolRequest, losing request
provenance even though the job and workflow test passed.

Add empty missing boolean branches when constructing the typed model,
matching the runtime loader. Mark the added branch as the default when it
matches the test parameter's default, so omitted test values also resolve
correctly. Keep declared branches and the execution-neutral capture
fallback unchanged.

Two regressions use a shared XML fixture to check implicit false branch
conversion/default filling and persistence of a mapped ToolRequest with
its parent collection reference intact. Both fail without the fix and
pass with it; 197 relevant tests pass. Include the fixture in the package
manifest so it is available in source distributions.

Observed failure (workflow test passed):
https://github.com/galaxyproject/iwc/actions/runs/41033704621/job/123991213489
Run: https://github.com/galaxyproject/iwc/actions/runs/41033704621
2026-11-02 12:08:38 +01:00

17 lines
665 B
XML

<tool id="gx_conditional_boolean_implicit" name="gx_conditional_boolean_implicit" version="1.0.0" profile="21.09">
<macros>
<import>macros.xml</import>
</macros>
<expand macro="common_conditional_tags" />
<inputs>
<param name="input" type="data" format="txt" />
<conditional name="conditional_parameter">
<param name="test_parameter" type="boolean" checked="false" />
<when value="true">
<param name="integer_parameter" type="integer" value="1" />
</when>
<!-- The runtime loader supplies an empty false branch. -->
</conditional>
</inputs>
</tool>