You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TaskResult.from_payload() sets result.turns to None for numeric turns=0,
or uses current_turn if that alias is present. String "0" is already preserved.
Reproduced on 371aa6df56880643da57b30da936e9812fb0ec66, Python 3.12.14, using packages/artemis-client/src on PYTHONPATH:
The selection in packages/artemis-client/src/artemis_client/models.py uses payload.get("turns") or payload.get("current_turn"), so zero triggers the
fallback before integer conversion.
I propose preserving numeric zero and its precedence over the legacy alias,
while keeping the existing handling of null, empty and boolean values. The fix
can stay within the parser, with regression tests for zero and compatibility
checks for the other inputs. This reproduces directly in the client model without
a server.
Activity