anchor.diff:                  false ->
                       timeout
               end
  +    end.
  +
  +get_ctx(Model) ->
  +    Ctx = model_apply(Model, {get_ctx, []}, fun() -> #{model => Model} end),
  +    Ctx2 = case Model of
  +        traverse_task ->
  +            Ctx#{sync_enabled => true,
  +                remote_driver => datastore_remote_driver,
  +                mutator => oneprovider:get_id_or_undefined(),
  +                local_links_tree_id => oneprovider:get_id_or_undefined()
  +            };
  +        _ ->
  +            Ctx
  +    end,
  +    datastore_model_default:set_defaults(Ctx2).
  +
  +model_apply(Model, {Function, Args}, DefaultFun) ->
  +    Exports = Model:module_info(functions),
  +    Arity = length(Args),
  +    case lists:keyfind(Function, 1, Exports) of
  +        {Function, Arity} -> erlang:apply(Model, Function, Args);
  +        _ -> DefaultFun()
       end.
positive.code:                 links_delete(Doc);
              _ ->
                  Model = element(1, Value),
                  Ctx = datastore_model_default:get_ctx(Model),
                  Ctx2 = Ctx#{sync_change => true, hooks_disabled => true},
                  case datastore_model:save(Ctx2, Doc) of
                      {ok, Doc2} ->
  
negative.code:     LocalTreeId = oneprovider:get_id(),
      case TreeId of
          LocalTreeId ->
              Ctx = get_ctx(Model),
              Ctx2 = Ctx#{
                  sync_change => true,
                  local_links_tree_id => LocalTreeId
  