anchor.diff:  -export_type([stats/0]).
   -endif.
   
  --type option()   :: feedback_response |
  -                    {feedback_request, comm:mypid()} |
  +-type option()   :: {feedback_request, comm:mypid()} |
                       {send_stats, comm:mypid()} | %send stats to pid after completion
                       {session_id, rrepair:session_id()} |
                       {from_my_node, 0 | 1}.
  
positive.code:     NewState = State#rr_resolve_state{stats = NewStats, feedbackKvv = {NewFBItems, MyIKvTree}},
      ?ASSERT(_Diff =:= (NewRegenOk + NewUpdOk + NewUpdFail + NewRegenFail)),
      ?TRACE("UPDATED = ~p - Regen=~p", [NewUpdOk, NewRegenOk], State),
      shutdown(resolve_ok, NewState, FBDest, NewFBItems, [feedback_response]);
  
  on({'DOWN', _MonitorRef, process, _Owner, _Info}, _State) ->
      log:log(info, "[ ~p - ~p] shutdown due to rrepair shut down", [?MODULE, comm:this()]),
  
negative.code:          regen_count      = 0      :: non_neg_integer(),
           update_count     = 0      :: non_neg_integer(),
           upd_fail_count   = 0      :: non_neg_integer(),
           regen_fail_count = 0      :: non_neg_integer()
           }).
  -type stats() :: #resolve_stats{}.
  
  