anchor.diff:  
   on({check_alarm, Name}, {IsLeader, Alarms, ScaleReq, Triggers})
     when IsLeader andalso ScaleReq#scale_req.lock =:= locked  ->
  -    Alarm = get_alarm(Name, Alarms),
  +    {ok, Alarm} = get_alarm(Name, Alarms),
   
       ?TRACE("check_alarm: ~p, scale_req is locked", [Name]),
       {IsLeader, Alarms, ScaleReq, next(Name, Alarm#alarm.interval, Triggers)};
  
positive.code: %% Alarm helpers
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% @doc Get alarm by name.
  -spec get_alarm(Name :: atom(), Alarms :: alarms()) -> alarm() | false.
  get_alarm(Name, Alarms) ->
      lists:keyfind(Name, 2, Alarms).
  
  %% @doc Get value for specified option key from key-value list. Return provided
  %%      default value, if key does not exist.
  
negative.code:                     ok   ->
                          comm:send(Pid, {toggle_alarm_resp,
                                     {ok, {new_state, Toggled#alarm.state}}}),
                          update_alarm(Toggled, Alarms);
                      fail ->
                          comm:send(Pid, {toggle_alarm_resp, {error, tx_fail}}),
                          Alarms
  