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
Lossless guarantee: pt2 and metrics2 are token-for-token identical to the originals.
_dict_to_tok (the decode path) reconstructs BoneToken objects with entry={}:
BoneToken(..., entry={}) # raw canon dict always empty after decode
Five of the six BoneToken slots round-trip correctly (surface, normalized, bone_type, primary, families). The entry field (the raw canon dictionary for the matched bone) is set to empty dict on every decode.
Impact: Any consumer that reads token.entry after a compress/decompress cycle gets {} instead of the original canon entry. Downstream code that reconstructs features from token.entry silently produces empty or wrong results.
Fix options:
Serialize entry into the compressed format and restore it on decode (accepts the size cost).
Correct the docstring: "lossless for surface/normalized/bone_type/primary/families; entry must be re-resolved via canon lookup after decode."
If entry is intentionally excluded for size, add a note directly on BoneToken that entry is not guaranteed to be populated after decode.
compress.pymodule docstring states:_dict_to_tok(the decode path) reconstructsBoneTokenobjects withentry={}:Five of the six
BoneTokenslots round-trip correctly (surface,normalized,bone_type,primary,families). Theentryfield (the raw canon dictionary for the matched bone) is set to empty dict on every decode.Impact: Any consumer that reads
token.entryafter a compress/decompress cycle gets{}instead of the original canon entry. Downstream code that reconstructs features fromtoken.entrysilently produces empty or wrong results.Fix options:
entryinto the compressed format and restore it on decode (accepts the size cost).entryis intentionally excluded for size, add a note directly onBoneTokenthatentryis not guaranteed to be populated after decode.