Files
John ChiltonandClaude Opus 5 4bface0a12 Fix infinity handling for tool requests and XSD validation
Two real CI failures on the framework infinity test:

delta_frac="Infinity" is not a valid xs:float lexical form, so the tool failed
XSD validation. Use "INF", which the schema accepts and float() still parses to
infinity.

Under GALAXY_TEST_USE_LEGACY_TOOL_API=never the float input was rejected before
execution. safe_dumps encodes a non-finite float as a sentinel string, so the
persisted tool request holds '__Infinity__'. Request validation accepts the
sentinel but does not rewrite the state, so the legacy parameter population
downstream got the raw string and failed. Decode at the point the persisted
request becomes executable state, keyed off the parameter model so ordinary
strings that merely look like a sentinel are left alone.

Also name the float-valued output comparison attributes next to the parser
defaults instead of repeating them in the interactor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 09:40:42 -04:00

38 lines
1.4 KiB
XML

<!-- Exercise non-finite numeric values without converting similar strings or identifiers. -->
<tool id="infinity" name="infinity" version="0.1.0">
<command><![CDATA[
echo "text $intext" > '$NaN' &&
echo "float $infloat" >> '$NaN' &&
echo "select $inselect" >> '$NaN' &&
echo "param $Infinity" >> '$NaN'
]]></command>
<inputs>
<param name="intext" type="text" value=""/>
<param name="infloat" type="float" value=""/>
<param name="inselect" type="select">
<option value="Infinity">Infinity</option>
<option value="NaN">NaN</option>
</param>
<param name="Infinity" type="text" value=""/>
</inputs>
<outputs>
<data name="NaN" format="txt" label="out"/>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="intext" value="__Infinity__"/>
<param name="infloat" value="Inf"/>
<param name="inselect" value="Infinity"/>
<param name="Infinity" value="VAL"/>
<output name="NaN" file="1.txt" compare="sim_size" delta_frac="INF">
<assert_contents>
<has_line line="text __Infinity__"/>
<has_line line="float inf"/>
<has_line line="select Infinity"/>
<has_line line="param VAL"/>
</assert_contents>
</output>
</test>
</tests>
</tool>