Coerces v1.0-era bare-string field entries to v2.0’s structured shape.

v1.0’s ClassEntity.fields was List[str] (just the field name). v2.0’s ClassModel.fields is List[VariableModel]. Without this, loading a genuine v1.0 IR file raises a hard ValidationError on every field instead of degrading gracefully, breaking the backward-compatibility guarantee that load_compressed_ir() never raises on old payloads.

Returns:

value unchanged if it isn’t a list; otherwise a new list with each

Methods

_coerce_legacy_field_entries

_coerce_legacy_field_entries(value) -> Any

Coerces v1.0-era bare-string field entries to v2.0’s structured shape.

v1.0’s ClassEntity.fields was List[str] (just the field name). v2.0’s ClassModel.fields is List[VariableModel]. Without this, loading a genuine v1.0 IR file raises a hard ValidationError on every field instead of degrading gracefully, breaking the backward-compatibility guarantee that load_compressed_ir() never raises on old payloads.

Returns:

value unchanged if it isn’t a list; otherwise a new list with each

ParameterTypeDescription
valueAnyThe raw fields list from the parsed IR payload (typically a

Generated with Flude

Copyright © 2026