fix to-record, add more tests

Created by  tzemanovic  on January 27, 2026
LJEWZVNPT7UXEL2J2WDGDAFBO5TYV5AQO6BMLC4KHLBMZZCSQASAC
Change contents