full test for process_record, plus associated fixes