let reactivate
?with_id ?with_name ?with_metadata ?log t =
(* It's [`Passive] so there won't be any [exn]. *)
activate_exn ~reason:`User
{t with
history = `Passive (State.make_log ?message:log ());
id = Option.value with_id ~default:(Unique_id.create ());
name = Option.value with_name ~default:t.name;
metadata = Option.value with_metadata ~default:t.metadata}