When a dataclass-typed socket crosses a @task.graph boundary, aiida-workgraph routes the value through dataclasses.asdict + cls(**), which preserves the shape but promotes bare Python ints/floats/bools to their orm.Int / orm.Float / orm.Bool equivalents along the way.
cls(**asdict_value) then re-stores those wrapped values, which breaks downstream stdlib arithmetic e.g. (range(orm.Int(...)) raises TypeError because orm.Int doesn't implement__index__).
When a dataclass-typed socket crosses a
@task.graphboundary, aiida-workgraph routes the value throughdataclasses.asdict+cls(**), which preserves the shape but promotes bare Python ints/floats/bools to theirorm.Int/orm.Float/orm.Boolequivalents along the way.cls(**asdict_value)then re-stores those wrapped values, which breaks downstream stdlib arithmetic e.g. (range(orm.Int(...))raisesTypeErrorbecauseorm.Intdoesn't implement__index__).