Files
floci/src/test/java
Ovidiu (Ovi) 7abba35051 fix(sfn): accept a decimal ToleratedFailurePercentage at execution (#7297)
* fix(sfn): accept a decimal ToleratedFailurePercentage at execution

ToleratedFailurePercentage is a number from 0 to 100, not an integer. Create-time
validation already treats it that way, so a definition declaring 100.0 or 12.5 was
accepted by CreateStateMachine and then failed every execution of its Distributed Map
with States.Runtime "ToleratedFailurePercentage must resolve to an integer of 0 or more".

The execution path now resolves the percentage as a decimal, through its literal, its
Path or a JSONata expression, rejects values outside 0 to 100, and absorbs
floor(itemCount * percentage / 100) failed items. DescribeMapRun reports the declared
value unrounded. ToleratedFailureCount is unchanged and stays an integer.

* fix(sfn): accept a decimal ToleratedFailurePercentage only as a literal

The guide asks for "a value between zero and 100" for the literal, but says the Path
"must resolve to a positive integer between 0 and 100 at runtime" and a JSONata
expression must evaluate to an integer. The Path and JSONata forms keep main's integer
check, and the shared resolveMapField refactor is reverted with them.
2026-11-02 09:36:11 -04:00
..