encoding gracefully. This at least gets an interim start on the solution; we will likely make additional improvements once the generic history sync framework goes in.